mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Remove the concept of early errors from the compiler.
Currently only parse errors prevent emitting (And this will be changed in the next code review as well).
This commit is contained in:
@@ -113,13 +113,8 @@ module ts {
|
||||
return emitHost || (emitHost = createEmitHostFromProgram(program));
|
||||
}
|
||||
|
||||
function hasEarlyErrors(sourceFile?: SourceFile): boolean {
|
||||
return forEach(getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile), d => d.isEarly);
|
||||
}
|
||||
|
||||
function isEmitBlocked(sourceFile?: SourceFile): boolean {
|
||||
return getDiagnostics(sourceFile).length !== 0 ||
|
||||
hasEarlyErrors(sourceFile) ||
|
||||
(options.noEmitOnError && getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user