import { Type } from "../deps.ts" ; import { MvTransformer } from "../mv-transformer.ts" ; import { TransformerCatalog } from "../transformer-catalog.ts" ; param transformer param priority remarks see MvTransformer see MvTransformer export function Transform ( transformer , priority ? ) { return < T > ( target , propertyKey ? , parameterIndex ? ) => { if ( ! propertyKey ) { TransformerCatalog . registerTransformer ( transformer , target as Type , undefined , undefined , priority ) ; } else { TransformerCatalog . registerTransformer ( transformer , target . constructor as Type , propertyKey . toString ( ) , typeof parameterIndex === "number" ? parameterIndex : undefined , priority ) ; } } ; }