import { TransformFnParams , TransformOptions } from 'class-transformer' ; todo see https import { defaultMetadataStorage } from 'class-transformer/cjs/storage' ; export function doJoin ( joiner = ',' ) { return ( { value } ) => { return ! ! value || value === false ? Array . from ( value ) . join ( joiner ) : null ; } ; } export function Join ( joiner , options = { } ) { const transformFn = doJoin ( joiner ) ; return function ( target , propertyName ) : void { defaultMetadataStorage . addTransformMetadata ( { target : target . constructor , propertyName : propertyName as string , transformFn , options , } ) ; } ; }