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:
1 parent
eed1576e53
commit
dd8d3535ff
7 files changed
+297
-402
No files matched your search
@@ -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