class transformer:类变压器的Deno端口 源码
改用Transpiled class-transformer // import "reflect-metadata" into your main file import "https://esm.sh/reflect-metadata" ; // you need to --allow-env import { Expose , plainToClass } from "https://esm.sh/class-transformer" ; class SomeDto { @ Expose ( ) name : string ; @ Expose ( ) value : string ; } const asClass = plainToClass ( SomeDto , { name : "something" , value : 2345 , } ) ;
用户评论