Ensure scripts compile, are checked in strict mode (#49524)

This commit is contained in:
Jake Bailey
2022-06-14 16:28:42 -07:00
committed by GitHub
parent 0ada54c006
commit 884f5ac258
4 changed files with 12 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ function writeProtocolFile(outputFile: string, protocolTs: string, typeScriptSer
if (fileName === protocolFileName) {
return ts.createSourceFile(fileName, protocolDts, options.target);
}
return originalGetSourceFile.apply(host, [fileName]);
return originalGetSourceFile.apply(host, [fileName, ts.ScriptTarget.Latest]);
};
const rootFiles = includeTypeScriptServices ? [protocolFileName, typeScriptServicesDts] : [protocolFileName];
return ts.createProgram(rootFiles, options, host);

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"strictNullChecks": true,
"strict": true,
"removeComments": false,
"declaration": false,
"sourceMap": true,