@@ -4372,12 +4372,12 @@ module ts {
4372
4372
}
4373
4373
}
4374
4374
4375
- var hasSemanticErrors : boolean = false ;
4376
- var isEmitBlocked : boolean = false ;
4375
+ var hasSemanticDiagnostics = false ;
4376
+ var isEmitBlocked = false ;
4377
4377
4378
4378
if ( targetSourceFile === undefined ) {
4379
4379
// No targetSourceFile is specified (e.g. calling emitter from batch compiler)
4380
- hasSemanticErrors = resolver . hasSemanticErrors ( ) ;
4380
+ hasSemanticDiagnostics = resolver . hasSemanticDiagnostics ( ) ;
4381
4381
isEmitBlocked = host . isEmitBlocked ( ) ;
4382
4382
4383
4383
forEach ( host . getSourceFiles ( ) , sourceFile => {
@@ -4395,7 +4395,7 @@ module ts {
4395
4395
// targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service)
4396
4396
if ( shouldEmitToOwnFile ( targetSourceFile , compilerOptions ) ) {
4397
4397
// If shouldEmitToOwnFile returns true or targetSourceFile is an external module file, then emit targetSourceFile in its own output file
4398
- hasSemanticErrors = resolver . hasSemanticErrors ( targetSourceFile ) ;
4398
+ hasSemanticDiagnostics = resolver . hasSemanticDiagnostics ( targetSourceFile ) ;
4399
4399
isEmitBlocked = host . isEmitBlocked ( targetSourceFile ) ;
4400
4400
4401
4401
var jsFilePath = getOwnEmitOutputFilePath ( targetSourceFile , host , ".js" ) ;
@@ -4406,7 +4406,7 @@ module ts {
4406
4406
// Emit all, non-external-module file, into one single output file
4407
4407
forEach ( host . getSourceFiles ( ) , sourceFile => {
4408
4408
if ( ! shouldEmitToOwnFile ( sourceFile , compilerOptions ) ) {
4409
- hasSemanticErrors = hasSemanticErrors || resolver . hasSemanticErrors ( sourceFile ) ;
4409
+ hasSemanticDiagnostics = hasSemanticDiagnostics || resolver . hasSemanticDiagnostics ( sourceFile ) ;
4410
4410
isEmitBlocked = isEmitBlocked || host . isEmitBlocked ( sourceFile ) ;
4411
4411
}
4412
4412
} ) ;
@@ -4418,7 +4418,7 @@ module ts {
4418
4418
function emitFile ( jsFilePath : string , sourceFile ?: SourceFile ) {
4419
4419
if ( ! isEmitBlocked ) {
4420
4420
emitJavaScript ( jsFilePath , sourceFile ) ;
4421
- if ( ! hasSemanticErrors && compilerOptions . declaration ) {
4421
+ if ( ! hasSemanticDiagnostics && compilerOptions . declaration ) {
4422
4422
writeDeclarationFile ( jsFilePath , sourceFile ) ;
4423
4423
}
4424
4424
}
@@ -4437,9 +4437,9 @@ module ts {
4437
4437
emitResultStatus = EmitReturnStatus . AllOutputGenerationSkipped ;
4438
4438
} else if ( hasEmitterError ) {
4439
4439
emitResultStatus = EmitReturnStatus . EmitErrorsEncountered ;
4440
- } else if ( hasSemanticErrors && compilerOptions . declaration ) {
4440
+ } else if ( hasSemanticDiagnostics && compilerOptions . declaration ) {
4441
4441
emitResultStatus = EmitReturnStatus . DeclarationGenerationSkipped ;
4442
- } else if ( hasSemanticErrors && ! compilerOptions . declaration ) {
4442
+ } else if ( hasSemanticDiagnostics && ! compilerOptions . declaration ) {
4443
4443
emitResultStatus = EmitReturnStatus . JSGeneratedWithSemanticErrors ;
4444
4444
} else {
4445
4445
emitResultStatus = EmitReturnStatus . Succeeded ;
0 commit comments