From ac455d8ca0fc5829d1b46dae9b6e37cf5bd079eb Mon Sep 17 00:00:00 2001 From: Neal B Date: Thu, 24 Oct 2019 00:51:49 +0200 Subject: [PATCH 01/10] Add Advanced Compile Options to --init command --- src/compiler/commandLineParser.ts | 24 +-- src/compiler/diagnosticMessages.json | 4 + .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 143 +++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- .../tsconfig.json | 140 ++++++++++------- 11 files changed, 817 insertions(+), 474 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 596f8651500ae..4b73a144bf0fb 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -103,6 +103,14 @@ namespace ts { category: Diagnostics.Command_line_Options, description: Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen, }, + { + name: "incremental", + shortName: "i", + type: "boolean", + category: Diagnostics.Basic_Options, + description: Diagnostics.Enable_incremental_compilation, + transpileOptionValue: undefined + }, { name: "listFiles", type: "boolean", @@ -149,14 +157,6 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Generates_a_CPU_profile }, - { - name: "incremental", - shortName: "i", - type: "boolean", - category: Diagnostics.Basic_Options, - description: Diagnostics.Enable_incremental_compilation, - transpileOptionValue: undefined - }, { name: "locale", type: "string", @@ -1968,12 +1968,10 @@ namespace ts { return Array(paddingLength + 1).join(" "); } - function isAllowedOption({ category, name }: CommandLineOption): boolean { + function isAllowedOption({ category }: CommandLineOption): boolean { // Skip options which do not have a category or have category `Command_line_Options` - // Exclude all possible `Advanced_Options` in tsconfig.json which were NOT defined in command line return category !== undefined - && category !== Diagnostics.Command_line_Options - && (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name)); + && category !== Diagnostics.Command_line_Options; } function writeConfigurations() { @@ -2018,6 +2016,8 @@ namespace ts { const result: string[] = []; result.push(`{`); result.push(`${tab}"compilerOptions": {`); + result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Overview_of_all_Compiler_Options_Colon_https_Colon_Slash_Slashwww_typescriptlang_org_Slashdocs_Slashhandbook_Slashcompiler_options_html)} */`); + result.push(""); // Print out each row, aligning all the descriptions on the same column. for (let i = 0; i < nameColumn.length; i++) { const optionName = nameColumn[i]; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 100d1a55a0b36..9fa5053b2fdbb 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -5290,5 +5290,9 @@ "JSX expressions may not use the comma operator. Did you mean to write an array?": { "category": "Error", "code": 18007 + }, + "Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html": { + "category": "Message", + "code": 95096 } } diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 3eb89bed8cea2..dc3699c42bf2b 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index f7f82da7ea267..58731eeda3abc 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -1,69 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + "declarationDir": "lib", /* Output directory for generated declaration files. */ + "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "noErrorTruncation": true, /* Do not truncate error messages. */ - "declarationDir": "lib", /* Output directory for generated declaration files. */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index f0d6467e0226f..e5ce6cdb94db4 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 25301f97f56e1..c772f3801f052 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 84e7cf80acf20..b271ad95f48c0 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -1,67 +1,105 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, "files": [ "file0.st", diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 8b56a517a12b8..5617383486190 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 3eb89bed8cea2..dc3699c42bf2b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 7812841836134..66ff0626501b1 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 1d128c51db5b3..429055a7b7efa 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -1,66 +1,104 @@ { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Advanced Options */ + // "listFiles": true, /* Print names of files part of the compilation. */ + // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ + // "traceResolution": true, /* Enable tracing of the name resolution process. */ + // "diagnostics": true, /* Show diagnostic information. */ + // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ + // "generateCpuProfile": "./", /* Generates a CPU profile. */ + // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ + // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ + // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ + // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ + // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ + // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ + // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ + // "charset": "", /* The character set of the input files. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ + // "noErrorTruncation": true, /* Do not truncate error messages. */ + // "noLib": true, /* Do not include the default library file (lib.d.ts). */ + // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ + // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ + // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ + // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ + // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ + // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ + // "declarationDir": "./", /* Output directory for generated declaration files. */ + // "skipLibCheck": true, /* Skip type checking of declaration files. */ + // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ + // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ + // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ + // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ + // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ + // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ + // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["jquery","mocha"], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": ["jquery","mocha"], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ } } From 99cc0436a0355c0a8496b1e69d9f69165a587d3c Mon Sep 17 00:00:00 2001 From: Neal B Date: Fri, 25 Oct 2019 11:06:23 +0200 Subject: [PATCH 02/10] removed advanced options and descriptioncolumn --- src/compiler/commandLineParser.ts | 15 +- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 141 +++++++----------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- .../tsconfig.json | 138 +++++++---------- 10 files changed, 467 insertions(+), 793 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4b73a144bf0fb..c742834ee307b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1968,10 +1968,11 @@ namespace ts { return Array(paddingLength + 1).join(" "); } - function isAllowedOption({ category }: CommandLineOption): boolean { + function isAllowedOption({ category, name }: CommandLineOption): boolean { // Skip options which do not have a category or have category `Command_line_Options` return category !== undefined - && category !== Diagnostics.Command_line_Options; + && category !== Diagnostics.Command_line_Options + && (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name));; } function writeConfigurations() { @@ -1989,14 +1990,11 @@ namespace ts { let marginLength = 0; let seenKnownKeys = 0; const nameColumn: string[] = []; - const descriptionColumn: string[] = []; categorizedOptions.forEach((options, category) => { if (nameColumn.length !== 0) { nameColumn.push(""); - descriptionColumn.push(""); } nameColumn.push(`/* ${category} */`); - descriptionColumn.push(""); for (const option of options) { let optionName; if (compilerOptionsMap.has(option.name)) { @@ -2006,7 +2004,6 @@ namespace ts { optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; } nameColumn.push(optionName); - descriptionColumn.push(`/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */`); marginLength = Math.max(optionName.length, marginLength); } }); @@ -2019,10 +2016,8 @@ namespace ts { result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Overview_of_all_Compiler_Options_Colon_https_Colon_Slash_Slashwww_typescriptlang_org_Slashdocs_Slashhandbook_Slashcompiler_options_html)} */`); result.push(""); // Print out each row, aligning all the descriptions on the same column. - for (let i = 0; i < nameColumn.length; i++) { - const optionName = nameColumn[i]; - const description = descriptionColumn[i]; - result.push(optionName && `${tab}${tab}${optionName}${description && (makePadding(marginLength - optionName.length + 2) + description)}`); + for (const optionName of nameColumn) { + result.push(optionName && `${tab}${tab}${optionName}`); } if (fileNames.length) { result.push(`${tab}},`); diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index dc3699c42bf2b..c3bec99bb1a32 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 58731eeda3abc..65d37466ea089 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -3,102 +3,69 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - "declarationDir": "lib", /* Output directory for generated declaration files. */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "noErrorTruncation": true, + "declarationDir": "lib", + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index e5ce6cdb94db4..e1fe409090ef3 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index c772f3801f052..f2f4ed80786e4 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + "jsx": "react", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index b271ad95f48c0..1700dae6f7093 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -3,103 +3,67 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true }, "files": [ "file0.st", diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 5617383486190..05fe84910b0bb 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + "lib": ["es5","es2015.promise"], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index dc3699c42bf2b..c3bec99bb1a32 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 66ff0626501b1..e7eecad166e58 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + "lib": ["es5","es2015.core"], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 429055a7b7efa..02d4c02f8643c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -3,102 +3,66 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Advanced Options */ - // "listFiles": true, /* Print names of files part of the compilation. */ - // "listEmittedFiles": true, /* Print names of generated files part of the compilation. */ - // "traceResolution": true, /* Enable tracing of the name resolution process. */ - // "diagnostics": true, /* Show diagnostic information. */ - // "extendedDiagnostics": true, /* Show verbose diagnostic information. */ - // "generateCpuProfile": "./", /* Generates a CPU profile. */ - // "locale": "", /* The locale used when displaying messages to the user (e.g. 'en-us') */ - // "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */ - // "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */ - // "resolveJsonModule": true, /* Include modules imported with '.json' extension */ - // "out": "", /* [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file */ - // "reactNamespace": "", /* [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit */ - // "skipDefaultLibCheck": true, /* [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files. */ - // "charset": "", /* The character set of the input files. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */ - // "noErrorTruncation": true, /* Do not truncate error messages. */ - // "noLib": true, /* Do not include the default library file (lib.d.ts). */ - // "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */ - // "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */ - // "disableSizeLimit": true, /* Disable size limitations on JavaScript projects. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable use of source files instead of declaration files from referenced projects. */ - // "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */ - // "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */ - // "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */ - // "declarationDir": "./", /* Output directory for generated declaration files. */ - // "skipLibCheck": true, /* Skip type checking of declaration files. */ - // "allowUnusedLabels": true, /* Do not report errors on unused labels. */ - // "allowUnreachableCode": true, /* Do not report errors on unreachable code. */ - // "suppressExcessPropertyErrors": true, /* Suppress excess property checks for object literals. */ - // "suppressImplicitAnyIndexErrors": true, /* Suppress noImplicitAny errors for indexing objects lacking index signatures. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - // "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */ - // "noStrictGenericChecks": true, /* Disable strict checking of generic signatures in function types. */ - // "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */ - // "keyofStringsOnly": true, /* Resolve 'keyof' to string valued property names only (no numbers or symbols). */ + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["jquery","mocha"], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + "types": ["jquery","mocha"], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true } } From 440ac989288bd99e11e8bcd9fc6695cb03c31f8a Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Fri, 20 Mar 2020 17:49:41 +0100 Subject: [PATCH 03/10] tests: fix tsconfig.json baselines --- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- .../tsconfig.json | 41 ++++++++++--------- 9 files changed, 189 insertions(+), 180 deletions(-) diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 7222531ef768f..cef01d483ddb4 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 666402c5b6158..64826615cb726 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index f3fe684a802fa..cb505d5857f89 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index b8c273a226d18..ec18e71bc02f2 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + "jsx": "react", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index c19ccde528e99..4cf12e4e06d4c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 4d32ef0e561a6..a3a9d08862d34 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + "lib": ["es5","es2015.promise"], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 7222531ef768f..cef01d483ddb4 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 8d0d037e66876..679755d50269a 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + "lib": ["es5","es2015.core"], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 4478c9b7bed89..bd841af51be2c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -3,26 +3,27 @@ /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "commonjs", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ "strict": true, From 80d8e4062189693eed19111d6671701b8e1a7cda Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Fri, 20 Mar 2020 18:11:38 +0100 Subject: [PATCH 04/10] tests: fix failing tests --- .../declarationDir-is-specified.js | 103 +++++++++--------- ...-outDir-and-declarationDir-is-specified.js | 103 +++++++++--------- .../when-outDir-is-specified.js | 101 ++++++++--------- .../with-outFile.js | 101 ++++++++--------- .../without-outDir-or-outFile-is-specified.js | 101 ++++++++--------- 5 files changed, 262 insertions(+), 247 deletions(-) diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index 36c9d0609c14f..1412e70d81c68 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -21,69 +21,72 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "amd", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, /* Advanced Options */ - "declarationDir": "decls", /* Output directory for generated declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "declarationDir": "decls", + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index f755ab350ecce..786b9772d87d1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -21,69 +21,72 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "build", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "amd", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + "outDir": "build", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, /* Advanced Options */ - "declarationDir": "decls", /* Output directory for generated declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "declarationDir": "decls", + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 933745206f23a..03b433b5734e8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -21,68 +21,71 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "build", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "amd", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + "outDir": "build", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index 9bb54d9380e23..c8b6eac2a66db 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -21,68 +21,71 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - "outFile": "build/outFile.js", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "amd", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + "outFile": "build/outFile.js", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index 158a39b488077..ee1908541ef90 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -21,68 +21,71 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { + /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + // "incremental": true, + // "incremental": true, + "target": "es5", + "module": "amd", + // "lib": [], + // "allowJs": true, + // "checkJs": true, + // "jsx": "preserve", + // "declaration": true, + // "declarationMap": true, + // "sourceMap": true, + // "outFile": "./", + // "outDir": "./", + // "rootDir": "./", + // "composite": true, + // "tsBuildInfoFile": "./", + // "removeComments": true, + // "noEmit": true, + // "importHelpers": true, + // "downlevelIteration": true, + // "isolatedModules": true, /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + "strict": true, + // "noImplicitAny": true, + // "strictNullChecks": true, + // "strictFunctionTypes": true, + // "strictBindCallApply": true, + // "strictPropertyInitialization": true, + // "noImplicitThis": true, + // "alwaysStrict": true, /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noImplicitReturns": true, + // "noFallthroughCasesInSwitch": true, /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleResolution": "node", + // "baseUrl": "./", + // "paths": {}, + // "rootDirs": [], + // "typeRoots": [], + // "types": [], + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + // "preserveSymlinks": true, + // "allowUmdGlobalAccess": true, /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + // "sourceRoot": "", + // "mapRoot": "", + // "inlineSourceMap": true, + // "inlineSources": true, /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, + // "emitDecoratorMetadata": true, /* Advanced Options */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true } } From f166f9d40a7963bbea0643befdcea1db2f29200b Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Fri, 20 Mar 2020 18:34:23 +0100 Subject: [PATCH 05/10] feat: adjusted link to specification --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticMessages.json | 9 ++++----- .../tsConfig/Default initialized TSConfig/tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.json | 2 +- .../declarationDir-is-specified.js | 2 +- .../when-outDir-and-declarationDir-is-specified.js | 2 +- .../when-outDir-is-specified.js | 2 +- .../with-outFile.js | 2 +- .../without-outDir-or-outFile-is-specified.js | 2 +- 16 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index aa4de19045c36..6f071b1d66a78 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2159,7 +2159,7 @@ namespace ts { const result: string[] = []; result.push(`{`); result.push(`${tab}"compilerOptions": {`); - result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Overview_of_all_Compiler_Options_Colon_https_Colon_Slash_Slashwww_typescriptlang_org_Slashdocs_Slashhandbook_Slashcompiler_options_html)} */`); + result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file)} */`); result.push(""); // Print out each row, aligning all the descriptions on the same column. for (const optionName of nameColumn) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8e814699a3e8c..8e934d9b2b0f0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -5561,7 +5561,10 @@ "category": "Message", "code": 95109 }, - + "Visit https://aka.ms/tsconfig.json to read more about this file": { + "category": "Message", + "code": 95110 + }, "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": { "category": "Error", "code": 18004 @@ -5649,9 +5652,5 @@ "An optional chain cannot contain private identifiers.": { "category": "Error", "code": 18030 - }, - "Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html": { - "category": "Message", - "code": 18031 } } diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index cef01d483ddb4..43eb3863814f3 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 64826615cb726..e7e24694b1b26 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index cb505d5857f89..07e63b5e00898 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index ec18e71bc02f2..f5e56acfc9adc 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 4cf12e4e06d4c..fe466dc32a0e7 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index a3a9d08862d34..8f5d469733d58 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index cef01d483ddb4..43eb3863814f3 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 679755d50269a..209f00a30563a 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index bd841af51be2c..1c91f04b02708 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index 1412e70d81c68..638467f2a8791 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -21,7 +21,7 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 786b9772d87d1..95d084b58f461 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -21,7 +21,7 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 03b433b5734e8..0672d45475a4a 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -21,7 +21,7 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index c8b6eac2a66db..ceece5715926e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -21,7 +21,7 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index ee1908541ef90..bcd36fae600e1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -21,7 +21,7 @@ interface Array { length: number; [n: number]: T; } //// [/user/username/projects/myproject/tsconfig.json] { "compilerOptions": { - /* Overview of all Compiler Options: https://www.typescriptlang.org/docs/handbook/compiler-options.html */ + /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ // "incremental": true, From e0a0d65db7cb7b4f3c0c2cc86cb406cd4a6adde0 Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Fri, 20 Mar 2020 19:02:28 +0100 Subject: [PATCH 06/10] fix: removed duplicate increment flag --- src/compiler/commandLineParser.ts | 8 -------- .../tsConfig/Default initialized TSConfig/tsconfig.json | 1 - .../tsconfig.json | 1 - .../tsconfig.json | 1 - .../tsconfig.json | 1 - .../Initialized TSConfig with files options/tsconfig.json | 1 - .../tsconfig.json | 1 - .../tsconfig.json | 1 - .../tsconfig.json | 1 - .../tsconfig.json | 1 - .../declarationDir-is-specified.js | 1 - .../when-outDir-and-declarationDir-is-specified.js | 1 - .../when-outDir-is-specified.js | 1 - .../with-outFile.js | 1 - .../without-outDir-or-outFile-is-specified.js | 1 - 15 files changed, 22 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 6f071b1d66a78..73de8ebfd82a2 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -204,14 +204,6 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Generates_a_CPU_profile }, - { - name: "incremental", - shortName: "i", - type: "boolean", - category: Diagnostics.Basic_Options, - description: Diagnostics.Enable_incremental_compilation, - transpileOptionValue: undefined - }, { name: "assumeChangesOnlyAffectDirectDependencies", type: "boolean", diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 43eb3863814f3..3c73e22404f53 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index e7e24694b1b26..4d339b33f2758 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 07e63b5e00898..f532e2fb27bc4 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index f5e56acfc9adc..39b5e63975b5d 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index fe466dc32a0e7..c92e0887fecec 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 8f5d469733d58..4448886e8d8c2 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", "lib": ["es5","es2015.promise"], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 43eb3863814f3..3c73e22404f53 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 209f00a30563a..c8feb5f57060f 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", "lib": ["es5","es2015.core"], diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 1c91f04b02708..234bebae2dd06 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -4,7 +4,6 @@ /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "commonjs", // "lib": [], diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index 638467f2a8791..ccca2679820f8 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -25,7 +25,6 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "amd", // "lib": [], diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 95d084b58f461..593021e987132 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -25,7 +25,6 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "amd", // "lib": [], diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 0672d45475a4a..37a1762d2203a 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -25,7 +25,6 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "amd", // "lib": [], diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index ceece5715926e..0fe80215d0b11 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -25,7 +25,6 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "amd", // "lib": [], diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index bcd36fae600e1..c6194db6a502e 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -25,7 +25,6 @@ interface Array { length: number; [n: number]: T; } /* Basic Options */ // "incremental": true, - // "incremental": true, "target": "es5", "module": "amd", // "lib": [], From a6d53aecdfe9301c84122bf167829b7dadc19339 Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Fri, 20 Mar 2020 19:52:20 +0100 Subject: [PATCH 07/10] chore: moved position back --- src/compiler/commandLineParser.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 73de8ebfd82a2..ad4a8b08469e8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -150,14 +150,6 @@ namespace ts { category: Diagnostics.Command_line_Options, description: Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen, }, - { - name: "incremental", - shortName: "i", - type: "boolean", - category: Diagnostics.Basic_Options, - description: Diagnostics.Enable_incremental_compilation, - transpileOptionValue: undefined - }, { name: "listFiles", type: "boolean", @@ -204,6 +196,14 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Generates_a_CPU_profile }, + { + name: "incremental", + shortName: "i", + type: "boolean", + category: Diagnostics.Basic_Options, + description: Diagnostics.Enable_incremental_compilation, + transpileOptionValue: undefined + }, { name: "assumeChangesOnlyAffectDirectDependencies", type: "boolean", From 6ef2ba2d6d8fdc167669cee43cd984f0811a2a3b Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Sat, 28 Mar 2020 12:56:48 +0100 Subject: [PATCH 08/10] return of the comments --- src/compiler/commandLineParser.ts | 11 +- .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 106 ++++++------- .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../tsconfig.json | 100 ++++++------ .../declarationDir-is-specified.js | 150 +++++++++++------- ...-outDir-and-declarationDir-is-specified.js | 150 +++++++++++------- .../when-outDir-is-specified.js | 136 +++++++++------- .../with-outFile.js | 136 +++++++++------- .../without-outDir-or-outFile-is-specified.js | 136 +++++++++------- 15 files changed, 902 insertions(+), 723 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ad4a8b08469e8..ac63aa54e59e8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2110,7 +2110,7 @@ namespace ts { // Skip options which do not have a category or have category `Command_line_Options` return category !== undefined && category !== Diagnostics.Command_line_Options - && (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name));; + && (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name)); } function writeConfigurations() { @@ -2128,9 +2128,11 @@ namespace ts { let marginLength = 0; let seenKnownKeys = 0; const nameColumn: string[] = []; + const descriptionColumn: string[] = []; categorizedOptions.forEach((options, category) => { if (nameColumn.length !== 0) { nameColumn.push(""); + descriptionColumn.push(""); } nameColumn.push(`/* ${category} */`); for (const option of options) { @@ -2142,6 +2144,7 @@ namespace ts { optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; } nameColumn.push(optionName); + descriptionColumn.push(`/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */`); marginLength = Math.max(optionName.length, marginLength); } }); @@ -2154,8 +2157,10 @@ namespace ts { result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file)} */`); result.push(""); // Print out each row, aligning all the descriptions on the same column. - for (const optionName of nameColumn) { - result.push(optionName && `${tab}${tab}${optionName}`); + for (let i = 0; i < nameColumn.length; i++) { + const optionName = nameColumn[i]; + const description = descriptionColumn[i]; + result.push(optionName && `${tab}${tab}${optionName}${description && (makePadding(marginLength - optionName.length + 2) + description)}`); } if (fileNames.length) { result.push(`${tab}},`); diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 3c73e22404f53..be8682d4e865e 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 4d339b33f2758..666b8582f038a 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -2,70 +2,70 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Do not truncate error messages. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */ /* Skip type checking of declaration files. */ + // "experimentalDecorators": true, /* Disallow inconsistently-cased references to the same file. */ + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "noErrorTruncation": true, - "declarationDir": "lib", - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "noErrorTruncation": true,undefined + "declarationDir": "lib",undefined + "skipLibCheck": true,undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index f532e2fb27bc4..2212a7382d2db 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 39b5e63975b5d..edef388dfc25e 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - "jsx": "react", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "jsx": "react", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index c92e0887fecec..d2a40605d3df8 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -2,68 +2,68 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined }, "files": [ "file0.st", diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 4448886e8d8c2..113ba45d7387e 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - "lib": ["es5","es2015.promise"], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + "lib": ["es5","es2015.promise"], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 3c73e22404f53..be8682d4e865e 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index c8feb5f57060f..ff1fd9addf86b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - "lib": ["es5","es2015.core"], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + "lib": ["es5","es2015.core"], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 234bebae2dd06..a19ea2c5be475 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "commonjs", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "commonjs", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - "types": ["jquery","mocha"], + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + "types": ["jquery","mocha"], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index ccca2679820f8..b63f2224819ea 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -23,69 +23,69 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "amd", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "amd", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, - - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Output directory for generated declaration files. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "declarationDir": "decls", - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "declarationDir": "decls",undefined + "forceConsistentCasingInFileNames": trueundefined } } @@ -122,12 +122,54 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -[12:00:40 AM] Found 0 errors. Watching for file changes. +tsconfig.json:61:31 - error TS1136: Property assignment expected. + +61 /* Experimental Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1005: ',' expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1136: Property assignment expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:66:5 - error TS1005: ',' expected. + +66 "declarationDir": "decls",undefined +   ~~~~~~~~~~~~~~~~ + + +tsconfig.json:66:31 - error TS1136: Property assignment expected. + +66 "declarationDir": "decls",undefined +   ~~~~~~~~~ + + +tsconfig.json:67:5 - error TS1005: ',' expected. + +67 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +tsconfig.json:67:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. + +67 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~ + + +[12:00:40 AM] Found 7 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"declaration":true,"strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 593021e987132..5f4f78a1cb63a 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -23,69 +23,69 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "amd", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - "outDir": "build", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "amd", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + "outDir": "build", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, - - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Output directory for generated declaration files. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "declarationDir": "decls", - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "declarationDir": "decls",undefined + "forceConsistentCasingInFileNames": trueundefined } } @@ -122,12 +122,54 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -[12:00:46 AM] Found 0 errors. Watching for file changes. +tsconfig.json:61:31 - error TS1136: Property assignment expected. + +61 /* Experimental Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1005: ',' expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1136: Property assignment expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:66:5 - error TS1005: ',' expected. + +66 "declarationDir": "decls",undefined +   ~~~~~~~~~~~~~~~~ + + +tsconfig.json:66:31 - error TS1136: Property assignment expected. + +66 "declarationDir": "decls",undefined +   ~~~~~~~~~ + + +tsconfig.json:67:5 - error TS1005: ',' expected. + +67 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +tsconfig.json:67:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. + +67 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~ + + +[12:00:46 AM] Found 7 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 37a1762d2203a..ae97799cbacc3 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "amd", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - "outDir": "build", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "amd", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + "outDir": "build", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, - - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } @@ -113,12 +113,42 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -[12:00:36 AM] Found 0 errors. Watching for file changes. +tsconfig.json:61:31 - error TS1136: Property assignment expected. + +61 /* Experimental Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1005: ',' expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1136: Property assignment expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:66:5 - error TS1005: ',' expected. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~ + + +[12:00:36 AM] Found 5 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index 0fe80215d0b11..6c2adeedcd898 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "amd", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - "outFile": "build/outFile.js", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "amd", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + "outFile": "build/outFile.js", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, - - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } @@ -110,12 +110,42 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -[12:00:31 AM] Found 0 errors. Watching for file changes. +tsconfig.json:61:31 - error TS1136: Property assignment expected. + +61 /* Experimental Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1005: ',' expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1136: Property assignment expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:66:5 - error TS1005: ',' expected. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~ + + +[12:00:31 AM] Found 5 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index c6194db6a502e..6613c706119b6 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, - "target": "es5", - "module": "amd", - // "lib": [], - // "allowJs": true, - // "checkJs": true, - // "jsx": "preserve", - // "declaration": true, - // "declarationMap": true, - // "sourceMap": true, - // "outFile": "./", - // "outDir": "./", - // "rootDir": "./", - // "composite": true, - // "tsBuildInfoFile": "./", - // "removeComments": true, - // "noEmit": true, - // "importHelpers": true, - // "downlevelIteration": true, + /* Basic Options */ /* Enable incremental compilation */ + // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "amd", /* Specify library files to be included in the compilation. */ + // "lib": [], /* Allow javascript files to be compiled. */ + // "allowJs": true, /* Report errors in .js files. */ + // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ + // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates corresponding '.map' file. */ + // "sourceMap": true, /* Concatenate and emit output to single file. */ + // "outFile": "./", /* Redirect output structure to the directory. */ + // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "rootDir": "./", /* Enable project compilation */ + // "composite": true, /* Specify file to store incremental compilation information */ + // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ + // "removeComments": true, /* Do not emit outputs. */ + // "noEmit": true, /* Import emit helpers from 'tslib'. */ + // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, - /* Strict Type-Checking Options */ - "strict": true, - // "noImplicitAny": true, - // "strictNullChecks": true, - // "strictFunctionTypes": true, - // "strictBindCallApply": true, - // "strictPropertyInitialization": true, + /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable strict null checks. */ + // "noImplicitAny": true, /* Enable strict checking of function types. */ + // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ + // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ // "noImplicitThis": true, - // "alwaysStrict": true, + // "alwaysStrict": true, /* Report errors on unused locals. */ - /* Additional Checks */ - // "noUnusedLocals": true, + /* Additional Checks */ /* Report error when not all code paths in function return a value. */ + // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ // "noUnusedParameters": true, - // "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, - - /* Module Resolution Options */ - // "moduleResolution": "node", - // "baseUrl": "./", - // "paths": {}, - // "rootDirs": [], - // "typeRoots": [], - // "types": [], + // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + + /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "moduleResolution": "node", /* List of folders to include type definitions from. */ + // "baseUrl": "./", /* Type declaration files to be included in compilation. */ + // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "typeRoots": [], /* Do not resolve the real path of symlinks. */ + // "types": [], /* Allow accessing UMD globals from modules. */ // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // "preserveSymlinks": true, - // "allowUmdGlobalAccess": true, + "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ + // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ /* Source Map Options */ - // "sourceRoot": "", - // "mapRoot": "", + // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ + // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ // "inlineSourceMap": true, - // "inlineSources": true, + // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ - /* Experimental Options */ - // "experimentalDecorators": true, - // "emitDecoratorMetadata": true, + /* Experimental Options */undefined + // "experimentalDecorators": true,undefined + // "emitDecoratorMetadata": true,undefined - /* Advanced Options */ - "forceConsistentCasingInFileNames": true + /* Advanced Options */undefined + "forceConsistentCasingInFileNames": trueundefined } } @@ -113,12 +113,42 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -[12:00:30 AM] Found 0 errors. Watching for file changes. +tsconfig.json:61:31 - error TS1136: Property assignment expected. + +61 /* Experimental Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1005: ',' expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:65:27 - error TS1136: Property assignment expected. + +65 /* Advanced Options */undefined +   ~~~~~~~~~ + + +tsconfig.json:66:5 - error TS1005: ',' expected. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. + +66 "forceConsistentCasingInFileNames": trueundefined +   ~~~~~~~~~~~~~ + + +[12:00:30 AM] Found 5 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts From 28c0040678256a08491973b2ec15a756696a1f25 Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Sat, 28 Mar 2020 23:40:11 +0100 Subject: [PATCH 09/10] fix for missalignment --- src/compiler/commandLineParser.ts | 23 ++- .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 116 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../tsconfig.json | 110 ++++++------ .../declarationDir-is-specified.js | 168 +++++++----------- ...-outDir-and-declarationDir-is-specified.js | 168 +++++++----------- .../when-outDir-is-specified.js | 150 +++++++--------- .../with-outFile.js | 150 +++++++--------- .../without-outDir-or-outFile-is-specified.js | 150 +++++++--------- 15 files changed, 815 insertions(+), 990 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ac63aa54e59e8..f5ae95be19c2d 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2127,14 +2127,12 @@ namespace ts { // Serialize all options and their descriptions let marginLength = 0; let seenKnownKeys = 0; - const nameColumn: string[] = []; - const descriptionColumn: string[] = []; + const entries: { value: string, description?: string }[] = []; categorizedOptions.forEach((options, category) => { - if (nameColumn.length !== 0) { - nameColumn.push(""); - descriptionColumn.push(""); + if (entries.length !== 0) { + entries.push({ value: "" }); } - nameColumn.push(`/* ${category} */`); + entries.push({ value: `/* ${category} */` }); for (const option of options) { let optionName; if (compilerOptionsMap.has(option.name)) { @@ -2143,8 +2141,10 @@ namespace ts { else { optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; } - nameColumn.push(optionName); - descriptionColumn.push(`/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */`); + entries.push({ + value: optionName, + description: `/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */` + }); marginLength = Math.max(optionName.length, marginLength); } }); @@ -2157,10 +2157,9 @@ namespace ts { result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file)} */`); result.push(""); // Print out each row, aligning all the descriptions on the same column. - for (let i = 0; i < nameColumn.length; i++) { - const optionName = nameColumn[i]; - const description = descriptionColumn[i]; - result.push(optionName && `${tab}${tab}${optionName}${description && (makePadding(marginLength - optionName.length + 2) + description)}`); + for (const entry of entries) { + const { value, description = "" } = entry; + result.push(value && `${tab}${tab}${value}${description && (makePadding(marginLength - value.length + 2) + description)}`); } if (fileNames.length) { result.push(`${tab}},`); diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index be8682d4e865e..d4decd1da4af6 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 666b8582f038a..83893736515ea 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -2,70 +2,70 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Do not truncate error messages. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ /* Skip type checking of declaration files. */ - // "experimentalDecorators": true, /* Disallow inconsistently-cased references to the same file. */ - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "noErrorTruncation": true,undefined - "declarationDir": "lib",undefined - "skipLibCheck": true,undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "noErrorTruncation": true, /* Do not truncate error messages. */ + "declarationDir": "lib", /* Output directory for generated declaration files. */ + "skipLibCheck": true, /* Skip type checking of declaration files. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 2212a7382d2db..1ce0b81d19289 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index edef388dfc25e..0569b5469962a 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "jsx": "react", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index d2a40605d3df8..d4bd5c32c52cc 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -2,68 +2,68 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, "files": [ "file0.st", diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index 113ba45d7387e..94b36f0dcf31b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - "lib": ["es5","es2015.promise"], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "lib": ["es5","es2015.promise"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index be8682d4e865e..d4decd1da4af6 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index ff1fd9addf86b..814e985a98202 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - "lib": ["es5","es2015.core"], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "lib": ["es5","es2015.core"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index a19ea2c5be475..6ef0e3a101bac 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -2,67 +2,67 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "commonjs", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - "types": ["jquery","mocha"], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": ["jquery","mocha"], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index b63f2224819ea..0b0bdfd343a50 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -23,69 +23,69 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "amd", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, - - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ - - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Output directory for generated declaration files. */ - - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined - - /* Advanced Options */undefined - "declarationDir": "decls",undefined - "forceConsistentCasingInFileNames": trueundefined + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "declarationDir": "decls", /* Output directory for generated declaration files. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } @@ -122,54 +122,12 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -tsconfig.json:61:31 - error TS1136: Property assignment expected. - -61 /* Experimental Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1005: ',' expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1136: Property assignment expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:66:5 - error TS1005: ',' expected. - -66 "declarationDir": "decls",undefined -   ~~~~~~~~~~~~~~~~ - - -tsconfig.json:66:31 - error TS1136: Property assignment expected. - -66 "declarationDir": "decls",undefined -   ~~~~~~~~~ - - -tsconfig.json:67:5 - error TS1005: ',' expected. - -67 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -tsconfig.json:67:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. - -67 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~ - - -[12:00:40 AM] Found 7 errors. Watching for file changes. +[12:00:40 AM] Found 0 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"declaration":true,"strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 5f4f78a1cb63a..93a9754adb558 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -23,69 +23,69 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "amd", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - "outDir": "build", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, - - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ - - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "build", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Output directory for generated declaration files. */ - - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined - - /* Advanced Options */undefined - "declarationDir": "decls",undefined - "forceConsistentCasingInFileNames": trueundefined + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "declarationDir": "decls", /* Output directory for generated declaration files. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } @@ -122,54 +122,12 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -tsconfig.json:61:31 - error TS1136: Property assignment expected. - -61 /* Experimental Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1005: ',' expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1136: Property assignment expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:66:5 - error TS1005: ',' expected. - -66 "declarationDir": "decls",undefined -   ~~~~~~~~~~~~~~~~ - - -tsconfig.json:66:31 - error TS1136: Property assignment expected. - -66 "declarationDir": "decls",undefined -   ~~~~~~~~~ - - -tsconfig.json:67:5 - error TS1005: ',' expected. - -67 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -tsconfig.json:67:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. - -67 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~ - - -[12:00:46 AM] Found 7 errors. Watching for file changes. +[12:00:46 AM] Found 0 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"declarationDir":"/user/username/projects/myproject/decls","forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index ae97799cbacc3..0c8fcf7465321 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "amd", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - "outDir": "build", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, - - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ - - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "build", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } @@ -113,42 +113,12 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -tsconfig.json:61:31 - error TS1136: Property assignment expected. - -61 /* Experimental Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1005: ',' expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1136: Property assignment expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:66:5 - error TS1005: ',' expected. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~ - - -[12:00:36 AM] Found 5 errors. Watching for file changes. +[12:00:36 AM] Found 0 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index 6c2adeedcd898..8ef1989cdb0a1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "amd", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - "outFile": "build/outFile.js", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, - - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ - - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + "outFile": "build/outFile.js", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } @@ -110,42 +110,12 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -tsconfig.json:61:31 - error TS1136: Property assignment expected. - -61 /* Experimental Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1005: ',' expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1136: Property assignment expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:66:5 - error TS1005: ',' expected. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~ - - -[12:00:31 AM] Found 5 errors. Watching for file changes. +[12:00:31 AM] Found 0 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index 6613c706119b6..fbe282741c88d 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -23,68 +23,68 @@ interface Array { length: number; [n: number]: T; } "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ /* Enable incremental compilation */ - // "incremental": true, /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "target": "es5", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "module": "amd", /* Specify library files to be included in the compilation. */ - // "lib": [], /* Allow javascript files to be compiled. */ - // "allowJs": true, /* Report errors in .js files. */ - // "checkJs": true, /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "jsx": "preserve", /* Generates corresponding '.d.ts' file. */ - // "declaration": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates corresponding '.map' file. */ - // "sourceMap": true, /* Concatenate and emit output to single file. */ - // "outFile": "./", /* Redirect output structure to the directory. */ - // "outDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "rootDir": "./", /* Enable project compilation */ - // "composite": true, /* Specify file to store incremental compilation information */ - // "tsBuildInfoFile": "./", /* Do not emit comments to output. */ - // "removeComments": true, /* Do not emit outputs. */ - // "noEmit": true, /* Import emit helpers from 'tslib'. */ - // "importHelpers": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "downlevelIteration": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - // "isolatedModules": true, - - /* Strict Type-Checking Options */ /* Raise error on expressions and declarations with an implied 'any' type. */ - "strict": true, /* Enable strict null checks. */ - // "noImplicitAny": true, /* Enable strict checking of function types. */ - // "strictNullChecks": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictFunctionTypes": true, /* Enable strict checking of property initialization in classes. */ - // "strictBindCallApply": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "strictPropertyInitialization": true, /* Parse in strict mode and emit "use strict" for each source file. */ - // "noImplicitThis": true, - // "alwaysStrict": true, /* Report errors on unused locals. */ - - /* Additional Checks */ /* Report error when not all code paths in function return a value. */ - // "noUnusedLocals": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUnusedParameters": true, - // "noImplicitReturns": true, /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "noFallthroughCasesInSwitch": true, /* Base directory to resolve non-absolute module names. */ - - /* Module Resolution Options */ /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "moduleResolution": "node", /* List of folders to include type definitions from. */ - // "baseUrl": "./", /* Type declaration files to be included in compilation. */ - // "paths": {}, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "rootDirs": [], /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "typeRoots": [], /* Do not resolve the real path of symlinks. */ - // "types": [], /* Allow accessing UMD globals from modules. */ - // "allowSyntheticDefaultImports": true, - "esModuleInterop": true, /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "preserveSymlinks": true, /* Specify the location where debugger should locate map files instead of generated locations. */ - // "allowUmdGlobalAccess": true, /* Emit a single file with source maps instead of having a separate file. */ + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Enables experimental support for ES7 decorators. */ - // "mapRoot": "", /* Enables experimental support for emitting type metadata for decorators. */ - // "inlineSourceMap": true, - // "inlineSources": true, /* Disallow inconsistently-cased references to the same file. */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */undefined - // "experimentalDecorators": true,undefined - // "emitDecoratorMetadata": true,undefined + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */undefined - "forceConsistentCasingInFileNames": trueundefined + /* Advanced Options */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ } } @@ -113,42 +113,12 @@ Output:: [12:00:25 AM] Starting compilation in watch mode... -tsconfig.json:61:31 - error TS1136: Property assignment expected. - -61 /* Experimental Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1005: ',' expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:65:27 - error TS1136: Property assignment expected. - -65 /* Advanced Options */undefined -   ~~~~~~~~~ - - -tsconfig.json:66:5 - error TS1005: ',' expected. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -tsconfig.json:66:41 - error TS5024: Compiler option 'forceConsistentCasingInFileNames' requires a value of type boolean. - -66 "forceConsistentCasingInFileNames": trueundefined -   ~~~~~~~~~~~~~ - - -[12:00:30 AM] Found 5 errors. Watching for file changes. +[12:00:30 AM] Found 0 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"strict":true,"esModuleInterop":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":1,"module":2,"strict":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/file1.ts From e8196f9af4fba4f7a112a5adba98e6554e3518e2 Mon Sep 17 00:00:00 2001 From: Neal Buerger Date: Mon, 30 Mar 2020 22:52:42 +0200 Subject: [PATCH 10/10] return of the comment --- src/compiler/commandLineParser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index f5ae95be19c2d..e9677cafba5bd 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2108,6 +2108,7 @@ namespace ts { function isAllowedOption({ category, name }: CommandLineOption): boolean { // Skip options which do not have a category or have category `Command_line_Options` + // Exclude all possible `Advanced_Options` in tsconfig.json which were NOT defined in command line return category !== undefined && category !== Diagnostics.Command_line_Options && (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name));