@ts-type/package-dts 1.0.58 → 2.0.1

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.
@@ -15,594 +15,604 @@ export type JSONSchemaForTheTypeScriptCompilerSConfigurationFile = CompilerOptio
15
15
  (FilesDefinition | ExcludeDefinition | IncludeDefinition | ReferencesDefinition);
16
16
 
17
17
  export interface CompilerOptionsDefinition {
18
+ compilerOptions?: CompilerOptions;
19
+ [k: string]: unknown;
20
+ }
21
+ /**
22
+ * Instructs the TypeScript compiler how to compile .ts files.
23
+ */
24
+ export interface CompilerOptions {
18
25
  /**
19
- * Instructs the TypeScript compiler how to compile .ts files.
26
+ * No longer supported. In early versions, manually set the text encoding for reading files.
20
27
  */
21
- compilerOptions?: {
22
- /**
23
- * No longer supported. In early versions, manually set the text encoding for reading files.
24
- */
25
- charset?: string;
26
- /**
27
- * Enable constraints that allow a TypeScript project to be used with project references.
28
- */
29
- composite?: boolean;
30
- /**
31
- * Generate .d.ts files from TypeScript and JavaScript files in your project.
32
- */
33
- declaration?: boolean;
34
- /**
35
- * Specify the output directory for generated declaration files.
36
- */
37
- declarationDir?: string | null;
38
- /**
39
- * Output compiler performance information after building.
40
- */
41
- diagnostics?: boolean;
42
- /**
43
- * Reduce the number of projects loaded automatically by TypeScript.
44
- */
45
- disableReferencedProjectLoad?: boolean;
46
- /**
47
- * Enforces using indexed accessors for keys declared using an indexed type
48
- */
49
- noPropertyAccessFromIndexSignature?: boolean;
50
- /**
51
- * Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
52
- */
53
- emitBOM?: boolean;
54
- /**
55
- * Only output d.ts files and not JavaScript files.
56
- */
57
- emitDeclarationOnly?: boolean;
58
- /**
59
- * Differentiate between undefined and not present when type checking
60
- */
61
- exactOptionalPropertyTypes?: boolean;
62
- /**
63
- * Enable incremental compilation. Requires TypeScript version 3.4 or later.
64
- */
65
- incremental?: boolean;
66
- /**
67
- * Specify the folder for .tsbuildinfo incremental compilation files.
68
- */
69
- tsBuildInfoFile?: string;
70
- /**
71
- * Include sourcemap files inside the emitted JavaScript.
72
- */
73
- inlineSourceMap?: boolean;
74
- /**
75
- * Include source code in the sourcemaps inside the emitted JavaScript.
76
- */
77
- inlineSources?: boolean;
78
- /**
79
- * Specify what JSX code is generated.
80
- */
81
- jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native";
82
- /**
83
- * Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.
84
- */
85
- reactNamespace?: string;
86
- /**
87
- * Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'
88
- */
89
- jsxFactory?: string;
90
- /**
91
- * Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
92
- */
93
- jsxFragmentFactory?: string;
94
- /**
95
- * Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.
96
- */
97
- jsxImportSource?: string;
98
- /**
99
- * Print all of the files read during the compilation.
100
- */
101
- listFiles?: boolean;
102
- /**
103
- * Specify the location where debugger should locate map files instead of generated locations.
104
- */
105
- mapRoot?: string;
106
- /**
107
- * Specify what module code is generated.
108
- */
109
- module?: (
110
- | (
111
- | "CommonJS"
112
- | "AMD"
113
- | "System"
114
- | "UMD"
115
- | "ES6"
116
- | "ES2015"
117
- | "ES2020"
118
- | "ESNext"
119
- | "None"
120
- | "ES2022"
121
- | "Node12"
122
- | "NodeNext"
123
- )
124
- | {
125
- [k: string]: unknown;
126
- }
127
- ) &
128
- string;
129
- /**
130
- * Specify how TypeScript looks up a file from a given module specifier.
131
- */
132
- moduleResolution?: (
133
- | ("Classic" | "Node")
134
- | {
135
- [k: string]: unknown;
136
- }
137
- ) &
138
- string;
139
- /**
140
- * Set the newline character for emitting files.
141
- */
142
- newLine?: (
143
- | ("crlf" | "lf")
144
- | {
145
- [k: string]: unknown;
146
- }
147
- ) &
148
- string;
149
- /**
150
- * Disable emitting file from a compilation.
151
- */
152
- noEmit?: boolean;
153
- /**
154
- * Disable generating custom helper functions like `__extends` in compiled output.
155
- */
156
- noEmitHelpers?: boolean;
157
- /**
158
- * Disable emitting files if any type checking errors are reported.
159
- */
160
- noEmitOnError?: boolean;
161
- /**
162
- * Enable error reporting for expressions and declarations with an implied `any` type..
163
- */
164
- noImplicitAny?: boolean;
165
- /**
166
- * Enable error reporting when `this` is given the type `any`.
167
- */
168
- noImplicitThis?: boolean;
169
- /**
170
- * Enable error reporting when a local variables aren't read.
171
- */
172
- noUnusedLocals?: boolean;
173
- /**
174
- * Raise an error when a function parameter isn't read
175
- */
176
- noUnusedParameters?: boolean;
177
- /**
178
- * Disable including any library files, including the default lib.d.ts.
179
- */
180
- noLib?: boolean;
181
- /**
182
- * Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.
183
- */
184
- noResolve?: boolean;
185
- /**
186
- * Disable strict checking of generic signatures in function types.
187
- */
188
- noStrictGenericChecks?: boolean;
189
- /**
190
- * Skip type checking .d.ts files that are included with TypeScript.
191
- */
192
- skipDefaultLibCheck?: boolean;
193
- /**
194
- * Skip type checking all .d.ts files.
195
- */
196
- skipLibCheck?: boolean;
197
- /**
198
- * 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.
199
- */
200
- outFile?: string;
201
- /**
202
- * Specify an output folder for all emitted files.
203
- */
204
- outDir?: string;
205
- /**
206
- * Disable erasing `const enum` declarations in generated code.
207
- */
208
- preserveConstEnums?: boolean;
209
- /**
210
- * Disable resolving symlinks to their realpath. This correlates to the same flag in node.
211
- */
212
- preserveSymlinks?: boolean;
213
- /**
214
- * Preserve unused imported values in the JavaScript output that would otherwise be removed
215
- */
216
- preserveValueImports?: boolean;
217
- /**
218
- * Disable wiping the console in watch mode
219
- */
220
- preserveWatchOutput?: boolean;
221
- /**
222
- * Enable color and formatting in output to make compiler errors easier to read
223
- */
224
- pretty?: boolean;
225
- /**
226
- * Disable emitting comments.
227
- */
228
- removeComments?: boolean;
229
- /**
230
- * Specify the root folder within your source files.
231
- */
232
- rootDir?: string;
233
- /**
234
- * Ensure that each file can be safely transpiled without relying on other imports.
235
- */
236
- isolatedModules?: boolean;
237
- /**
238
- * Create source map files for emitted JavaScript files.
239
- */
240
- sourceMap?: boolean;
241
- /**
242
- * Specify the root path for debuggers to find the reference source code.
243
- */
244
- sourceRoot?: string;
245
- /**
246
- * Disable reporting of excess property errors during the creation of object literals.
247
- */
248
- suppressExcessPropertyErrors?: boolean;
249
- /**
250
- * Suppress `noImplicitAny` errors when indexing objects that lack index signatures.
251
- */
252
- suppressImplicitAnyIndexErrors?: boolean;
253
- /**
254
- * Disable emitting declarations that have `@internal` in their JSDoc comments.
255
- */
256
- stripInternal?: boolean;
257
- /**
258
- * Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
259
- */
260
- target?: (
261
- | (
262
- | "ES3"
263
- | "ES5"
264
- | "ES6"
265
- | "ES2015"
266
- | "ES2016"
267
- | "ES2017"
268
- | "ES2018"
269
- | "ES2019"
270
- | "ES2020"
271
- | "ES2021"
272
- | "ES2022"
273
- | "ESNext"
274
- )
275
- | {
276
- [k: string]: unknown;
277
- }
278
- ) &
279
- string;
280
- /**
281
- * Default catch clause variables as `unknown` instead of `any`.
282
- */
283
- useUnknownInCatchVariables?: boolean;
284
- /**
285
- * Watch input files.
286
- */
287
- watch?: boolean;
288
- /**
289
- * 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.
290
- */
291
- fallbackPolling?:
292
- | "fixedPollingInterval"
293
- | "priorityPollingInterval"
294
- | "dynamicPriorityPolling"
295
- | "fixedInterval"
296
- | "priorityInterval"
297
- | "dynamicPriority"
298
- | "fixedChunkSize";
299
- /**
300
- * Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.
301
- */
302
- watchDirectory?: "useFsEvents" | "fixedPollingInterval" | "dynamicPriorityPolling" | "fixedChunkSizePolling";
303
- /**
304
- * Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.
305
- */
306
- watchFile?:
307
- | "fixedPollingInterval"
308
- | "priorityPollingInterval"
309
- | "dynamicPriorityPolling"
310
- | "useFsEvents"
311
- | "useFsEventsOnParentDirectory"
312
- | "fixedChunkSizePolling";
313
- /**
314
- * Enable experimental support for TC39 stage 2 draft decorators.
315
- */
316
- experimentalDecorators?: boolean;
317
- /**
318
- * Emit design-type metadata for decorated declarations in source files.
319
- */
320
- emitDecoratorMetadata?: boolean;
321
- /**
322
- * Disable error reporting for unused labels.
323
- */
324
- allowUnusedLabels?: boolean;
325
- /**
326
- * Enable error reporting for codepaths that do not explicitly return in a function.
327
- */
328
- noImplicitReturns?: boolean;
329
- /**
330
- * Add `undefined` to a type when accessed using an index.
331
- */
332
- noUncheckedIndexedAccess?: boolean;
333
- /**
334
- * Enable error reporting for fallthrough cases in switch statements.
335
- */
336
- noFallthroughCasesInSwitch?: boolean;
337
- /**
338
- * Ensure overriding members in derived classes are marked with an override modifier.
339
- */
340
- noImplicitOverride?: boolean;
341
- /**
342
- * Disable error reporting for unreachable code.
343
- */
344
- allowUnreachableCode?: boolean;
345
- /**
346
- * Ensure that casing is correct in imports.
347
- */
348
- forceConsistentCasingInFileNames?: boolean;
349
- /**
350
- * Emit a v8 CPU profile of the compiler run for debugging.
351
- */
352
- generateCpuProfile?: string;
353
- /**
354
- * Specify the base directory to resolve non-relative module names.
355
- */
356
- baseUrl?: string;
357
- /**
358
- * Specify a set of entries that re-map imports to additional lookup locations.
359
- */
360
- paths?: {
361
- [k: string]: string[];
362
- };
363
- /**
364
- * Specify a list of language service plugins to include.
365
- */
366
- plugins?: {
367
- /**
368
- * Plugin name.
369
- */
370
- name?: string;
371
- [k: string]: unknown;
372
- }[];
373
- /**
374
- * Allow multiple folders to be treated as one when resolving modules.
375
- */
376
- rootDirs?: string[];
377
- /**
378
- * Specify multiple folders that act like `./node_modules/@types`.
379
- */
380
- typeRoots?: string[];
381
- /**
382
- * Specify type package names to be included without being referenced in a source file.
383
- */
384
- types?: string[];
385
- /**
386
- * Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.
387
- */
388
- traceResolution?: boolean;
389
- /**
390
- * Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.
391
- */
392
- allowJs?: boolean;
393
- /**
394
- * Disable truncating types in error messages.
395
- */
396
- noErrorTruncation?: boolean;
397
- /**
398
- * Allow 'import x from y' when a module doesn't have a default export.
399
- */
400
- allowSyntheticDefaultImports?: boolean;
401
- /**
402
- * Disable adding 'use strict' directives in emitted JavaScript files.
403
- */
404
- noImplicitUseStrict?: boolean;
405
- /**
406
- * Print the names of emitted files after a compilation.
407
- */
408
- listEmittedFiles?: boolean;
409
- /**
410
- * Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.
411
- */
412
- disableSizeLimit?: boolean;
413
- /**
414
- * Specify a set of bundled library declaration files that describe the target runtime environment.
415
- */
416
- lib?: ((
417
- | (
418
- | "ES5"
419
- | "ES6"
420
- | "ES2015"
421
- | "ES2015.Collection"
422
- | "ES2015.Core"
423
- | "ES2015.Generator"
424
- | "ES2015.Iterable"
425
- | "ES2015.Promise"
426
- | "ES2015.Proxy"
427
- | "ES2015.Reflect"
428
- | "ES2015.Symbol.WellKnown"
429
- | "ES2015.Symbol"
430
- | "ES2016"
431
- | "ES2016.Array.Include"
432
- | "ES2017"
433
- | "ES2017.Intl"
434
- | "ES2017.Object"
435
- | "ES2017.SharedMemory"
436
- | "ES2017.String"
437
- | "ES2017.TypedArrays"
438
- | "ES2018"
439
- | "ES2018.AsyncGenerator"
440
- | "ES2018.AsyncIterable"
441
- | "ES2018.Intl"
442
- | "ES2018.Promise"
443
- | "ES2018.Regexp"
444
- | "ES2019"
445
- | "ES2019.Array"
446
- | "ES2019.Object"
447
- | "ES2019.String"
448
- | "ES2019.Symbol"
449
- | "ES2020"
450
- | "ES2020.BigInt"
451
- | "ES2020.Promise"
452
- | "ES2020.String"
453
- | "ES2020.Symbol.WellKnown"
454
- | "ESNext"
455
- | "ESNext.Array"
456
- | "ESNext.AsyncIterable"
457
- | "ESNext.BigInt"
458
- | "ESNext.Intl"
459
- | "ESNext.Promise"
460
- | "ESNext.String"
461
- | "ESNext.Symbol"
462
- | "DOM"
463
- | "DOM.Iterable"
464
- | "ScriptHost"
465
- | "WebWorker"
466
- | "WebWorker.ImportScripts"
467
- | "Webworker.Iterable"
468
- | "ES7"
469
- | "ES2021"
470
- | "ES2020.SharedMemory"
471
- | "ES2020.Intl"
472
- | "ES2021.Promise"
473
- | "ES2021.String"
474
- | "ES2021.WeakRef"
475
- | "ESNext.WeakRef"
476
- | "es2021.intl"
477
- )
478
- | {
479
- [k: string]: unknown;
480
- }
481
- | {
482
- [k: string]: unknown;
483
- }
484
- | {
485
- [k: string]: unknown;
486
- }
487
- | {
488
- [k: string]: unknown;
489
- }
490
- | {
491
- [k: string]: unknown;
492
- }
493
- | {
494
- [k: string]: unknown;
495
- }
496
- | {
497
- [k: string]: unknown;
498
- }
499
- | {
500
- [k: string]: unknown;
501
- }
502
- | {
503
- [k: string]: unknown;
504
- }
505
- | {
506
- [k: string]: unknown;
507
- }
508
- | {
509
- [k: string]: unknown;
510
- }
511
- | {
512
- [k: string]: unknown;
513
- }
514
- ) &
515
- string)[];
516
- /**
517
- * When type checking, take into account `null` and `undefined`.
518
- */
519
- strictNullChecks?: boolean;
520
- /**
521
- * Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.
522
- */
523
- maxNodeModuleJsDepth?: number;
524
- /**
525
- * Allow importing helper functions from tslib once per project, instead of including them per-file.
526
- */
527
- importHelpers?: boolean;
528
- /**
529
- * Specify emit/checking behavior for imports that are only used for types.
530
- */
531
- importsNotUsedAsValues?: "remove" | "preserve" | "error";
532
- /**
533
- * Ensure 'use strict' is always emitted.
534
- */
535
- alwaysStrict?: boolean;
536
- /**
537
- * Enable all strict type checking options.
538
- */
539
- strict?: boolean;
540
- /**
541
- * Check that the arguments for `bind`, `call`, and `apply` methods match the original function.
542
- */
543
- strictBindCallApply?: boolean;
544
- /**
545
- * Emit more compliant, but verbose and less performant JavaScript for iteration.
546
- */
547
- downlevelIteration?: boolean;
548
- /**
549
- * Enable error reporting in type-checked JavaScript files.
550
- */
551
- checkJs?: boolean;
552
- /**
553
- * When assigning functions, check to ensure parameters and the return values are subtype-compatible.
554
- */
555
- strictFunctionTypes?: boolean;
556
- /**
557
- * Check for class properties that are declared but not set in the constructor.
558
- */
559
- strictPropertyInitialization?: boolean;
560
- /**
561
- * Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.
562
- */
563
- esModuleInterop?: boolean;
564
- /**
565
- * Allow accessing UMD globals from modules.
566
- */
567
- allowUmdGlobalAccess?: boolean;
568
- /**
569
- * Make keyof only return strings instead of string, numbers or symbols. Legacy option.
570
- */
571
- keyofStringsOnly?: boolean;
572
- /**
573
- * Emit ECMAScript-standard-compliant class fields.
574
- */
575
- useDefineForClassFields?: boolean;
576
- /**
577
- * Create sourcemaps for d.ts files.
578
- */
579
- declarationMap?: boolean;
580
- /**
581
- * Enable importing .json files
582
- */
583
- resolveJsonModule?: boolean;
584
- /**
585
- * 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.
586
- */
587
- assumeChangesOnlyAffectDirectDependencies?: boolean;
588
- /**
589
- * Output more detailed compiler performance information after building.
590
- */
591
- extendedDiagnostics?: boolean;
592
- /**
593
- * Print names of files that are part of the compilation and then stop processing.
594
- */
595
- listFilesOnly?: boolean;
596
- /**
597
- * Disable preferring source files instead of declaration files when referencing composite projects
598
- */
599
- disableSourceOfProjectReferenceRedirect?: boolean;
28
+ charset?: string;
29
+ /**
30
+ * Enable constraints that allow a TypeScript project to be used with project references.
31
+ */
32
+ composite?: boolean;
33
+ /**
34
+ * Generate .d.ts files from TypeScript and JavaScript files in your project.
35
+ */
36
+ declaration?: boolean;
37
+ /**
38
+ * Specify the output directory for generated declaration files.
39
+ */
40
+ declarationDir?: string | null;
41
+ /**
42
+ * Output compiler performance information after building.
43
+ */
44
+ diagnostics?: boolean;
45
+ /**
46
+ * Reduce the number of projects loaded automatically by TypeScript.
47
+ */
48
+ disableReferencedProjectLoad?: boolean;
49
+ /**
50
+ * Enforces using indexed accessors for keys declared using an indexed type
51
+ */
52
+ noPropertyAccessFromIndexSignature?: boolean;
53
+ /**
54
+ * Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
55
+ */
56
+ emitBOM?: boolean;
57
+ /**
58
+ * Only output d.ts files and not JavaScript files.
59
+ */
60
+ emitDeclarationOnly?: boolean;
61
+ /**
62
+ * Differentiate between undefined and not present when type checking
63
+ */
64
+ exactOptionalPropertyTypes?: boolean;
65
+ /**
66
+ * Enable incremental compilation. Requires TypeScript version 3.4 or later.
67
+ */
68
+ incremental?: boolean;
69
+ /**
70
+ * Specify the folder for .tsbuildinfo incremental compilation files.
71
+ */
72
+ tsBuildInfoFile?: string;
73
+ /**
74
+ * Include sourcemap files inside the emitted JavaScript.
75
+ */
76
+ inlineSourceMap?: boolean;
77
+ /**
78
+ * Include source code in the sourcemaps inside the emitted JavaScript.
79
+ */
80
+ inlineSources?: boolean;
81
+ /**
82
+ * Specify what JSX code is generated.
83
+ */
84
+ jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native";
85
+ /**
86
+ * Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.
87
+ */
88
+ reactNamespace?: string;
89
+ /**
90
+ * Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'
91
+ */
92
+ jsxFactory?: string;
93
+ /**
94
+ * Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
95
+ */
96
+ jsxFragmentFactory?: string;
97
+ /**
98
+ * Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.
99
+ */
100
+ jsxImportSource?: string;
101
+ /**
102
+ * Print all of the files read during the compilation.
103
+ */
104
+ listFiles?: boolean;
105
+ /**
106
+ * Specify the location where debugger should locate map files instead of generated locations.
107
+ */
108
+ mapRoot?: string;
109
+ /**
110
+ * Specify what module code is generated.
111
+ */
112
+ module?: (
113
+ | (
114
+ | "CommonJS"
115
+ | "AMD"
116
+ | "System"
117
+ | "UMD"
118
+ | "ES6"
119
+ | "ES2015"
120
+ | "ES2020"
121
+ | "ESNext"
122
+ | "None"
123
+ | "ES2022"
124
+ | "Node16"
125
+ | "NodeNext"
126
+ )
127
+ | {
128
+ [k: string]: unknown;
129
+ }
130
+ ) &
131
+ string;
132
+ /**
133
+ * Specify how TypeScript looks up a file from a given module specifier.
134
+ */
135
+ moduleResolution?: (
136
+ | ("Classic" | "Node" | "Node16" | "NodeNext")
137
+ | {
138
+ [k: string]: unknown;
139
+ }
140
+ ) &
141
+ string;
142
+ /**
143
+ * Set the newline character for emitting files.
144
+ */
145
+ newLine?: (
146
+ | ("crlf" | "lf")
147
+ | {
148
+ [k: string]: unknown;
149
+ }
150
+ ) &
151
+ string;
152
+ /**
153
+ * Disable emitting file from a compilation.
154
+ */
155
+ noEmit?: boolean;
156
+ /**
157
+ * Disable generating custom helper functions like `__extends` in compiled output.
158
+ */
159
+ noEmitHelpers?: boolean;
160
+ /**
161
+ * Disable emitting files if any type checking errors are reported.
162
+ */
163
+ noEmitOnError?: boolean;
164
+ /**
165
+ * Enable error reporting for expressions and declarations with an implied `any` type..
166
+ */
167
+ noImplicitAny?: boolean;
168
+ /**
169
+ * Enable error reporting when `this` is given the type `any`.
170
+ */
171
+ noImplicitThis?: boolean;
172
+ /**
173
+ * Enable error reporting when a local variables aren't read.
174
+ */
175
+ noUnusedLocals?: boolean;
176
+ /**
177
+ * Raise an error when a function parameter isn't read
178
+ */
179
+ noUnusedParameters?: boolean;
180
+ /**
181
+ * Disable including any library files, including the default lib.d.ts.
182
+ */
183
+ noLib?: boolean;
184
+ /**
185
+ * Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.
186
+ */
187
+ noResolve?: boolean;
188
+ /**
189
+ * Disable strict checking of generic signatures in function types.
190
+ */
191
+ noStrictGenericChecks?: boolean;
192
+ /**
193
+ * Skip type checking .d.ts files that are included with TypeScript.
194
+ */
195
+ skipDefaultLibCheck?: boolean;
196
+ /**
197
+ * Skip type checking all .d.ts files.
198
+ */
199
+ skipLibCheck?: boolean;
200
+ /**
201
+ * 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.
202
+ */
203
+ outFile?: string;
204
+ /**
205
+ * Specify an output folder for all emitted files.
206
+ */
207
+ outDir?: string;
208
+ /**
209
+ * Disable erasing `const enum` declarations in generated code.
210
+ */
211
+ preserveConstEnums?: boolean;
212
+ /**
213
+ * Disable resolving symlinks to their realpath. This correlates to the same flag in node.
214
+ */
215
+ preserveSymlinks?: boolean;
216
+ /**
217
+ * Preserve unused imported values in the JavaScript output that would otherwise be removed
218
+ */
219
+ preserveValueImports?: boolean;
220
+ /**
221
+ * Disable wiping the console in watch mode
222
+ */
223
+ preserveWatchOutput?: boolean;
224
+ /**
225
+ * Enable color and formatting in output to make compiler errors easier to read
226
+ */
227
+ pretty?: boolean;
228
+ /**
229
+ * Disable emitting comments.
230
+ */
231
+ removeComments?: boolean;
232
+ /**
233
+ * Specify the root folder within your source files.
234
+ */
235
+ rootDir?: string;
236
+ /**
237
+ * Ensure that each file can be safely transpiled without relying on other imports.
238
+ */
239
+ isolatedModules?: boolean;
240
+ /**
241
+ * Create source map files for emitted JavaScript files.
242
+ */
243
+ sourceMap?: boolean;
244
+ /**
245
+ * Specify the root path for debuggers to find the reference source code.
246
+ */
247
+ sourceRoot?: string;
248
+ /**
249
+ * Disable reporting of excess property errors during the creation of object literals.
250
+ */
251
+ suppressExcessPropertyErrors?: boolean;
252
+ /**
253
+ * Suppress `noImplicitAny` errors when indexing objects that lack index signatures.
254
+ */
255
+ suppressImplicitAnyIndexErrors?: boolean;
256
+ /**
257
+ * Disable emitting declarations that have `@internal` in their JSDoc comments.
258
+ */
259
+ stripInternal?: boolean;
260
+ /**
261
+ * Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
262
+ */
263
+ target?: (
264
+ | (
265
+ | "ES3"
266
+ | "ES5"
267
+ | "ES6"
268
+ | "ES2015"
269
+ | "ES2016"
270
+ | "ES2017"
271
+ | "ES2018"
272
+ | "ES2019"
273
+ | "ES2020"
274
+ | "ES2021"
275
+ | "ES2022"
276
+ | "ESNext"
277
+ )
278
+ | {
279
+ [k: string]: unknown;
280
+ }
281
+ ) &
282
+ string;
283
+ /**
284
+ * Default catch clause variables as `unknown` instead of `any`.
285
+ */
286
+ useUnknownInCatchVariables?: boolean;
287
+ /**
288
+ * Watch input files.
289
+ */
290
+ watch?: boolean;
291
+ /**
292
+ * 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.
293
+ */
294
+ fallbackPolling?:
295
+ | "fixedPollingInterval"
296
+ | "priorityPollingInterval"
297
+ | "dynamicPriorityPolling"
298
+ | "fixedInterval"
299
+ | "priorityInterval"
300
+ | "dynamicPriority"
301
+ | "fixedChunkSize";
302
+ /**
303
+ * Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.
304
+ */
305
+ watchDirectory?: "useFsEvents" | "fixedPollingInterval" | "dynamicPriorityPolling" | "fixedChunkSizePolling";
306
+ /**
307
+ * Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.
308
+ */
309
+ watchFile?:
310
+ | "fixedPollingInterval"
311
+ | "priorityPollingInterval"
312
+ | "dynamicPriorityPolling"
313
+ | "useFsEvents"
314
+ | "useFsEventsOnParentDirectory"
315
+ | "fixedChunkSizePolling";
316
+ /**
317
+ * Enable experimental support for TC39 stage 2 draft decorators.
318
+ */
319
+ experimentalDecorators?: boolean;
320
+ /**
321
+ * Emit design-type metadata for decorated declarations in source files.
322
+ */
323
+ emitDecoratorMetadata?: boolean;
324
+ /**
325
+ * Disable error reporting for unused labels.
326
+ */
327
+ allowUnusedLabels?: boolean;
328
+ /**
329
+ * Enable error reporting for codepaths that do not explicitly return in a function.
330
+ */
331
+ noImplicitReturns?: boolean;
332
+ /**
333
+ * Add `undefined` to a type when accessed using an index.
334
+ */
335
+ noUncheckedIndexedAccess?: boolean;
336
+ /**
337
+ * Enable error reporting for fallthrough cases in switch statements.
338
+ */
339
+ noFallthroughCasesInSwitch?: boolean;
340
+ /**
341
+ * Ensure overriding members in derived classes are marked with an override modifier.
342
+ */
343
+ noImplicitOverride?: boolean;
344
+ /**
345
+ * Disable error reporting for unreachable code.
346
+ */
347
+ allowUnreachableCode?: boolean;
348
+ /**
349
+ * Ensure that casing is correct in imports.
350
+ */
351
+ forceConsistentCasingInFileNames?: boolean;
352
+ /**
353
+ * Emit a v8 CPU profile of the compiler run for debugging.
354
+ */
355
+ generateCpuProfile?: string;
356
+ /**
357
+ * Specify the base directory to resolve non-relative module names.
358
+ */
359
+ baseUrl?: string;
360
+ /**
361
+ * Specify a set of entries that re-map imports to additional lookup locations.
362
+ */
363
+ paths?: {
364
+ [k: string]: string[];
365
+ };
366
+ /**
367
+ * Specify a list of language service plugins to include.
368
+ */
369
+ plugins?: {
600
370
  /**
601
- * Opt a project out of multi-project reference checking when editing.
371
+ * Plugin name.
602
372
  */
603
- disableSolutionSearching?: boolean;
373
+ name?: string;
604
374
  [k: string]: unknown;
605
- };
375
+ }[];
376
+ /**
377
+ * Allow multiple folders to be treated as one when resolving modules.
378
+ */
379
+ rootDirs?: string[];
380
+ /**
381
+ * Specify multiple folders that act like `./node_modules/@types`.
382
+ */
383
+ typeRoots?: string[];
384
+ /**
385
+ * Specify type package names to be included without being referenced in a source file.
386
+ */
387
+ types?: string[];
388
+ /**
389
+ * Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.
390
+ */
391
+ traceResolution?: boolean;
392
+ /**
393
+ * Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.
394
+ */
395
+ allowJs?: boolean;
396
+ /**
397
+ * Disable truncating types in error messages.
398
+ */
399
+ noErrorTruncation?: boolean;
400
+ /**
401
+ * Allow 'import x from y' when a module doesn't have a default export.
402
+ */
403
+ allowSyntheticDefaultImports?: boolean;
404
+ /**
405
+ * Disable adding 'use strict' directives in emitted JavaScript files.
406
+ */
407
+ noImplicitUseStrict?: boolean;
408
+ /**
409
+ * Print the names of emitted files after a compilation.
410
+ */
411
+ listEmittedFiles?: boolean;
412
+ /**
413
+ * Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.
414
+ */
415
+ disableSizeLimit?: boolean;
416
+ /**
417
+ * Specify a set of bundled library declaration files that describe the target runtime environment.
418
+ */
419
+ lib?: ((
420
+ | (
421
+ | "ES5"
422
+ | "ES6"
423
+ | "ES2015"
424
+ | "ES2015.Collection"
425
+ | "ES2015.Core"
426
+ | "ES2015.Generator"
427
+ | "ES2015.Iterable"
428
+ | "ES2015.Promise"
429
+ | "ES2015.Proxy"
430
+ | "ES2015.Reflect"
431
+ | "ES2015.Symbol.WellKnown"
432
+ | "ES2015.Symbol"
433
+ | "ES2016"
434
+ | "ES2016.Array.Include"
435
+ | "ES2017"
436
+ | "ES2017.Intl"
437
+ | "ES2017.Object"
438
+ | "ES2017.SharedMemory"
439
+ | "ES2017.String"
440
+ | "ES2017.TypedArrays"
441
+ | "ES2018"
442
+ | "ES2018.AsyncGenerator"
443
+ | "ES2018.AsyncIterable"
444
+ | "ES2018.Intl"
445
+ | "ES2018.Promise"
446
+ | "ES2018.Regexp"
447
+ | "ES2019"
448
+ | "ES2019.Array"
449
+ | "ES2019.Object"
450
+ | "ES2019.String"
451
+ | "ES2019.Symbol"
452
+ | "ES2020"
453
+ | "ES2020.BigInt"
454
+ | "ES2020.Promise"
455
+ | "ES2020.String"
456
+ | "ES2020.Symbol.WellKnown"
457
+ | "ESNext"
458
+ | "ESNext.Array"
459
+ | "ESNext.AsyncIterable"
460
+ | "ESNext.BigInt"
461
+ | "ESNext.Intl"
462
+ | "ESNext.Promise"
463
+ | "ESNext.String"
464
+ | "ESNext.Symbol"
465
+ | "DOM"
466
+ | "DOM.Iterable"
467
+ | "ScriptHost"
468
+ | "WebWorker"
469
+ | "WebWorker.ImportScripts"
470
+ | "Webworker.Iterable"
471
+ | "ES7"
472
+ | "ES2021"
473
+ | "ES2020.SharedMemory"
474
+ | "ES2020.Intl"
475
+ | "ES2021.Promise"
476
+ | "ES2021.String"
477
+ | "ES2021.WeakRef"
478
+ | "ESNext.WeakRef"
479
+ | "es2021.intl"
480
+ | "ES2022"
481
+ | "ES2022.Array"
482
+ | "ES2022.Error"
483
+ | "ES2022.Intl"
484
+ | "ES2022.Object"
485
+ | "ES2022.String"
486
+ )
487
+ | {
488
+ [k: string]: unknown;
489
+ }
490
+ | {
491
+ [k: string]: unknown;
492
+ }
493
+ | {
494
+ [k: string]: unknown;
495
+ }
496
+ | {
497
+ [k: string]: unknown;
498
+ }
499
+ | {
500
+ [k: string]: unknown;
501
+ }
502
+ | {
503
+ [k: string]: unknown;
504
+ }
505
+ | {
506
+ [k: string]: unknown;
507
+ }
508
+ | {
509
+ [k: string]: unknown;
510
+ }
511
+ | {
512
+ [k: string]: unknown;
513
+ }
514
+ | {
515
+ [k: string]: unknown;
516
+ }
517
+ | {
518
+ [k: string]: unknown;
519
+ }
520
+ | {
521
+ [k: string]: unknown;
522
+ }
523
+ | {
524
+ [k: string]: unknown;
525
+ }
526
+ ) &
527
+ string)[];
528
+ /**
529
+ * When type checking, take into account `null` and `undefined`.
530
+ */
531
+ strictNullChecks?: boolean;
532
+ /**
533
+ * Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.
534
+ */
535
+ maxNodeModuleJsDepth?: number;
536
+ /**
537
+ * Allow importing helper functions from tslib once per project, instead of including them per-file.
538
+ */
539
+ importHelpers?: boolean;
540
+ /**
541
+ * Specify emit/checking behavior for imports that are only used for types.
542
+ */
543
+ importsNotUsedAsValues?: "remove" | "preserve" | "error";
544
+ /**
545
+ * Ensure 'use strict' is always emitted.
546
+ */
547
+ alwaysStrict?: boolean;
548
+ /**
549
+ * Enable all strict type checking options.
550
+ */
551
+ strict?: boolean;
552
+ /**
553
+ * Check that the arguments for `bind`, `call`, and `apply` methods match the original function.
554
+ */
555
+ strictBindCallApply?: boolean;
556
+ /**
557
+ * Emit more compliant, but verbose and less performant JavaScript for iteration.
558
+ */
559
+ downlevelIteration?: boolean;
560
+ /**
561
+ * Enable error reporting in type-checked JavaScript files.
562
+ */
563
+ checkJs?: boolean;
564
+ /**
565
+ * When assigning functions, check to ensure parameters and the return values are subtype-compatible.
566
+ */
567
+ strictFunctionTypes?: boolean;
568
+ /**
569
+ * Check for class properties that are declared but not set in the constructor.
570
+ */
571
+ strictPropertyInitialization?: boolean;
572
+ /**
573
+ * Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.
574
+ */
575
+ esModuleInterop?: boolean;
576
+ /**
577
+ * Allow accessing UMD globals from modules.
578
+ */
579
+ allowUmdGlobalAccess?: boolean;
580
+ /**
581
+ * Make keyof only return strings instead of string, numbers or symbols. Legacy option.
582
+ */
583
+ keyofStringsOnly?: boolean;
584
+ /**
585
+ * Emit ECMAScript-standard-compliant class fields.
586
+ */
587
+ useDefineForClassFields?: boolean;
588
+ /**
589
+ * Create sourcemaps for d.ts files.
590
+ */
591
+ declarationMap?: boolean;
592
+ /**
593
+ * Enable importing .json files
594
+ */
595
+ resolveJsonModule?: boolean;
596
+ /**
597
+ * 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.
598
+ */
599
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
600
+ /**
601
+ * Output more detailed compiler performance information after building.
602
+ */
603
+ extendedDiagnostics?: boolean;
604
+ /**
605
+ * Print names of files that are part of the compilation and then stop processing.
606
+ */
607
+ listFilesOnly?: boolean;
608
+ /**
609
+ * Disable preferring source files instead of declaration files when referencing composite projects
610
+ */
611
+ disableSourceOfProjectReferenceRedirect?: boolean;
612
+ /**
613
+ * Opt a project out of multi-project reference checking when editing.
614
+ */
615
+ disableSolutionSearching?: boolean;
606
616
  [k: string]: unknown;
607
617
  }
