Ensure scripts compile, are checked in strict mode (#49524)
This commit is contained in:
Родитель
0ada54c006
Коммит
884f5ac258
|
@ -409,6 +409,15 @@
|
|||
"integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/fs-extra": {
|
||||
"version": "9.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
|
||||
"integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
"@octokit/rest": "latest",
|
||||
"@types/chai": "latest",
|
||||
"@types/convert-source-map": "latest",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/glob": "latest",
|
||||
"@types/gulp": "^4.0.9",
|
||||
"@types/gulp-concat": "latest",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": true,
|
||||
"strict": true,
|
||||
"removeComments": false,
|
||||
"declaration": false,
|
||||
"sourceMap": true,
|
||||
|
|
Загрузка…
Ссылка в новой задаче