blob: fa18d6d68e53ed509f21973d9d512c0c12b446e8 [file] [log] [blame]
//https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
function transpile(fileNames) {
var compilerOptions = {
noEmitOnError : true,
emitDecoratorMetadata: true,
experimentalDecorators: true,
newLine: 'LF',
noImplicitAny : true,
target : ts.ScriptTarget.ES5,
module : "AMD"
};
var transpileOptions = {
compilerOptions : compilerOptions,
reportDiagnostics: false
};
var result = ts.transpileModule(fileNames, transpileOptions);
return {
output : result.outputText
};
}