summaryrefslogtreecommitdiff
path: root/cli/tsc
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tsc')
-rw-r--r--cli/tsc/99_main_compiler.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js
index dede279c1..a2e127508 100644
--- a/cli/tsc/99_main_compiler.js
+++ b/cli/tsc/99_main_compiler.js
@@ -878,6 +878,13 @@ delete Object.prototype.__proto__;
7016,
];
+ const IGNORED_COMPILE_DIAGNOSTICS = [
+ // TS1208: All files must be modules when the '--isolatedModules' flag is
+ // provided. We can ignore because we guarantuee that all files are
+ // modules.
+ 1208,
+ ];
+
const stats = [];
let statsStart = 0;
@@ -1162,7 +1169,9 @@ delete Object.prototype.__proto__;
...program.getSemanticDiagnostics(),
];
diagnostics = diagnostics.filter(
- ({ code }) => !IGNORED_DIAGNOSTICS.includes(code),
+ ({ code }) =>
+ !IGNORED_DIAGNOSTICS.includes(code) &&
+ !IGNORED_COMPILE_DIAGNOSTICS.includes(code),
);
// We will only proceed with the emit if there are no diagnostics.
@@ -1333,7 +1342,10 @@ delete Object.prototype.__proto__;
const diagnostics = ts
.getPreEmitDiagnostics(program)
- .filter(({ code }) => !IGNORED_DIAGNOSTICS.includes(code));
+ .filter(({ code }) =>
+ !IGNORED_DIAGNOSTICS.includes(code) &&
+ !IGNORED_COMPILE_DIAGNOSTICS.includes(code)
+ );
const emitResult = program.emit();
assert(emitResult.emitSkipped === false, "Unexpected skip of the emit.");