import * as ts from 'typescript' ; export class TransformerTester { public static run ( source , transformer ) { const result = ts . transpileModule ( source , { compilerOptions : { module : ts . ModuleKind . CommonJS , experimentalDecorators : true , emitDecoratorMetadata : true , target : ts . ScriptTarget . ES2017 , isolatedModules : false } , transformers : { before : [ transformer ( ) ] } , reportDiagnostics : true } ) ; return result . outputText ; } }