mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 20:01:02 -05:00
Don't emit outputs when -noEmit is specified.
This commit is contained in:
@@ -296,6 +296,9 @@ module ts {
|
||||
if (checker.isEmitBlocked()) {
|
||||
exitStatus = EmitReturnStatus.AllOutputGenerationSkipped;
|
||||
}
|
||||
else if (compilerOptions.noEmit) {
|
||||
exitStatus = EmitReturnStatus.Succeeded;
|
||||
}
|
||||
else {
|
||||
var emitStart = new Date().getTime();
|
||||
var emitOutput = checker.emitFiles();
|
||||
|
||||
@@ -943,7 +943,7 @@ module ts {
|
||||
|
||||
// Return code used by getEmitOutput function to indicate status of the function
|
||||
export enum EmitReturnStatus {
|
||||
Succeeded = 0, // All outputs generated as requested (.js, .map, .d.ts), no errors reported
|
||||
Succeeded = 0, // All outputs generated if requested (.js, .map, .d.ts), no errors reported
|
||||
AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, nothing generated
|
||||
JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors
|
||||
DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors
|
||||
|
||||
@@ -34,7 +34,7 @@ declare var FourSlash;
|
||||
// Return code used by getEmitOutput function to indicate status of the function
|
||||
// It is a duplicate of the one in types.ts to expose it to testcases in fourslash
|
||||
enum EmitReturnStatus {
|
||||
Succeeded = 0, // All outputs generated as requested (.js, .map, .d.ts), no errors reported
|
||||
Succeeded = 0, // All outputs generated if requested (.js, .map, .d.ts), no errors reported
|
||||
AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated
|
||||
JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors
|
||||
DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors
|
||||
|
||||
Reference in New Issue
Block a user