Turn on TS strict mode for deno_typescript (#3330)

This commit is contained in:
Ry Dahl 2019-11-14 15:05:36 -05:00 committed by GitHub
parent 8b90b8e883
commit 4902a1cacb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 27 additions and 9 deletions

View file

@ -285,7 +285,7 @@ async function processImports(
referrer = ""
): Promise<SourceFileJson[]> {
if (!specifiers.length) {
return;
return [];
}
const sources = specifiers.map(([, moduleSpecifier]) => moduleSpecifier);
const sourceFiles = await fetchSourceFiles(sources, referrer);
@ -385,6 +385,8 @@ class Host implements ts.CompilerHost {
private readonly _options: ts.CompilerOptions = {
allowJs: true,
allowNonTsExtensions: true,
// TODO(#3324) Enable strict mode for user code.
// strict: true,
checkJs: false,
esModuleInterop: true,
module: ts.ModuleKind.ESNext,