From 530fc3cb2d8f764dd13662ffdb49ece1deb6c7b0 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 8 Dec 2023 11:33:01 -0800 Subject: [PATCH] Show implied options in --showConfig (#56701) --- package-lock.json | 14 +- package.json | 2 +- src/compiler/commandLineParser.ts | 20 +- src/compiler/utilities.ts | 396 +++++++++++------- .../tsconfig.json | 11 +- .../tsconfig.json | 3 +- .../checkJs/tsconfig.json | 3 +- .../composite/tsconfig.json | 4 +- .../isolatedModules/tsconfig.json | 3 +- .../module/tsconfig.json | 3 +- .../strict/tsconfig.json | 10 +- .../verbatimModuleSyntax/tsconfig.json | 4 +- 12 files changed, 315 insertions(+), 158 deletions(-) diff --git a/package-lock.json b/package-lock.json index 669a85602ca53..acdb7294e9421 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,7 @@ "playwright": "^1.38.0", "source-map-support": "^0.5.21", "tslib": "^2.5.0", - "typescript": "^5.3.2", + "typescript": "5.4.0-dev.20231206", "which": "^2.0.2" }, "engines": { @@ -3786,9 +3786,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.0-dev.20231206", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.0-dev.20231206.tgz", + "integrity": "sha512-bKJ5+3jwj4qTzNg7C97rCVLgyyYuzjYh/Pf0zlpOyyq9vpI3TVLO09d1gQ8jS5M+BSLONojTijei0KHmFoBezw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -6584,9 +6584,9 @@ } }, "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.0-dev.20231206", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.0-dev.20231206.tgz", + "integrity": "sha512-bKJ5+3jwj4qTzNg7C97rCVLgyyYuzjYh/Pf0zlpOyyq9vpI3TVLO09d1gQ8jS5M+BSLONojTijei0KHmFoBezw==", "dev": true }, "typical": { diff --git a/package.json b/package.json index bea908972e9a3..9ba0eab8cbe00 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "playwright": "^1.38.0", "source-map-support": "^0.5.21", "tslib": "^2.5.0", - "typescript": "^5.3.2", + "typescript": "5.4.0-dev.20231206", "which": "^2.0.2" }, "overrides": { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 64546188a88f4..decc8751453a6 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -15,6 +15,7 @@ import { CommandLineOptionOfListType, CompilerOptions, CompilerOptionsValue, + computedOptions, ConfigFileSpecs, containsPath, convertToRelativePath, @@ -103,6 +104,7 @@ import { removeTrailingDirectorySeparator, returnTrue, ScriptTarget, + some, startsWith, StringLiteral, SyntaxKind, @@ -2475,9 +2477,10 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi ), f => getRelativePathFromFile(getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName), ); - const optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); + const pathOptions = { configFilePath: getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }; + const optionMap = serializeCompilerOptions(configParseResult.options, pathOptions); const watchOptionMap = configParseResult.watchOptions && serializeWatchOptions(configParseResult.watchOptions); - const config = { + const config: TSConfig & { watchOptions?: object; } = { compilerOptions: { ...optionMapToObject(optionMap), showConfig: undefined, @@ -2500,6 +2503,19 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi } : {}), compileOnSave: !!configParseResult.compileOnSave ? true : undefined, }; + + const providedKeys = new Set(optionMap.keys()); + const impliedCompilerOptions: Record = {}; + for (const option in computedOptions) { + if (!providedKeys.has(option) && some(computedOptions[option as keyof typeof computedOptions].dependencies, dep => providedKeys.has(dep))) { + const implied = computedOptions[option as keyof typeof computedOptions].computeValue(configParseResult.options); + const defaultValue = computedOptions[option as keyof typeof computedOptions].computeValue({}); + if (implied !== defaultValue) { + impliedCompilerOptions[option] = computedOptions[option as keyof typeof computedOptions].computeValue(configParseResult.options); + } + } + } + assign(config.compilerOptions, optionMapToObject(serializeCompilerOptions(impliedCompilerOptions, pathOptions))); return config; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 68a538d7b9804..347be386b6b32 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -8587,52 +8587,270 @@ export function getSetExternalModuleIndicator(options: CompilerOptions): (file: } } -/** @internal */ -export function getEmitScriptTarget(compilerOptions: { module?: CompilerOptions["module"]; target?: CompilerOptions["target"]; }): ScriptTarget { - return compilerOptions.target ?? - ((compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || - (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || - ScriptTarget.ES5); +type CompilerOptionKeys = keyof { [K in keyof CompilerOptions as string extends K ? never : K]: any; }; +function createComputedCompilerOptions>( + options: { + [K in keyof T & CompilerOptionKeys | StrictOptionName]: { + dependencies: T[K]; + computeValue: (compilerOptions: Pick) => Exclude; + }; + }, +) { + return options; } /** @internal */ -export function getEmitModuleKind(compilerOptions: { module?: CompilerOptions["module"]; target?: CompilerOptions["target"]; }) { - return typeof compilerOptions.module === "number" ? - compilerOptions.module : - getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; -} +export const computedOptions = createComputedCompilerOptions({ + target: { + dependencies: ["module"], + computeValue: compilerOptions => { + return compilerOptions.target ?? + ((compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || + (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || + ScriptTarget.ES5); + }, + }, + module: { + dependencies: ["target"], + computeValue: (compilerOptions): ModuleKind => { + return typeof compilerOptions.module === "number" ? + compilerOptions.module : + computedOptions.target.computeValue(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; + }, + }, + moduleResolution: { + dependencies: ["module", "target"], + computeValue: (compilerOptions): ModuleResolutionKind => { + let moduleResolution = compilerOptions.moduleResolution; + if (moduleResolution === undefined) { + switch (computedOptions.module.computeValue(compilerOptions)) { + case ModuleKind.CommonJS: + moduleResolution = ModuleResolutionKind.Node10; + break; + case ModuleKind.Node16: + moduleResolution = ModuleResolutionKind.Node16; + break; + case ModuleKind.NodeNext: + moduleResolution = ModuleResolutionKind.NodeNext; + break; + default: + moduleResolution = ModuleResolutionKind.Classic; + break; + } + } + return moduleResolution; + }, + }, + moduleDetection: { + dependencies: ["module", "target"], + computeValue: (compilerOptions): ModuleDetectionKind => { + return compilerOptions.moduleDetection || + (computedOptions.module.computeValue(compilerOptions) === ModuleKind.Node16 || + computedOptions.module.computeValue(compilerOptions) === ModuleKind.NodeNext ? ModuleDetectionKind.Force : ModuleDetectionKind.Auto); + }, + }, + isolatedModules: { + dependencies: ["verbatimModuleSyntax"], + computeValue: compilerOptions => { + return !!(compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax); + }, + }, + esModuleInterop: { + dependencies: ["module", "target"], + computeValue: (compilerOptions): boolean => { + if (compilerOptions.esModuleInterop !== undefined) { + return compilerOptions.esModuleInterop; + } + switch (computedOptions.module.computeValue(compilerOptions)) { + case ModuleKind.Node16: + case ModuleKind.NodeNext: + return true; + } + return false; + }, + }, + allowSyntheticDefaultImports: { + dependencies: ["module", "target", "moduleResolution"], + computeValue: (compilerOptions): boolean => { + if (compilerOptions.allowSyntheticDefaultImports !== undefined) { + return compilerOptions.allowSyntheticDefaultImports; + } + return computedOptions.esModuleInterop.computeValue(compilerOptions) + || computedOptions.module.computeValue(compilerOptions) === ModuleKind.System + || computedOptions.moduleResolution.computeValue(compilerOptions) === ModuleResolutionKind.Bundler; + }, + }, + resolvePackageJsonExports: { + dependencies: ["moduleResolution"], + computeValue: (compilerOptions): boolean => { + const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions); + if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + return false; + } + if (compilerOptions.resolvePackageJsonExports !== undefined) { + return compilerOptions.resolvePackageJsonExports; + } + switch (moduleResolution) { + case ModuleResolutionKind.Node16: + case ModuleResolutionKind.NodeNext: + case ModuleResolutionKind.Bundler: + return true; + } + return false; + }, + }, + resolvePackageJsonImports: { + dependencies: ["moduleResolution", "resolvePackageJsonExports"], + computeValue: (compilerOptions): boolean => { + const moduleResolution = computedOptions.moduleResolution.computeValue(compilerOptions); + if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + return false; + } + if (compilerOptions.resolvePackageJsonExports !== undefined) { + return compilerOptions.resolvePackageJsonExports; + } + switch (moduleResolution) { + case ModuleResolutionKind.Node16: + case ModuleResolutionKind.NodeNext: + case ModuleResolutionKind.Bundler: + return true; + } + return false; + }, + }, + resolveJsonModule: { + dependencies: ["moduleResolution", "module", "target"], + computeValue: (compilerOptions): boolean => { + if (compilerOptions.resolveJsonModule !== undefined) { + return compilerOptions.resolveJsonModule; + } + return computedOptions.moduleResolution.computeValue(compilerOptions) === ModuleResolutionKind.Bundler; + }, + }, + declaration: { + dependencies: ["composite"], + computeValue: compilerOptions => { + return !!(compilerOptions.declaration || compilerOptions.composite); + }, + }, + preserveConstEnums: { + dependencies: ["isolatedModules", "verbatimModuleSyntax"], + computeValue: (compilerOptions): boolean => { + return !!(compilerOptions.preserveConstEnums || computedOptions.isolatedModules.computeValue(compilerOptions)); + }, + }, + incremental: { + dependencies: ["composite"], + computeValue: compilerOptions => { + return !!(compilerOptions.incremental || compilerOptions.composite); + }, + }, + declarationMap: { + dependencies: ["declaration", "composite"], + computeValue: (compilerOptions): boolean => { + return !!(compilerOptions.declarationMap && computedOptions.declaration.computeValue(compilerOptions)); + }, + }, + allowJs: { + dependencies: ["checkJs"], + computeValue: compilerOptions => { + return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs; + }, + }, + useDefineForClassFields: { + dependencies: ["target", "module"], + computeValue: (compilerOptions): boolean => { + return compilerOptions.useDefineForClassFields === undefined + ? computedOptions.target.computeValue(compilerOptions) >= ScriptTarget.ES2022 + : compilerOptions.useDefineForClassFields; + }, + }, + noImplicitAny: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "noImplicitAny"); + }, + }, + noImplicitThis: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "noImplicitThis"); + }, + }, + strictNullChecks: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "strictNullChecks"); + }, + }, + strictFunctionTypes: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "strictFunctionTypes"); + }, + }, + strictBindCallApply: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "strictBindCallApply"); + }, + }, + strictPropertyInitialization: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "strictPropertyInitialization"); + }, + }, + alwaysStrict: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "alwaysStrict"); + }, + }, + useUnknownInCatchVariables: { + dependencies: ["strict"], + computeValue: compilerOptions => { + return getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables"); + }, + }, +}); /** @internal */ -export function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind) { - return moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext; -} - +export const getEmitScriptTarget = computedOptions.target.computeValue; /** @internal */ -export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { - let moduleResolution = compilerOptions.moduleResolution; - if (moduleResolution === undefined) { - switch (getEmitModuleKind(compilerOptions)) { - case ModuleKind.CommonJS: - moduleResolution = ModuleResolutionKind.Node10; - break; - case ModuleKind.Node16: - moduleResolution = ModuleResolutionKind.Node16; - break; - case ModuleKind.NodeNext: - moduleResolution = ModuleResolutionKind.NodeNext; - break; - default: - moduleResolution = ModuleResolutionKind.Classic; - break; - } - } - return moduleResolution; -} +export const getEmitModuleKind = computedOptions.module.computeValue; +/** @internal */ +export const getEmitModuleResolutionKind = computedOptions.moduleResolution.computeValue; +/** @internal */ +export const getEmitModuleDetectionKind = computedOptions.moduleDetection.computeValue; +/** @internal */ +export const getIsolatedModules = computedOptions.isolatedModules.computeValue; +/** @internal */ +export const getESModuleInterop = computedOptions.esModuleInterop.computeValue; +/** @internal */ +export const getAllowSyntheticDefaultImports = computedOptions.allowSyntheticDefaultImports.computeValue; +/** @internal */ +export const getResolvePackageJsonExports = computedOptions.resolvePackageJsonExports.computeValue; +/** @internal */ +export const getResolvePackageJsonImports = computedOptions.resolvePackageJsonImports.computeValue; +/** @internal */ +export const getResolveJsonModule = computedOptions.resolveJsonModule.computeValue; +/** @internal */ +export const getEmitDeclarations = computedOptions.declaration.computeValue; +/** @internal */ +export const shouldPreserveConstEnums = computedOptions.preserveConstEnums.computeValue; +/** @internal */ +export const isIncrementalCompilation = computedOptions.incremental.computeValue; +/** @internal */ +export const getAreDeclarationMapsEnabled = computedOptions.declarationMap.computeValue; +/** @internal */ +export const getAllowJSCompilerOption = computedOptions.allowJs.computeValue; +/** @internal */ +export const getUseDefineForClassFields = computedOptions.useDefineForClassFields.computeValue; /** @internal */ -export function getEmitModuleDetectionKind(options: CompilerOptions) { - return options.moduleDetection || - (getEmitModuleKind(options) === ModuleKind.Node16 || getEmitModuleKind(options) === ModuleKind.NodeNext ? ModuleDetectionKind.Force : ModuleDetectionKind.Auto); +export function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind) { + return moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext; } /** @internal */ @@ -8652,11 +8870,6 @@ export function hasJsonModuleEmitEnabled(options: CompilerOptions) { } } -/** @internal */ -export function getIsolatedModules(options: CompilerOptions) { - return !!(options.isolatedModules || options.verbatimModuleSyntax); -} - /** @internal */ export function importNameElisionDisabled(options: CompilerOptions) { return options.verbatimModuleSyntax || options.isolatedModules && options.preserveValueImports; @@ -8672,34 +8885,6 @@ export function unusedLabelIsError(options: CompilerOptions): boolean { return options.allowUnusedLabels === false; } -/** @internal */ -export function getAreDeclarationMapsEnabled(options: CompilerOptions) { - return !!(getEmitDeclarations(options) && options.declarationMap); -} - -/** @internal */ -export function getESModuleInterop(compilerOptions: CompilerOptions) { - if (compilerOptions.esModuleInterop !== undefined) { - return compilerOptions.esModuleInterop; - } - switch (getEmitModuleKind(compilerOptions)) { - case ModuleKind.Node16: - case ModuleKind.NodeNext: - return true; - } - return undefined; -} - -/** @internal */ -export function getAllowSyntheticDefaultImports(compilerOptions: CompilerOptions) { - if (compilerOptions.allowSyntheticDefaultImports !== undefined) { - return compilerOptions.allowSyntheticDefaultImports; - } - return getESModuleInterop(compilerOptions) - || getEmitModuleKind(compilerOptions) === ModuleKind.System - || getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Bundler; -} - /** @internal */ export function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution: ModuleResolutionKind): boolean { return moduleResolution >= ModuleResolutionKind.Node16 && moduleResolution <= ModuleResolutionKind.NodeNext @@ -8712,65 +8897,6 @@ export function shouldResolveJsRequire(compilerOptions: CompilerOptions): boolea return !!compilerOptions.noDtsResolution || getEmitModuleResolutionKind(compilerOptions) !== ModuleResolutionKind.Bundler; } -/** @internal */ -export function getResolvePackageJsonExports(compilerOptions: CompilerOptions) { - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - return false; - } - if (compilerOptions.resolvePackageJsonExports !== undefined) { - return compilerOptions.resolvePackageJsonExports; - } - switch (moduleResolution) { - case ModuleResolutionKind.Node16: - case ModuleResolutionKind.NodeNext: - case ModuleResolutionKind.Bundler: - return true; - } - return false; -} - -/** @internal */ -export function getResolvePackageJsonImports(compilerOptions: CompilerOptions) { - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - return false; - } - if (compilerOptions.resolvePackageJsonExports !== undefined) { - return compilerOptions.resolvePackageJsonExports; - } - switch (moduleResolution) { - case ModuleResolutionKind.Node16: - case ModuleResolutionKind.NodeNext: - case ModuleResolutionKind.Bundler: - return true; - } - return false; -} - -/** @internal */ -export function getResolveJsonModule(compilerOptions: CompilerOptions) { - if (compilerOptions.resolveJsonModule !== undefined) { - return compilerOptions.resolveJsonModule; - } - return getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Bundler; -} - -/** @internal */ -export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean { - return !!(compilerOptions.declaration || compilerOptions.composite); -} - -/** @internal */ -export function shouldPreserveConstEnums(compilerOptions: CompilerOptions): boolean { - return !!(compilerOptions.preserveConstEnums || getIsolatedModules(compilerOptions)); -} - -/** @internal */ -export function isIncrementalCompilation(options: CompilerOptions) { - return !!(options.incremental || options.composite); -} - /** @internal */ export type StrictOptionName = | "noImplicitAny" @@ -8787,16 +8913,6 @@ export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: Str return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag]; } -/** @internal */ -export function getAllowJSCompilerOption(compilerOptions: CompilerOptions): boolean { - return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs; -} - -/** @internal */ -export function getUseDefineForClassFields(compilerOptions: CompilerOptions): boolean { - return compilerOptions.useDefineForClassFields === undefined ? getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2022 : compilerOptions.useDefineForClassFields; -} - /** @internal */ export function getEmitStandardClassFields(compilerOptions: CompilerOptions) { return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2022; diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json index 373e81d1f75f3..27dff8d0b2c57 100644 --- a/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json @@ -3,7 +3,16 @@ "esModuleInterop": true, "target": "es5", "module": "commonjs", - "strict": true + "strict": true, + "allowSyntheticDefaultImports": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "alwaysStrict": true, + "useUnknownInCatchVariables": true }, "references": [ { diff --git a/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json index 30bcbb4fdd08b..28b3bd38f3d6c 100644 --- a/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json @@ -25,7 +25,8 @@ }, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true }, "include": [ "./src/**/*" diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json index 21d7a1d2268bf..5e4dbf3f63b2a 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "checkJs": true + "checkJs": true, + "allowJs": true } } diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json index 664df5f6051d5..67f3febd08537 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json @@ -1,5 +1,7 @@ { "compilerOptions": { - "composite": true + "composite": true, + "declaration": true, + "incremental": true } } diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json index 78df38c543900..8c42fc0fc0eaa 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "isolatedModules": true + "isolatedModules": true, + "preserveConstEnums": true } } diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json index e7f1c93b4ccb7..6bd841bcf3291 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "module": "none" + "module": "none", + "moduleResolution": "classic" } } diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json index 8dc142972f830..a94c9ac06ee71 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json @@ -1,5 +1,13 @@ { "compilerOptions": { - "strict": true + "strict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "alwaysStrict": true, + "useUnknownInCatchVariables": true } } diff --git a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/verbatimModuleSyntax/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/verbatimModuleSyntax/tsconfig.json index 5e2760d642d02..33dd85cb767d5 100644 --- a/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/verbatimModuleSyntax/tsconfig.json +++ b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/verbatimModuleSyntax/tsconfig.json @@ -1,5 +1,7 @@ { "compilerOptions": { - "verbatimModuleSyntax": true + "verbatimModuleSyntax": true, + "isolatedModules": true, + "preserveConstEnums": true } }