Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return tsc.main(project, cliOptions, codegen).then(function () { return 0; }).catch(function (e) {
if (e instanceof tsc.UserError || compiler_1.isSyntaxError(e)) {
consoleError(e.message);
return Promise.resolve(1);
}
else {
consoleError(e.stack);
consoleError('Compilation failed');
return Promise.resolve(1);
}
});
}
.catch(e => {
if (e instanceof tsc.UserError || isSyntaxError(e)) {
consoleError(e.message);
} else {
consoleError(e.stack);
}
return Promise.resolve(1);
});
}
return tsc.main(project, cliOptions, codegen).then(function () { return 0; }).catch(function (e) {
if (e instanceof tsc.UserError || e instanceof compiler_1.SyntaxError) {
consoleError(e.message);
return Promise.resolve(1);
}
else {
consoleError(e.stack);
consoleError('Compilation failed');
return Promise.resolve(1);
}
});
}
return tsc.main(project, cliOptions, codegen).then(function () { return 0; }).catch(function (e) {
if (e instanceof tsc.UserError || compiler_1.isSyntaxError(e)) {
consoleError(e.message);
return Promise.resolve(1);
}
else {
consoleError(e.stack);
consoleError('Compilation failed');
return Promise.resolve(1);
}
});
}