expose transformers option to transpileModule

This commit is contained in:
Justin Bay 2017-03-21 20:33:40 -04:00
parent 6756e3e44c
commit 8ee5610691

View File

@ -5,6 +5,7 @@ namespace ts {
reportDiagnostics?: boolean;
moduleName?: string;
renamedDependencies?: MapLike<string>;
transformers?: CustomTransformers;
}
export interface TranspileOutput {
@ -103,7 +104,7 @@ namespace ts {
addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics());
}
// Emit
program.emit();
program.emit(/*targetSourceFile*/ undefined, /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, transpileOptions.transformers);
Debug.assert(outputText !== undefined, "Output generation failed");