ts-jest 29.1.4 → 29.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ts-jest-digest +1 -1
- package/CHANGELOG.md +42 -2
- package/dist/cli/config/init.js +51 -87
- package/dist/cli/config/migrate.js +45 -141
- package/dist/cli/index.js +1 -2
- package/dist/config/paths-to-module-name-mapper.d.ts +5 -3
- package/dist/constants.d.ts +6 -0
- package/dist/constants.js +11 -1
- package/dist/index.d.ts +2 -2
- package/dist/legacy/compiler/compiler-utils.js +2 -2
- package/dist/legacy/config/config-set.js +10 -5
- package/dist/legacy/index.d.ts +2 -2
- package/dist/legacy/index.js +3 -1
- package/dist/legacy/ts-jest-transformer.d.ts +2 -2
- package/dist/legacy/ts-jest-transformer.js +10 -10
- package/dist/presets/create-jest-preset.d.ts +16 -1
- package/dist/presets/create-jest-preset.js +190 -2
- package/dist/raw-compiler-options.d.ts +254 -104
- package/dist/transformers/hoist-jest.js +2 -2
- package/dist/types.d.ts +104 -12
- package/dist/types.js +1 -0
- package/dist/utils/get-package-version.js +1 -2
- package/dist/utils/importer.js +4 -3
- package/dist/utils/json.js +3 -4
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/memoize.js +1 -2
- package/dist/utils/messages.js +1 -2
- package/dist/utils/normalize-slashes.js +1 -2
- package/dist/utils/sha1.js +2 -2
- package/package.json +16 -18
- package/presets/index.js +26 -36
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
export interface RawCompilerOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Enable importing files with any extension, provided a declaration file is present.
|
|
4
|
+
*/
|
|
5
|
+
allowArbitraryExtensions?: boolean | null;
|
|
6
|
+
/**
|
|
7
|
+
* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set.
|
|
8
|
+
*/
|
|
9
|
+
allowImportingTsExtensions?: boolean | null;
|
|
2
10
|
/**
|
|
3
11
|
* No longer supported. In early versions, manually set the text encoding for reading files.
|
|
4
12
|
*/
|
|
5
|
-
charset?: string;
|
|
13
|
+
charset?: string | null;
|
|
6
14
|
/**
|
|
7
15
|
* Enable constraints that allow a TypeScript project to be used with project references.
|
|
8
16
|
*/
|
|
9
|
-
composite?: boolean;
|
|
17
|
+
composite?: boolean | null;
|
|
18
|
+
/**
|
|
19
|
+
* Conditions to set in addition to the resolver-specific defaults when resolving imports.
|
|
20
|
+
*/
|
|
21
|
+
customConditions?: Array<string | null> | null;
|
|
10
22
|
/**
|
|
11
23
|
* Generate .d.ts files from TypeScript and JavaScript files in your project.
|
|
12
24
|
*/
|
|
13
|
-
declaration?: boolean;
|
|
25
|
+
declaration?: boolean | null;
|
|
14
26
|
/**
|
|
15
27
|
* Specify the output directory for generated declaration files.
|
|
16
28
|
*/
|
|
@@ -18,39 +30,43 @@ export interface RawCompilerOptions {
|
|
|
18
30
|
/**
|
|
19
31
|
* Output compiler performance information after building.
|
|
20
32
|
*/
|
|
21
|
-
diagnostics?: boolean;
|
|
33
|
+
diagnostics?: boolean | null;
|
|
22
34
|
/**
|
|
23
35
|
* Reduce the number of projects loaded automatically by TypeScript.
|
|
24
36
|
*/
|
|
25
|
-
disableReferencedProjectLoad?: boolean;
|
|
37
|
+
disableReferencedProjectLoad?: boolean | null;
|
|
26
38
|
/**
|
|
27
39
|
* Enforces using indexed accessors for keys declared using an indexed type
|
|
28
40
|
*/
|
|
29
|
-
noPropertyAccessFromIndexSignature?: boolean;
|
|
41
|
+
noPropertyAccessFromIndexSignature?: boolean | null;
|
|
30
42
|
/**
|
|
31
43
|
* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
|
|
32
44
|
*/
|
|
33
|
-
emitBOM?: boolean;
|
|
45
|
+
emitBOM?: boolean | null;
|
|
34
46
|
/**
|
|
35
47
|
* Only output d.ts files and not JavaScript files.
|
|
36
48
|
*/
|
|
37
|
-
emitDeclarationOnly?: boolean;
|
|
49
|
+
emitDeclarationOnly?: boolean | null;
|
|
50
|
+
/**
|
|
51
|
+
* Differentiate between undefined and not present when type checking
|
|
52
|
+
*/
|
|
53
|
+
exactOptionalPropertyTypes?: boolean | null;
|
|
38
54
|
/**
|
|
39
|
-
*
|
|
55
|
+
* Enable incremental compilation. Requires TypeScript version 3.4 or later.
|
|
40
56
|
*/
|
|
41
|
-
incremental?: boolean;
|
|
57
|
+
incremental?: boolean | null;
|
|
42
58
|
/**
|
|
43
59
|
* Specify the folder for .tsbuildinfo incremental compilation files.
|
|
44
60
|
*/
|
|
45
|
-
tsBuildInfoFile?: string;
|
|
61
|
+
tsBuildInfoFile?: string | null;
|
|
46
62
|
/**
|
|
47
63
|
* Include sourcemap files inside the emitted JavaScript.
|
|
48
64
|
*/
|
|
49
|
-
inlineSourceMap?: boolean;
|
|
65
|
+
inlineSourceMap?: boolean | null;
|
|
50
66
|
/**
|
|
51
67
|
* Include source code in the sourcemaps inside the emitted JavaScript.
|
|
52
68
|
*/
|
|
53
|
-
inlineSources?: boolean;
|
|
69
|
+
inlineSources?: boolean | null;
|
|
54
70
|
/**
|
|
55
71
|
* Specify what JSX code is generated.
|
|
56
72
|
*/
|
|
@@ -58,205 +74,233 @@ export interface RawCompilerOptions {
|
|
|
58
74
|
/**
|
|
59
75
|
* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.
|
|
60
76
|
*/
|
|
61
|
-
reactNamespace?: string;
|
|
77
|
+
reactNamespace?: string | null;
|
|
62
78
|
/**
|
|
63
79
|
* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'
|
|
64
80
|
*/
|
|
65
|
-
jsxFactory?: string;
|
|
81
|
+
jsxFactory?: string | null;
|
|
66
82
|
/**
|
|
67
83
|
* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
|
|
68
84
|
*/
|
|
69
|
-
jsxFragmentFactory?: string;
|
|
85
|
+
jsxFragmentFactory?: string | null;
|
|
70
86
|
/**
|
|
71
|
-
* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx
|
|
87
|
+
* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.
|
|
72
88
|
*/
|
|
73
|
-
jsxImportSource?: string;
|
|
89
|
+
jsxImportSource?: string | null;
|
|
74
90
|
/**
|
|
75
91
|
* Print all of the files read during the compilation.
|
|
76
92
|
*/
|
|
77
|
-
listFiles?: boolean;
|
|
93
|
+
listFiles?: boolean | null;
|
|
78
94
|
/**
|
|
79
95
|
* Specify the location where debugger should locate map files instead of generated locations.
|
|
80
96
|
*/
|
|
81
|
-
mapRoot?: string;
|
|
97
|
+
mapRoot?: string | null;
|
|
82
98
|
/**
|
|
83
99
|
* Specify what module code is generated.
|
|
84
100
|
*/
|
|
85
|
-
module?: ('CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ESNext' | 'None') |
|
|
101
|
+
module?: ('CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ESNext' | 'None' | 'ES2022' | 'Node16' | 'NodeNext' | 'Preserve') & (((('CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ESNext' | 'None' | 'ES2022' | 'Node16' | 'NodeNext' | 'Preserve') | {
|
|
102
|
+
[k: string]: unknown;
|
|
103
|
+
}) & string) | ((('CommonJS' | 'AMD' | 'System' | 'UMD' | 'ES6' | 'ES2015' | 'ES2020' | 'ESNext' | 'None' | 'ES2022' | 'Node16' | 'NodeNext' | 'Preserve') | {
|
|
104
|
+
[k: string]: unknown;
|
|
105
|
+
}) & null));
|
|
86
106
|
/**
|
|
87
107
|
* Specify how TypeScript looks up a file from a given module specifier.
|
|
88
108
|
*/
|
|
89
|
-
moduleResolution?: ('Classic' | 'Node') |
|
|
109
|
+
moduleResolution?: ('Classic' | 'Node' | 'Node10' | 'Node16' | 'NodeNext' | 'Bundler') & (((('Classic' | 'Node' | 'Node10' | 'Node16' | 'NodeNext' | 'Bundler') | {
|
|
110
|
+
[k: string]: unknown;
|
|
111
|
+
}) & string) | ((('Classic' | 'Node' | 'Node10' | 'Node16' | 'NodeNext' | 'Bundler') | {
|
|
112
|
+
[k: string]: unknown;
|
|
113
|
+
}) & null));
|
|
90
114
|
/**
|
|
91
115
|
* Set the newline character for emitting files.
|
|
92
116
|
*/
|
|
93
|
-
newLine?: ('crlf' | 'lf') |
|
|
117
|
+
newLine?: ('crlf' | 'lf') & (((('crlf' | 'lf') | {
|
|
118
|
+
[k: string]: unknown;
|
|
119
|
+
}) & string) | ((('crlf' | 'lf') | {
|
|
120
|
+
[k: string]: unknown;
|
|
121
|
+
}) & null));
|
|
94
122
|
/**
|
|
95
123
|
* Disable emitting file from a compilation.
|
|
96
124
|
*/
|
|
97
|
-
noEmit?: boolean;
|
|
125
|
+
noEmit?: boolean | null;
|
|
98
126
|
/**
|
|
99
127
|
* Disable generating custom helper functions like `__extends` in compiled output.
|
|
100
128
|
*/
|
|
101
|
-
noEmitHelpers?: boolean;
|
|
129
|
+
noEmitHelpers?: boolean | null;
|
|
102
130
|
/**
|
|
103
131
|
* Disable emitting files if any type checking errors are reported.
|
|
104
132
|
*/
|
|
105
|
-
noEmitOnError?: boolean;
|
|
133
|
+
noEmitOnError?: boolean | null;
|
|
106
134
|
/**
|
|
107
135
|
* Enable error reporting for expressions and declarations with an implied `any` type..
|
|
108
136
|
*/
|
|
109
|
-
noImplicitAny?: boolean;
|
|
137
|
+
noImplicitAny?: boolean | null;
|
|
110
138
|
/**
|
|
111
139
|
* Enable error reporting when `this` is given the type `any`.
|
|
112
140
|
*/
|
|
113
|
-
noImplicitThis?: boolean;
|
|
141
|
+
noImplicitThis?: boolean | null;
|
|
114
142
|
/**
|
|
115
143
|
* Enable error reporting when a local variables aren't read.
|
|
116
144
|
*/
|
|
117
|
-
noUnusedLocals?: boolean;
|
|
145
|
+
noUnusedLocals?: boolean | null;
|
|
118
146
|
/**
|
|
119
147
|
* Raise an error when a function parameter isn't read
|
|
120
148
|
*/
|
|
121
|
-
noUnusedParameters?: boolean;
|
|
149
|
+
noUnusedParameters?: boolean | null;
|
|
122
150
|
/**
|
|
123
151
|
* Disable including any library files, including the default lib.d.ts.
|
|
124
152
|
*/
|
|
125
|
-
noLib?: boolean;
|
|
153
|
+
noLib?: boolean | null;
|
|
126
154
|
/**
|
|
127
155
|
* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.
|
|
128
156
|
*/
|
|
129
|
-
noResolve?: boolean;
|
|
157
|
+
noResolve?: boolean | null;
|
|
130
158
|
/**
|
|
131
159
|
* Disable strict checking of generic signatures in function types.
|
|
132
160
|
*/
|
|
133
|
-
noStrictGenericChecks?: boolean;
|
|
161
|
+
noStrictGenericChecks?: boolean | null;
|
|
134
162
|
/**
|
|
135
163
|
* Skip type checking .d.ts files that are included with TypeScript.
|
|
136
164
|
*/
|
|
137
|
-
skipDefaultLibCheck?: boolean;
|
|
165
|
+
skipDefaultLibCheck?: boolean | null;
|
|
138
166
|
/**
|
|
139
167
|
* Skip type checking all .d.ts files.
|
|
140
168
|
*/
|
|
141
|
-
skipLibCheck?: boolean;
|
|
169
|
+
skipLibCheck?: boolean | null;
|
|
142
170
|
/**
|
|
143
171
|
* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.
|
|
144
172
|
*/
|
|
145
|
-
outFile?: string;
|
|
173
|
+
outFile?: string | null;
|
|
146
174
|
/**
|
|
147
175
|
* Specify an output folder for all emitted files.
|
|
148
176
|
*/
|
|
149
|
-
outDir?: string;
|
|
177
|
+
outDir?: string | null;
|
|
150
178
|
/**
|
|
151
179
|
* Disable erasing `const enum` declarations in generated code.
|
|
152
180
|
*/
|
|
153
|
-
preserveConstEnums?: boolean;
|
|
181
|
+
preserveConstEnums?: boolean | null;
|
|
154
182
|
/**
|
|
155
183
|
* Disable resolving symlinks to their realpath. This correlates to the same flag in node.
|
|
156
184
|
*/
|
|
157
|
-
preserveSymlinks?: boolean;
|
|
185
|
+
preserveSymlinks?: boolean | null;
|
|
186
|
+
/**
|
|
187
|
+
* Preserve unused imported values in the JavaScript output that would otherwise be removed
|
|
188
|
+
*/
|
|
189
|
+
preserveValueImports?: boolean | null;
|
|
158
190
|
/**
|
|
159
191
|
* Disable wiping the console in watch mode
|
|
160
192
|
*/
|
|
161
|
-
preserveWatchOutput?: boolean;
|
|
193
|
+
preserveWatchOutput?: boolean | null;
|
|
162
194
|
/**
|
|
163
195
|
* Enable color and formatting in output to make compiler errors easier to read
|
|
164
196
|
*/
|
|
165
|
-
pretty?: boolean;
|
|
197
|
+
pretty?: boolean | null;
|
|
166
198
|
/**
|
|
167
199
|
* Disable emitting comments.
|
|
168
200
|
*/
|
|
169
|
-
removeComments?: boolean;
|
|
201
|
+
removeComments?: boolean | null;
|
|
170
202
|
/**
|
|
171
203
|
* Specify the root folder within your source files.
|
|
172
204
|
*/
|
|
173
|
-
rootDir?: string;
|
|
205
|
+
rootDir?: string | null;
|
|
174
206
|
/**
|
|
175
207
|
* Ensure that each file can be safely transpiled without relying on other imports.
|
|
176
208
|
*/
|
|
177
|
-
isolatedModules?: boolean;
|
|
209
|
+
isolatedModules?: boolean | null;
|
|
178
210
|
/**
|
|
179
211
|
* Create source map files for emitted JavaScript files.
|
|
180
212
|
*/
|
|
181
|
-
sourceMap?: boolean;
|
|
213
|
+
sourceMap?: boolean | null;
|
|
182
214
|
/**
|
|
183
215
|
* Specify the root path for debuggers to find the reference source code.
|
|
184
216
|
*/
|
|
185
|
-
sourceRoot?: string;
|
|
217
|
+
sourceRoot?: string | null;
|
|
186
218
|
/**
|
|
187
219
|
* Disable reporting of excess property errors during the creation of object literals.
|
|
188
220
|
*/
|
|
189
|
-
suppressExcessPropertyErrors?: boolean;
|
|
221
|
+
suppressExcessPropertyErrors?: boolean | null;
|
|
190
222
|
/**
|
|
191
223
|
* Suppress `noImplicitAny` errors when indexing objects that lack index signatures.
|
|
192
224
|
*/
|
|
193
|
-
suppressImplicitAnyIndexErrors?: boolean;
|
|
225
|
+
suppressImplicitAnyIndexErrors?: boolean | null;
|
|
194
226
|
/**
|
|
195
227
|
* Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
|
|
196
228
|
*/
|
|
197
|
-
target?: ('ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ESNext') |
|
|
229
|
+
target?: ('ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ES2021' | 'ES2022' | 'ES2023' | 'ESNext') & (((('ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ES2021' | 'ES2022' | 'ES2023' | 'ESNext') | {
|
|
230
|
+
[k: string]: unknown;
|
|
231
|
+
}) & string) | ((('ES3' | 'ES5' | 'ES6' | 'ES2015' | 'ES2016' | 'ES2017' | 'ES2018' | 'ES2019' | 'ES2020' | 'ES2021' | 'ES2022' | 'ES2023' | 'ESNext') | {
|
|
232
|
+
[k: string]: unknown;
|
|
233
|
+
}) & null));
|
|
234
|
+
/**
|
|
235
|
+
* Default catch clause variables as `unknown` instead of `any`.
|
|
236
|
+
*/
|
|
237
|
+
useUnknownInCatchVariables?: boolean | null;
|
|
198
238
|
/**
|
|
199
239
|
* Watch input files.
|
|
200
240
|
*/
|
|
201
|
-
watch?: boolean;
|
|
241
|
+
watch?: boolean | null;
|
|
202
242
|
/**
|
|
203
|
-
* Specify
|
|
243
|
+
* Specify the polling strategy to use when the system runs out of or doesn't support native file watchers. Requires TypeScript version 3.8 or later.
|
|
204
244
|
*/
|
|
205
|
-
fallbackPolling?: 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling';
|
|
245
|
+
fallbackPolling?: 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling' | 'fixedInterval' | 'priorityInterval' | 'dynamicPriority' | 'fixedChunkSize';
|
|
206
246
|
/**
|
|
207
|
-
* Specify
|
|
247
|
+
* Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.
|
|
208
248
|
*/
|
|
209
|
-
watchDirectory?: 'useFsEvents' | 'fixedPollingInterval' | 'dynamicPriorityPolling';
|
|
249
|
+
watchDirectory?: 'useFsEvents' | 'fixedPollingInterval' | 'dynamicPriorityPolling' | 'fixedChunkSizePolling';
|
|
210
250
|
/**
|
|
211
|
-
* Specify
|
|
251
|
+
* Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.
|
|
212
252
|
*/
|
|
213
|
-
watchFile?: 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling' | 'useFsEvents' | 'useFsEventsOnParentDirectory';
|
|
253
|
+
watchFile?: 'fixedPollingInterval' | 'priorityPollingInterval' | 'dynamicPriorityPolling' | 'useFsEvents' | 'useFsEventsOnParentDirectory' | 'fixedChunkSizePolling';
|
|
214
254
|
/**
|
|
215
255
|
* Enable experimental support for TC39 stage 2 draft decorators.
|
|
216
256
|
*/
|
|
217
|
-
experimentalDecorators?: boolean;
|
|
257
|
+
experimentalDecorators?: boolean | null;
|
|
218
258
|
/**
|
|
219
259
|
* Emit design-type metadata for decorated declarations in source files.
|
|
220
260
|
*/
|
|
221
|
-
emitDecoratorMetadata?: boolean;
|
|
261
|
+
emitDecoratorMetadata?: boolean | null;
|
|
222
262
|
/**
|
|
223
263
|
* Disable error reporting for unused labels.
|
|
224
264
|
*/
|
|
225
|
-
allowUnusedLabels?: boolean;
|
|
265
|
+
allowUnusedLabels?: boolean | null;
|
|
226
266
|
/**
|
|
227
267
|
* Enable error reporting for codepaths that do not explicitly return in a function.
|
|
228
268
|
*/
|
|
229
|
-
noImplicitReturns?: boolean;
|
|
269
|
+
noImplicitReturns?: boolean | null;
|
|
230
270
|
/**
|
|
231
271
|
* Add `undefined` to a type when accessed using an index.
|
|
232
272
|
*/
|
|
233
|
-
noUncheckedIndexedAccess?: boolean;
|
|
273
|
+
noUncheckedIndexedAccess?: boolean | null;
|
|
234
274
|
/**
|
|
235
275
|
* Enable error reporting for fallthrough cases in switch statements.
|
|
236
276
|
*/
|
|
237
|
-
noFallthroughCasesInSwitch?: boolean;
|
|
277
|
+
noFallthroughCasesInSwitch?: boolean | null;
|
|
278
|
+
/**
|
|
279
|
+
* Ensure overriding members in derived classes are marked with an override modifier.
|
|
280
|
+
*/
|
|
281
|
+
noImplicitOverride?: boolean | null;
|
|
238
282
|
/**
|
|
239
283
|
* Disable error reporting for unreachable code.
|
|
240
284
|
*/
|
|
241
|
-
allowUnreachableCode?: boolean;
|
|
285
|
+
allowUnreachableCode?: boolean | null;
|
|
242
286
|
/**
|
|
243
287
|
* Ensure that casing is correct in imports.
|
|
244
288
|
*/
|
|
245
|
-
forceConsistentCasingInFileNames?: boolean;
|
|
289
|
+
forceConsistentCasingInFileNames?: boolean | null;
|
|
246
290
|
/**
|
|
247
291
|
* Emit a v8 CPU profile of the compiler run for debugging.
|
|
248
292
|
*/
|
|
249
|
-
generateCpuProfile?: string;
|
|
293
|
+
generateCpuProfile?: string | null;
|
|
250
294
|
/**
|
|
251
295
|
* Specify the base directory to resolve non-relative module names.
|
|
252
296
|
*/
|
|
253
|
-
baseUrl?: string;
|
|
297
|
+
baseUrl?: string | null;
|
|
254
298
|
/**
|
|
255
299
|
* Specify a set of entries that re-map imports to additional lookup locations.
|
|
256
300
|
*/
|
|
257
301
|
paths?: {
|
|
258
|
-
[k: string]: string
|
|
259
|
-
};
|
|
302
|
+
[k: string]: Array<string | null> | null;
|
|
303
|
+
} | null;
|
|
260
304
|
/**
|
|
261
305
|
* Specify a list of language service plugins to include.
|
|
262
306
|
*/
|
|
@@ -264,65 +308,159 @@ export interface RawCompilerOptions {
|
|
|
264
308
|
/**
|
|
265
309
|
* Plugin name.
|
|
266
310
|
*/
|
|
267
|
-
name?: string;
|
|
311
|
+
name?: string | null;
|
|
268
312
|
[k: string]: unknown;
|
|
269
|
-
}
|
|
313
|
+
} | null> | null;
|
|
270
314
|
/**
|
|
271
315
|
* Allow multiple folders to be treated as one when resolving modules.
|
|
272
316
|
*/
|
|
273
|
-
rootDirs?: string
|
|
317
|
+
rootDirs?: Array<string | null> | null;
|
|
274
318
|
/**
|
|
275
319
|
* Specify multiple folders that act like `./node_modules/@types`.
|
|
276
320
|
*/
|
|
277
|
-
typeRoots?: string
|
|
321
|
+
typeRoots?: Array<string | null> | null;
|
|
278
322
|
/**
|
|
279
323
|
* Specify type package names to be included without being referenced in a source file.
|
|
280
324
|
*/
|
|
281
|
-
types?: string
|
|
325
|
+
types?: Array<string | null> | null;
|
|
282
326
|
/**
|
|
283
|
-
*
|
|
327
|
+
* Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.
|
|
284
328
|
*/
|
|
285
|
-
traceResolution?: boolean;
|
|
329
|
+
traceResolution?: boolean | null;
|
|
286
330
|
/**
|
|
287
331
|
* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.
|
|
288
332
|
*/
|
|
289
|
-
allowJs?: boolean;
|
|
333
|
+
allowJs?: boolean | null;
|
|
290
334
|
/**
|
|
291
335
|
* Disable truncating types in error messages.
|
|
292
336
|
*/
|
|
293
|
-
noErrorTruncation?: boolean;
|
|
337
|
+
noErrorTruncation?: boolean | null;
|
|
294
338
|
/**
|
|
295
339
|
* Allow 'import x from y' when a module doesn't have a default export.
|
|
296
340
|
*/
|
|
297
|
-
allowSyntheticDefaultImports?: boolean;
|
|
341
|
+
allowSyntheticDefaultImports?: boolean | null;
|
|
298
342
|
/**
|
|
299
343
|
* Disable adding 'use strict' directives in emitted JavaScript files.
|
|
300
344
|
*/
|
|
301
|
-
noImplicitUseStrict?: boolean;
|
|
345
|
+
noImplicitUseStrict?: boolean | null;
|
|
302
346
|
/**
|
|
303
347
|
* Print the names of emitted files after a compilation.
|
|
304
348
|
*/
|
|
305
|
-
listEmittedFiles?: boolean;
|
|
349
|
+
listEmittedFiles?: boolean | null;
|
|
306
350
|
/**
|
|
307
351
|
* Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.
|
|
308
352
|
*/
|
|
309
|
-
disableSizeLimit?: boolean;
|
|
353
|
+
disableSizeLimit?: boolean | null;
|
|
310
354
|
/**
|
|
311
355
|
* Specify a set of bundled library declaration files that describe the target runtime environment.
|
|
312
356
|
*/
|
|
313
|
-
lib?: Array<('ES5' | 'ES6' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Promise' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Intl' | 'ESNext.Promise' | 'ESNext.String' | 'ESNext.Symbol' | 'DOM' | 'DOM.Iterable' | 'ScriptHost' | 'WebWorker' | 'WebWorker.ImportScripts') |
|
|
357
|
+
lib?: Array<(('ES5' | 'ES6' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Intl' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Promise' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Intl' | 'ESNext.Promise' | 'ESNext.String' | 'ESNext.Symbol' | 'DOM' | 'DOM.AsyncIterable' | 'DOM.Iterable' | 'ScriptHost' | 'WebWorker' | 'WebWorker.AsyncIterable' | 'WebWorker.ImportScripts' | 'Webworker.Iterable' | 'ES7' | 'ES2021' | 'ES2020.SharedMemory' | 'ES2020.Intl' | 'ES2020.Date' | 'ES2020.Number' | 'ES2021.Promise' | 'ES2021.String' | 'ES2021.WeakRef' | 'ESNext.WeakRef' | 'ES2021.Intl' | 'ES2022' | 'ES2022.Array' | 'ES2022.Error' | 'ES2022.Intl' | 'ES2022.Object' | 'ES2022.String' | 'ES2022.SharedMemory' | 'ES2022.RegExp' | 'ES2023' | 'ES2023.Array' | 'Decorators' | 'Decorators.Legacy' | 'ES2017.Date' | 'ES2023.Collection' | 'ESNext.Decorators' | 'ESNext.Disposable') | {
|
|
358
|
+
[k: string]: unknown;
|
|
359
|
+
} | {
|
|
360
|
+
[k: string]: unknown;
|
|
361
|
+
} | {
|
|
362
|
+
[k: string]: unknown;
|
|
363
|
+
} | {
|
|
364
|
+
[k: string]: unknown;
|
|
365
|
+
} | {
|
|
366
|
+
[k: string]: unknown;
|
|
367
|
+
} | {
|
|
368
|
+
[k: string]: unknown;
|
|
369
|
+
} | {
|
|
370
|
+
[k: string]: unknown;
|
|
371
|
+
} | {
|
|
372
|
+
[k: string]: unknown;
|
|
373
|
+
} | {
|
|
374
|
+
[k: string]: unknown;
|
|
375
|
+
} | {
|
|
376
|
+
[k: string]: unknown;
|
|
377
|
+
} | {
|
|
378
|
+
[k: string]: unknown;
|
|
379
|
+
} | {
|
|
380
|
+
[k: string]: unknown;
|
|
381
|
+
} | {
|
|
382
|
+
[k: string]: unknown;
|
|
383
|
+
} | {
|
|
384
|
+
[k: string]: unknown;
|
|
385
|
+
} | {
|
|
386
|
+
[k: string]: unknown;
|
|
387
|
+
}) & (((('ES5' | 'ES6' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Intl' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Promise' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Intl' | 'ESNext.Promise' | 'ESNext.String' | 'ESNext.Symbol' | 'DOM' | 'DOM.AsyncIterable' | 'DOM.Iterable' | 'ScriptHost' | 'WebWorker' | 'WebWorker.AsyncIterable' | 'WebWorker.ImportScripts' | 'Webworker.Iterable' | 'ES7' | 'ES2021' | 'ES2020.SharedMemory' | 'ES2020.Intl' | 'ES2020.Date' | 'ES2020.Number' | 'ES2021.Promise' | 'ES2021.String' | 'ES2021.WeakRef' | 'ESNext.WeakRef' | 'ES2021.Intl' | 'ES2022' | 'ES2022.Array' | 'ES2022.Error' | 'ES2022.Intl' | 'ES2022.Object' | 'ES2022.String' | 'ES2022.SharedMemory' | 'ES2022.RegExp' | 'ES2023' | 'ES2023.Array' | 'Decorators' | 'Decorators.Legacy' | 'ES2017.Date' | 'ES2023.Collection' | 'ESNext.Decorators' | 'ESNext.Disposable') | {
|
|
388
|
+
[k: string]: unknown;
|
|
389
|
+
} | {
|
|
390
|
+
[k: string]: unknown;
|
|
391
|
+
} | {
|
|
392
|
+
[k: string]: unknown;
|
|
393
|
+
} | {
|
|
394
|
+
[k: string]: unknown;
|
|
395
|
+
} | {
|
|
396
|
+
[k: string]: unknown;
|
|
397
|
+
} | {
|
|
398
|
+
[k: string]: unknown;
|
|
399
|
+
} | {
|
|
400
|
+
[k: string]: unknown;
|
|
401
|
+
} | {
|
|
402
|
+
[k: string]: unknown;
|
|
403
|
+
} | {
|
|
404
|
+
[k: string]: unknown;
|
|
405
|
+
} | {
|
|
406
|
+
[k: string]: unknown;
|
|
407
|
+
} | {
|
|
408
|
+
[k: string]: unknown;
|
|
409
|
+
} | {
|
|
410
|
+
[k: string]: unknown;
|
|
411
|
+
} | {
|
|
412
|
+
[k: string]: unknown;
|
|
413
|
+
} | {
|
|
414
|
+
[k: string]: unknown;
|
|
415
|
+
} | {
|
|
416
|
+
[k: string]: unknown;
|
|
417
|
+
}) & string) | ((('ES5' | 'ES6' | 'ES2015' | 'ES2015.Collection' | 'ES2015.Core' | 'ES2015.Generator' | 'ES2015.Iterable' | 'ES2015.Promise' | 'ES2015.Proxy' | 'ES2015.Reflect' | 'ES2015.Symbol.WellKnown' | 'ES2015.Symbol' | 'ES2016' | 'ES2016.Array.Include' | 'ES2017' | 'ES2017.Intl' | 'ES2017.Object' | 'ES2017.SharedMemory' | 'ES2017.String' | 'ES2017.TypedArrays' | 'ES2018' | 'ES2018.AsyncGenerator' | 'ES2018.AsyncIterable' | 'ES2018.Intl' | 'ES2018.Promise' | 'ES2018.Regexp' | 'ES2019' | 'ES2019.Array' | 'ES2019.Intl' | 'ES2019.Object' | 'ES2019.String' | 'ES2019.Symbol' | 'ES2020' | 'ES2020.BigInt' | 'ES2020.Promise' | 'ES2020.String' | 'ES2020.Symbol.WellKnown' | 'ESNext' | 'ESNext.Array' | 'ESNext.AsyncIterable' | 'ESNext.BigInt' | 'ESNext.Intl' | 'ESNext.Promise' | 'ESNext.String' | 'ESNext.Symbol' | 'DOM' | 'DOM.AsyncIterable' | 'DOM.Iterable' | 'ScriptHost' | 'WebWorker' | 'WebWorker.AsyncIterable' | 'WebWorker.ImportScripts' | 'Webworker.Iterable' | 'ES7' | 'ES2021' | 'ES2020.SharedMemory' | 'ES2020.Intl' | 'ES2020.Date' | 'ES2020.Number' | 'ES2021.Promise' | 'ES2021.String' | 'ES2021.WeakRef' | 'ESNext.WeakRef' | 'ES2021.Intl' | 'ES2022' | 'ES2022.Array' | 'ES2022.Error' | 'ES2022.Intl' | 'ES2022.Object' | 'ES2022.String' | 'ES2022.SharedMemory' | 'ES2022.RegExp' | 'ES2023' | 'ES2023.Array' | 'Decorators' | 'Decorators.Legacy' | 'ES2017.Date' | 'ES2023.Collection' | 'ESNext.Decorators' | 'ESNext.Disposable') | {
|
|
418
|
+
[k: string]: unknown;
|
|
419
|
+
} | {
|
|
420
|
+
[k: string]: unknown;
|
|
421
|
+
} | {
|
|
422
|
+
[k: string]: unknown;
|
|
423
|
+
} | {
|
|
424
|
+
[k: string]: unknown;
|
|
425
|
+
} | {
|
|
426
|
+
[k: string]: unknown;
|
|
427
|
+
} | {
|
|
428
|
+
[k: string]: unknown;
|
|
429
|
+
} | {
|
|
430
|
+
[k: string]: unknown;
|
|
431
|
+
} | {
|
|
432
|
+
[k: string]: unknown;
|
|
433
|
+
} | {
|
|
434
|
+
[k: string]: unknown;
|
|
435
|
+
} | {
|
|
436
|
+
[k: string]: unknown;
|
|
437
|
+
} | {
|
|
438
|
+
[k: string]: unknown;
|
|
439
|
+
} | {
|
|
440
|
+
[k: string]: unknown;
|
|
441
|
+
} | {
|
|
442
|
+
[k: string]: unknown;
|
|
443
|
+
} | {
|
|
444
|
+
[k: string]: unknown;
|
|
445
|
+
} | {
|
|
446
|
+
[k: string]: unknown;
|
|
447
|
+
}) & null))> | null;
|
|
448
|
+
/**
|
|
449
|
+
* Specify how TypeScript determine a file as module.
|
|
450
|
+
*/
|
|
451
|
+
moduleDetection?: 'auto' | 'legacy' | 'force';
|
|
314
452
|
/**
|
|
315
453
|
* When type checking, take into account `null` and `undefined`.
|
|
316
454
|
*/
|
|
317
|
-
strictNullChecks?: boolean;
|
|
455
|
+
strictNullChecks?: boolean | null;
|
|
318
456
|
/**
|
|
319
457
|
* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.
|
|
320
458
|
*/
|
|
321
|
-
maxNodeModuleJsDepth?: number;
|
|
459
|
+
maxNodeModuleJsDepth?: number | null;
|
|
322
460
|
/**
|
|
323
461
|
* Allow importing helper functions from tslib once per project, instead of including them per-file.
|
|
324
462
|
*/
|
|
325
|
-
importHelpers?: boolean;
|
|
463
|
+
importHelpers?: boolean | null;
|
|
326
464
|
/**
|
|
327
465
|
* Specify emit/checking behavior for imports that are only used for types.
|
|
328
466
|
*/
|
|
@@ -330,74 +468,86 @@ export interface RawCompilerOptions {
|
|
|
330
468
|
/**
|
|
331
469
|
* Ensure 'use strict' is always emitted.
|
|
332
470
|
*/
|
|
333
|
-
alwaysStrict?: boolean;
|
|
471
|
+
alwaysStrict?: boolean | null;
|
|
334
472
|
/**
|
|
335
473
|
* Enable all strict type checking options.
|
|
336
474
|
*/
|
|
337
|
-
strict?: boolean;
|
|
475
|
+
strict?: boolean | null;
|
|
338
476
|
/**
|
|
339
477
|
* Check that the arguments for `bind`, `call`, and `apply` methods match the original function.
|
|
340
478
|
*/
|
|
341
|
-
strictBindCallApply?: boolean;
|
|
479
|
+
strictBindCallApply?: boolean | null;
|
|
342
480
|
/**
|
|
343
481
|
* Emit more compliant, but verbose and less performant JavaScript for iteration.
|
|
344
482
|
*/
|
|
345
|
-
downlevelIteration?: boolean;
|
|
483
|
+
downlevelIteration?: boolean | null;
|
|
346
484
|
/**
|
|
347
485
|
* Enable error reporting in type-checked JavaScript files.
|
|
348
486
|
*/
|
|
349
|
-
checkJs?: boolean;
|
|
487
|
+
checkJs?: boolean | null;
|
|
350
488
|
/**
|
|
351
489
|
* When assigning functions, check to ensure parameters and the return values are subtype-compatible.
|
|
352
490
|
*/
|
|
353
|
-
strictFunctionTypes?: boolean;
|
|
491
|
+
strictFunctionTypes?: boolean | null;
|
|
354
492
|
/**
|
|
355
493
|
* Check for class properties that are declared but not set in the constructor.
|
|
356
494
|
*/
|
|
357
|
-
strictPropertyInitialization?: boolean;
|
|
495
|
+
strictPropertyInitialization?: boolean | null;
|
|
358
496
|
/**
|
|
359
497
|
* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.
|
|
360
498
|
*/
|
|
361
|
-
esModuleInterop?: boolean;
|
|
499
|
+
esModuleInterop?: boolean | null;
|
|
362
500
|
/**
|
|
363
501
|
* Allow accessing UMD globals from modules.
|
|
364
502
|
*/
|
|
365
|
-
allowUmdGlobalAccess?: boolean;
|
|
503
|
+
allowUmdGlobalAccess?: boolean | null;
|
|
366
504
|
/**
|
|
367
505
|
* Make keyof only return strings instead of string, numbers or symbols. Legacy option.
|
|
368
506
|
*/
|
|
369
|
-
keyofStringsOnly?: boolean;
|
|
507
|
+
keyofStringsOnly?: boolean | null;
|
|
370
508
|
/**
|
|
371
509
|
* Emit ECMAScript-standard-compliant class fields.
|
|
372
510
|
*/
|
|
373
|
-
useDefineForClassFields?: boolean;
|
|
511
|
+
useDefineForClassFields?: boolean | null;
|
|
374
512
|
/**
|
|
375
513
|
* Create sourcemaps for d.ts files.
|
|
376
514
|
*/
|
|
377
|
-
declarationMap?: boolean;
|
|
515
|
+
declarationMap?: boolean | null;
|
|
378
516
|
/**
|
|
379
517
|
* Enable importing .json files
|
|
380
518
|
*/
|
|
381
|
-
resolveJsonModule?: boolean;
|
|
519
|
+
resolveJsonModule?: boolean | null;
|
|
520
|
+
/**
|
|
521
|
+
* Use the package.json 'exports' field when resolving package imports.
|
|
522
|
+
*/
|
|
523
|
+
resolvePackageJsonExports?: boolean | null;
|
|
382
524
|
/**
|
|
383
|
-
*
|
|
525
|
+
* Use the package.json 'imports' field when resolving imports.
|
|
384
526
|
*/
|
|
385
|
-
|
|
527
|
+
resolvePackageJsonImports?: boolean | null;
|
|
528
|
+
/**
|
|
529
|
+
* Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it. Requires TypeScript version 3.8 or later.
|
|
530
|
+
*/
|
|
531
|
+
assumeChangesOnlyAffectDirectDependencies?: boolean | null;
|
|
386
532
|
/**
|
|
387
533
|
* Output more detailed compiler performance information after building.
|
|
388
534
|
*/
|
|
389
|
-
extendedDiagnostics?: boolean;
|
|
535
|
+
extendedDiagnostics?: boolean | null;
|
|
390
536
|
/**
|
|
391
537
|
* Print names of files that are part of the compilation and then stop processing.
|
|
392
538
|
*/
|
|
393
|
-
listFilesOnly?: boolean;
|
|
539
|
+
listFilesOnly?: boolean | null;
|
|
394
540
|
/**
|
|
395
541
|
* Disable preferring source files instead of declaration files when referencing composite projects
|
|
396
542
|
*/
|
|
397
|
-
disableSourceOfProjectReferenceRedirect?: boolean;
|
|
543
|
+
disableSourceOfProjectReferenceRedirect?: boolean | null;
|
|
398
544
|
/**
|
|
399
545
|
* Opt a project out of multi-project reference checking when editing.
|
|
400
546
|
*/
|
|
401
|
-
disableSolutionSearching?: boolean;
|
|
547
|
+
disableSolutionSearching?: boolean | null;
|
|
548
|
+
/**
|
|
549
|
+
* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.
|
|
550
|
+
*/
|
|
551
|
+
verbatimModuleSyntax?: boolean | null;
|
|
402
552
|
[k: string]: unknown;
|
|
403
553
|
}
|