mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
perf: ensure compiler options affecting semantic diagnostics get included in build info (#53423)
This commit is contained in:
parent
1df5717b12
commit
1761a67ff8
@ -1101,6 +1101,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
|
||||
name: "allowImportingTsExtensions",
|
||||
type: "boolean",
|
||||
affectsSemanticDiagnostics: true,
|
||||
affectsBuildInfo: true,
|
||||
category: Diagnostics.Modules,
|
||||
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
||||
defaultValueDescription: false,
|
||||
|
||||
@ -245,3 +245,14 @@ describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => {
|
||||
assertParseResult("errors on invalid excludeFiles", ["--excludeFiles", "**/../*"]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("unittests:: config:: commandLineParsing:: optionDeclarations", () => {
|
||||
it("should have affectsBuildInfo true for every option with affectsSemanticDiagnostics", () => {
|
||||
for (const option of ts.optionDeclarations) {
|
||||
if (option.affectsSemanticDiagnostics) {
|
||||
// semantic diagnostics affect the build info, so ensure they're included
|
||||
assert(option.affectsBuildInfo ?? false, option.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user