608
618
  export interface CompileOnSaveDefinition {
@@ -725,595 +735,17 @@ export interface TsNodeDefinition {
725
735
  /**
726
736
  * JSON object to merge with TypeScript `compilerOptions`.
727
737
  */
728
- compilerOptions?: {
729
- /**
730
- * No longer supported. In early versions, manually set the text encoding for reading files.
731
- */
732
- charset?: string;
733
- /**
734
- * Enable constraints that allow a TypeScript project to be used with project references.
735
- */
736
- composite?: boolean;
737
- /**
738
- * Generate .d.ts files from TypeScript and JavaScript files in your project.
739
- */
740
- declaration?: boolean;
741
- /**
742
- * Specify the output directory for generated declaration files.
743
- */
744
- declarationDir?: string | null;
745
- /**
746
- * Output compiler performance information after building.
747
- */
748
- diagnostics?: boolean;
749
- /**
750
- * Reduce the number of projects loaded automatically by TypeScript.
751
- */
752
- disableReferencedProjectLoad?: boolean;
753
- /**
754
- * Enforces using indexed accessors for keys declared using an indexed type
755
- */
756
- noPropertyAccessFromIndexSignature?: boolean;
757
- /**
758
- * Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
759
- */
760
- emitBOM?: boolean;
761
- /**
762
- * Only output d.ts files and not JavaScript files.
763
- */
764
- emitDeclarationOnly?: boolean;
765
- /**
766
- * Differentiate between undefined and not present when type checking
767
- */
768
- exactOptionalPropertyTypes?: boolean;
769
- /**
770
- * Enable incremental compilation. Requires TypeScript version 3.4 or later.
771
- */
772
- incremental?: boolean;
773
- /**
774
- * Specify the folder for .tsbuildinfo incremental compilation files.
775
- */
776
- tsBuildInfoFile?: string;
777
- /**
778
- * Include sourcemap files inside the emitted JavaScript.
779
- */
780
- inlineSourceMap?: boolean;
781
- /**
782
- * Include source code in the sourcemaps inside the emitted JavaScript.
783
- */
784
- inlineSources?: boolean;
785
- /**
786
- * Specify what JSX code is generated.
787
- */
788
- jsx?: "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native";
789
- /**
790
- * Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit.
791
- */
792
- reactNamespace?: string;
793
- /**
794
- * Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'
795
- */
796
- jsxFactory?: string;
797
- /**
798
- * Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
799
- */
800
- jsxFragmentFactory?: string;
801
- /**
802
- * Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx`.
803
- */
804
- jsxImportSource?: string;
805
- /**
806
- * Print all of the files read during the compilation.
807
- */
808
- listFiles?: boolean;
809
- /**
810
- * Specify the location where debugger should locate map files instead of generated locations.
811
- */
812
- mapRoot?: string;
813
- /**
814
- * Specify what module code is generated.
815
- */
816
- module?: (
817
- | (
818
- | "CommonJS"
819
- | "AMD"
820
- | "System"
821
- | "UMD"
822
- | "ES6"
823
- | "ES2015"
824
- | "ES2020"
825
- | "ESNext"
826
- | "None"
827
- | "ES2022"
828
- | "Node12"
829
- | "NodeNext"
830
- )
831
- | {
832
- [k: string]: unknown;
833
- }
834
- ) &
835
- string;
836
- /**
837
- * Specify how TypeScript looks up a file from a given module specifier.
838
- */
839
- moduleResolution?: (
840
- | ("Classic" | "Node")
841
- | {
842
- [k: string]: unknown;
843
- }
844
- ) &
845
- string;
846
- /**
847
- * Set the newline character for emitting files.
848
- */
849
- newLine?: (
850
- | ("crlf" | "lf")
851
- | {
852
- [k: string]: unknown;
853
- }
854
- ) &
855
- string;
856
- /**
857
- * Disable emitting file from a compilation.
858
- */
859
- noEmit?: boolean;
860
- /**
861
- * Disable generating custom helper functions like `__extends` in compiled output.
862
- */
863
- noEmitHelpers?: boolean;
864
- /**
865
- * Disable emitting files if any type checking errors are reported.
866
- */
867
- noEmitOnError?: boolean;
868
- /**
869
- * Enable error reporting for expressions and declarations with an implied `any` type..
870
- */
871
- noImplicitAny?: boolean;
872
- /**
873
- * Enable error reporting when `this` is given the type `any`.
874
- */
875
- noImplicitThis?: boolean;
876
- /**
877
- * Enable error reporting when a local variables aren't read.
878
- */
879
- noUnusedLocals?: boolean;
880
- /**
881
- * Raise an error when a function parameter isn't read
882
- */
883
- noUnusedParameters?: boolean;
884
- /**
885
- * Disable including any library files, including the default lib.d.ts.
886
- */
887
- noLib?: boolean;
888
- /**
889
- * Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project.
890
- */
891
- noResolve?: boolean;
892
- /**
893
- * Disable strict checking of generic signatures in function types.
894
- */
895
- noStrictGenericChecks?: boolean;
896
- /**
897
- * Skip type checking .d.ts files that are included with TypeScript.
898
- */
899
- skipDefaultLibCheck?: boolean;
900
- /**
901
- * Skip type checking all .d.ts files.
902
- */
903
- skipLibCheck?: boolean;
904
- /**
905
- * 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.
906
- */
907
- outFile?: string;
908
- /**
909
- * Specify an output folder for all emitted files.
910
- */
911
- outDir?: string;
912
- /**
913
- * Disable erasing `const enum` declarations in generated code.
914
- */
915
- preserveConstEnums?: boolean;
916
- /**
917
- * Disable resolving symlinks to their realpath. This correlates to the same flag in node.
918
- */
919
- preserveSymlinks?: boolean;
920
- /**
921
- * Preserve unused imported values in the JavaScript output that would otherwise be removed
922
- */
923
- preserveValueImports?: boolean;
924
- /**
925
- * Disable wiping the console in watch mode
926
- */
927
- preserveWatchOutput?: boolean;
928
- /**
929
- * Enable color and formatting in output to make compiler errors easier to read
930
- */
931
- pretty?: boolean;
932
- /**
933
- * Disable emitting comments.
934
- */
935
- removeComments?: boolean;
936
- /**
937
- * Specify the root folder within your source files.
938
- */
939
- rootDir?: string;
940
- /**
941
- * Ensure that each file can be safely transpiled without relying on other imports.
942
- */
943
- isolatedModules?: boolean;
944
- /**
945
- * Create source map files for emitted JavaScript files.
946
- */
947
- sourceMap?: boolean;
948
- /**
949
- * Specify the root path for debuggers to find the reference source code.
950
- */
951
- sourceRoot?: string;
952
- /**
953
- * Disable reporting of excess property errors during the creation of object literals.
954
- */
955
- suppressExcessPropertyErrors?: boolean;
956
- /**
957
- * Suppress `noImplicitAny` errors when indexing objects that lack index signatures.
958
- */
959
- suppressImplicitAnyIndexErrors?: boolean;
960
- /**
961
- * Disable emitting declarations that have `@internal` in their JSDoc comments.
962
- */
963
- stripInternal?: boolean;
964
- /**
965
- * Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
966
- */
967
- target?: (
968
- | (
969
- | "ES3"
970
- | "ES5"
971
- | "ES6"
972
- | "ES2015"
973
- | "ES2016"
974
- | "ES2017"
975
- | "ES2018"
976
- | "ES2019"
977
- | "ES2020"
978
- | "ES2021"
979
- | "ES2022"
980
- | "ESNext"
981
- )
982
- | {
983
- [k: string]: unknown;
984
- }
985
- ) &
986
- string;
987
- /**
988
- * Default catch clause variables as `unknown` instead of `any`.
989
- */
990
- useUnknownInCatchVariables?: boolean;
991
- /**
992
- * Watch input files.
993
- */
994
- watch?: boolean;
995
- /**
996
- * 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.
997
- */
998
- fallbackPolling?:
999
- | "fixedPollingInterval"
1000
- | "priorityPollingInterval"
1001
- | "dynamicPriorityPolling"
1002
- | "fixedInterval"
1003
- | "priorityInterval"
1004
- | "dynamicPriority"
1005
- | "fixedChunkSize";
1006
- /**
1007
- * Specify the strategy for watching directories under systems that lack recursive file-watching functionality. Requires TypeScript version 3.8 or later.
1008
- */
1009
- watchDirectory?: "useFsEvents" | "fixedPollingInterval" | "dynamicPriorityPolling" | "fixedChunkSizePolling";
1010
- /**
1011
- * Specify the strategy for watching individual files. Requires TypeScript version 3.8 or later.
1012
- */
1013
- watchFile?:
1014
- | "fixedPollingInterval"
1015
- | "priorityPollingInterval"
1016
- | "dynamicPriorityPolling"
1017
- | "useFsEvents"
1018
- | "useFsEventsOnParentDirectory"
1019
- | "fixedChunkSizePolling";
1020
- /**
1021
- * Enable experimental support for TC39 stage 2 draft decorators.
1022
- */
1023
- experimentalDecorators?: boolean;
1024
- /**
1025
- * Emit design-type metadata for decorated declarations in source files.
1026
- */
1027
- emitDecoratorMetadata?: boolean;
1028
- /**
1029
- * Disable error reporting for unused labels.
1030
- */
1031
- allowUnusedLabels?: boolean;
1032
- /**
1033
- * Enable error reporting for codepaths that do not explicitly return in a function.
1034
- */
1035
- noImplicitReturns?: boolean;
1036
- /**
1037
- * Add `undefined` to a type when accessed using an index.
1038
- */
1039
- noUncheckedIndexedAccess?: boolean;
1040
- /**
1041
- * Enable error reporting for fallthrough cases in switch statements.
1042
- */
1043
- noFallthroughCasesInSwitch?: boolean;
1044
- /**
1045
- * Ensure overriding members in derived classes are marked with an override modifier.
1046
- */
1047
- noImplicitOverride?: boolean;
1048
- /**
1049
- * Disable error reporting for unreachable code.
1050
- */
1051
- allowUnreachableCode?: boolean;
1052
- /**
1053
- * Ensure that casing is correct in imports.
1054
- */
1055
- forceConsistentCasingInFileNames?: boolean;
1056
- /**
1057
- * Emit a v8 CPU profile of the compiler run for debugging.
1058
- */
1059
- generateCpuProfile?: string;
1060
- /**
1061
- * Specify the base directory to resolve non-relative module names.
1062
- */
1063
- baseUrl?: string;
1064
- /**
1065
- * Specify a set of entries that re-map imports to additional lookup locations.
1066
- */
1067
- paths?: {
1068
- [k: string]: string[];
1069
- };
1070
- /**
1071
- * Specify a list of language service plugins to include.
1072
- */
1073
- plugins?: {
1074
- /**
1075
- * Plugin name.
1076
- */
1077
- name?: string;
1078
- [k: string]: unknown;
1079
- }[];
1080
- /**
1081
- * Allow multiple folders to be treated as one when resolving modules.
1082
- */
1083
- rootDirs?: string[];
1084
- /**
1085
- * Specify multiple folders that act like `./node_modules/@types`.
1086
- */
1087
- typeRoots?: string[];
1088
- /**
1089
- * Specify type package names to be included without being referenced in a source file.
1090
- */
1091
- types?: string[];
1092
- /**
1093
- * Enable tracing of the name resolution process. Requires TypeScript version 2.0 or later.
1094
- */
1095
- traceResolution?: boolean;
1096
- /**
1097
- * Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.
1098
- */
1099
- allowJs?: boolean;
1100
- /**
1101
- * Disable truncating types in error messages.
1102
- */
1103
- noErrorTruncation?: boolean;
1104
- /**
1105
- * Allow 'import x from y' when a module doesn't have a default export.
1106
- */
1107
- allowSyntheticDefaultImports?: boolean;
1108
- /**
1109
- * Disable adding 'use strict' directives in emitted JavaScript files.
1110
- */
1111
- noImplicitUseStrict?: boolean;
1112
- /**
1113
- * Print the names of emitted files after a compilation.
1114
- */
1115
- listEmittedFiles?: boolean;
1116
- /**
1117
- * Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.
1118
- */
1119
- disableSizeLimit?: boolean;
1120
- /**
1121
- * Specify a set of bundled library declaration files that describe the target runtime environment.
1122
- */
1123
- lib?: ((
1124
- | (
1125
- | "ES5"
1126
- | "ES6"
1127
- | "ES2015"
1128
- | "ES2015.Collection"
1129
- | "ES2015.Core"
1130
- | "ES2015.Generator"
1131
- | "ES2015.Iterable"
1132
- | "ES2015.Promise"
1133
- | "ES2015.Proxy"
1134
- | "ES2015.Reflect"
1135
- | "ES2015.Symbol.WellKnown"
1136
- | "ES2015.Symbol"
1137
- | "ES2016"
1138
- | "ES2016.Array.Include"
1139
- | "ES2017"
1140
- | "ES2017.Intl"
1141
- | "ES2017.Object"
1142
- | "ES2017.SharedMemory"
1143
- | "ES2017.String"
1144
- | "ES2017.TypedArrays"
1145
- | "ES2018"
1146
- | "ES2018.AsyncGenerator"
1147
- | "ES2018.AsyncIterable"
1148
- | "ES2018.Intl"
1149
- | "ES2018.Promise"
1150
- | "ES2018.Regexp"
1151
- | "ES2019"
1152
- | "ES2019.Array"
1153
- | "ES2019.Object"
1154
- | "ES2019.String"
1155
- | "ES2019.Symbol"
1156
- | "ES2020"
1157
- | "ES2020.BigInt"
1158
- | "ES2020.Promise"
1159
- | "ES2020.String"
1160
- | "ES2020.Symbol.WellKnown"
1161
- | "ESNext"
1162
- | "ESNext.Array"
1163
- | "ESNext.AsyncIterable"
1164
- | "ESNext.BigInt"
1165
- | "ESNext.Intl"
1166
- | "ESNext.Promise"
1167
- | "ESNext.String"
1168
- | "ESNext.Symbol"
1169
- | "DOM"
1170
- | "DOM.Iterable"
1171
- | "ScriptHost"
1172
- | "WebWorker"
1173
- | "WebWorker.ImportScripts"
1174
- | "Webworker.Iterable"
1175
- | "ES7"
1176
- | "ES2021"
1177
- | "ES2020.SharedMemory"
1178
- | "ES2020.Intl"
1179
- | "ES2021.Promise"
1180
- | "ES2021.String"
1181
- | "ES2021.WeakRef"
1182
- | "ESNext.WeakRef"
1183
- | "es2021.intl"
1184
- )
1185
- | {
1186
- [k: string]: unknown;
1187
- }
1188
- | {
1189
- [k: string]: unknown;
1190
- }
1191
- | {
1192
- [k: string]: unknown;
1193
- }
1194
- | {
1195
- [k: string]: unknown;
1196
- }
1197
- | {
1198
- [k: string]: unknown;
1199
- }
1200
- | {
1201
- [k: string]: unknown;
1202
- }
1203
- | {
1204
- [k: string]: unknown;
1205
- }
1206
- | {
1207
- [k: string]: unknown;
1208
- }
1209
- | {
1210
- [k: string]: unknown;
1211
- }
1212
- | {
1213
- [k: string]: unknown;
1214
- }
1215
- | {
1216
- [k: string]: unknown;
1217
- }
1218
- | {
1219
- [k: string]: unknown;
1220
- }
1221
- ) &
1222
- string)[];
1223
- /**
1224
- * When type checking, take into account `null` and `undefined`.
1225
- */
1226
- strictNullChecks?: boolean;
1227
- /**
1228
- * Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.
1229
- */
1230
- maxNodeModuleJsDepth?: number;
1231
- /**
1232
- * Allow importing helper functions from tslib once per project, instead of including them per-file.
1233
- */
1234
- importHelpers?: boolean;
1235
- /**
1236
- * Specify emit/checking behavior for imports that are only used for types.
1237
- */
1238
- importsNotUsedAsValues?: "remove" | "preserve" | "error";
1239
- /**
1240
- * Ensure 'use strict' is always emitted.
1241
- */
1242
- alwaysStrict?: boolean;
1243
- /**
1244
- * Enable all strict type checking options.
1245
- */
1246
- strict?: boolean;
1247
- /**
1248
- * Check that the arguments for `bind`, `call`, and `apply` methods match the original function.
1249
- */
1250
- strictBindCallApply?: boolean;
1251
- /**
1252
- * Emit more compliant, but verbose and less performant JavaScript for iteration.
1253
- */
1254
- downlevelIteration?: boolean;
1255
- /**
1256
- * Enable error reporting in type-checked JavaScript files.
1257
- */
1258
- checkJs?: boolean;
1259
- /**
1260
- * When assigning functions, check to ensure parameters and the return values are subtype-compatible.
1261
- */
1262
- strictFunctionTypes?: boolean;
1263
- /**
1264
- * Check for class properties that are declared but not set in the constructor.
1265
- */
1266
- strictPropertyInitialization?: boolean;
1267
- /**
1268
- * Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.
1269
- */
1270
- esModuleInterop?: boolean;
1271
- /**
1272
- * Allow accessing UMD globals from modules.
1273
- */
1274
- allowUmdGlobalAccess?: boolean;
1275
- /**
1276
- * Make keyof only return strings instead of string, numbers or symbols. Legacy option.
1277
- */
1278
- keyofStringsOnly?: boolean;
1279
- /**
1280
- * Emit ECMAScript-standard-compliant class fields.
1281
- */
1282
- useDefineForClassFields?: boolean;
1283
- /**
1284
- * Create sourcemaps for d.ts files.
1285
- */
1286
- declarationMap?: boolean;
1287
- /**
1288
- * Enable importing .json files
1289
- */
1290
- resolveJsonModule?: boolean;
1291
- /**
1292
- * 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.
1293
- */
1294
- assumeChangesOnlyAffectDirectDependencies?: boolean;
1295
- /**
1296
- * Output more detailed compiler performance information after building.
1297
- */
1298
- extendedDiagnostics?: boolean;
1299
- /**
1300
- * Print names of files that are part of the compilation and then stop processing.
1301
- */
1302
- listFilesOnly?: boolean;
1303
- /**
1304
- * Disable preferring source files instead of declaration files when referencing composite projects
1305
- */
1306
- disableSourceOfProjectReferenceRedirect?: boolean;
1307
- /**
1308
- * Opt a project out of multi-project reference checking when editing.
1309
- */
1310
- disableSolutionSearching?: boolean;
1311
- [k: string]: unknown;
1312
- };
738
+ compilerOptions?: CompilerOptions;
1313
739
  /**
1314
740
  * Emit output files into `.ts-node` directory.
1315
741
  */
1316
742
  emit?: boolean;
743
+ /**
744
+ * Enable native ESM support.
745
+ *
746
+ * For details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules
747
+ */
748
+ esm?: boolean;
1317
749
  /**
1318
750
  * Allows the usage of top level await in REPL.
1319
751
  *
@@ -1325,6 +757,20 @@ export interface TsNodeDefinition {
1325
757
  * to get default, automatic behavior.
1326
758
  */
1327
759
  experimentalReplAwait?: boolean;
760
+ /**
761
+ * Enable experimental features that re-map imports and require calls to support:
762
+ * `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,
763
+ * `outDir` to `rootDir` mappings for composite projects and monorepos.
764
+ *
765
+ * For details, see https://github.com/TypeStrong/ts-node/issues/1514
766
+ */
767
+ experimentalResolver?: boolean;
768
+ /**
769
+ * Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.
770
+ *
771
+ * For details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm
772
+ */
773
+ experimentalSpecifierResolution?: "explicit" | "node";
1328
774
  /**
1329
775
  * Load "files" and "include" from `tsconfig.json` on startup.
1330
776
  *
@@ -1349,23 +795,7 @@ export interface TsNodeDefinition {
1349
795
  * Logs TypeScript errors to stderr instead of throwing exceptions.
1350
796
  */
1351
797
  logError?: boolean;
1352
- /**
1353
- * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.
1354
- * When overridden, the tsconfig "module" and package.json "type" fields are overridden.
1355
- * This is useful because TypeScript files cannot use the .cjs nor .mjs file extensions;
1356
- * it achieves the same effect.
1357
- *
1358
- * Each key is a glob pattern following the same rules as tsconfig's "include" array.
1359
- * When multiple patterns match the same file, the last pattern takes precedence.
1360
- *
1361
- * `cjs` overrides matches files to compile and execute as CommonJS.
1362
- * `esm` overrides matches files to compile and execute as native ECMAScript modules.
1363
- * `package` overrides either of the above to default behavior, which obeys package.json "type" and
1364
- * tsconfig.json "module" options.
1365
- */
1366
- moduleTypes?: {
1367
- [k: string]: unknown;
1368
- };
798
+ moduleTypes?: TsNodeModuleTypes;
1369
799
  /**
1370
800
  * Re-order file extensions so that TypeScript imports are preferred.
1371
801
  *
@@ -1394,6 +824,14 @@ export interface TsNodeDefinition {
1394
824
  * Skip ignore check, so that compilation will be attempted for all files with matching extensions.
1395
825
  */
1396
826
  skipIgnore?: boolean;
827
+ /**
828
+ * Transpile with swc instead of the TypeScript compiler, and skip typechecking.
829
+ *
830
+ * Equivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`
831
+ *
832
+ * For complete instructions: https://typestrong.org/ts-node/docs/transpilers
833
+ */
834
+ swc?: boolean;
1397
835
  /**
1398
836
  * Use TypeScript's faster `transpileModule`.
1399
837
  */
@@ -1406,13 +844,7 @@ export interface TsNodeDefinition {
1406
844
  string,
1407
845
  {
1408
846
  [k: string]: unknown;
1409
- },
1410
- ...(
1411
- | string
1412
- | {
1413
- [k: string]: unknown;
1414
- }
1415
- )[]
847
+ }
1416
848
  ]
1417
849
  | string;
1418
850
  /**
@@ -1423,6 +855,24 @@ export interface TsNodeDefinition {
1423
855
  };
1424
856
  [k: string]: unknown;
1425
857
  }
858
+ /**
859
+ * Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.
860
+ * When overridden, the tsconfig "module" and package.json "type" fields are overridden, and
861
+ * the file extension is ignored.
862
+ * This is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;
863
+ * it achieves the same effect.
864
+ *
865
+ * Each key is a glob pattern following the same rules as tsconfig's "include" array.
866
+ * When multiple patterns match the same file, the last pattern takes precedence.
867
+ *
868
+ * `cjs` overrides matches files to compile and execute as CommonJS.
869
+ * `esm` overrides matches files to compile and execute as native ECMAScript modules.
870
+ * `package` overrides either of the above to default behavior, which obeys package.json "type" and
871
+ * tsconfig.json "module" options.
872
+ */
873
+ export interface TsNodeModuleTypes {
874
+ [k: string]: unknown;
875
+ }
1426
876
  export interface FilesDefinition {
1427
877
  /**
1428
878
  * If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.