UNPKG

24.7 kBTypeScriptView Raw
1declare namespace TsConfigJson {
2 namespace CompilerOptions {
3 export type JSX =
4 | 'preserve'
5 | 'react'
6 | 'react-jsx'
7 | 'react-jsxdev'
8 | 'react-native';
9
10 export type Module =
11 | 'CommonJS'
12 | 'AMD'
13 | 'System'
14 | 'UMD'
15 | 'ES6'
16 | 'ES2015'
17 | 'ES2020'
18 | 'ES2022'
19 | 'ESNext'
20 | 'Node16'
21 | 'NodeNext'
22 | 'Preserve'
23 | 'None'
24 // Lowercase alternatives
25 | 'commonjs'
26 | 'amd'
27 | 'system'
28 | 'umd'
29 | 'es6'
30 | 'es2015'
31 | 'es2020'
32 | 'es2022'
33 | 'esnext'
34 | 'node16'
35 | 'nodenext'
36 | 'preserve'
37 | 'none';
38
39 export type NewLine =
40 | 'CRLF'
41 | 'LF'
42 // Lowercase alternatives
43 | 'crlf'
44 | 'lf';
45
46 export type Target =
47 | 'ES3'
48 | 'ES5'
49 | 'ES6'
50 | 'ES2015'
51 | 'ES2016'
52 | 'ES2017'
53 | 'ES2018'
54 | 'ES2019'
55 | 'ES2020'
56 | 'ES2021'
57 | 'ES2022'
58 | 'ESNext'
59 // Lowercase alternatives
60 | 'es3'
61 | 'es5'
62 | 'es6'
63 | 'es2015'
64 | 'es2016'
65 | 'es2017'
66 | 'es2018'
67 | 'es2019'
68 | 'es2020'
69 | 'es2021'
70 | 'es2022'
71 | 'esnext';
72
73 // eslint-disable-next-line unicorn/prevent-abbreviations
74 export type Lib =
75 | 'ES5'
76 | 'ES6'
77 | 'ES7'
78 | 'ES2015'
79 | 'ES2015.Collection'
80 | 'ES2015.Core'
81 | 'ES2015.Generator'
82 | 'ES2015.Iterable'
83 | 'ES2015.Promise'
84 | 'ES2015.Proxy'
85 | 'ES2015.Reflect'
86 | 'ES2015.Symbol.WellKnown'
87 | 'ES2015.Symbol'
88 | 'ES2016'
89 | 'ES2016.Array.Include'
90 | 'ES2017'
91 | 'ES2017.Intl'
92 | 'ES2017.Object'
93 | 'ES2017.SharedMemory'
94 | 'ES2017.String'
95 | 'ES2017.TypedArrays'
96 | 'ES2018'
97 | 'ES2018.AsyncGenerator'
98 | 'ES2018.AsyncIterable'
99 | 'ES2018.Intl'
100 | 'ES2018.Promise'
101 | 'ES2018.Regexp'
102 | 'ES2019'
103 | 'ES2019.Array'
104 | 'ES2019.Object'
105 | 'ES2019.String'
106 | 'ES2019.Symbol'
107 | 'ES2020'
108 | 'ES2020.BigInt'
109 | 'ES2020.Promise'
110 | 'ES2020.String'
111 | 'ES2020.Symbol.WellKnown'
112 | 'ES2020.SharedMemory'
113 | 'ES2020.Intl'
114 | 'ES2021'
115 | 'ES2021.Promise'
116 | 'ES2021.String'
117 | 'ES2021.WeakRef'
118 | 'ES2022'
119 | 'ES2022.Array'
120 | 'ES2022.Error'
121 | 'ES2022.Intl'
122 | 'ES2022.Object'
123 | 'ES2022.SharedMemory'
124 | 'ES2022.String'
125 | 'ES2022.RegExp'
126 | 'ESNext'
127 | 'ESNext.Array'
128 | 'ESNext.AsyncIterable'
129 | 'ESNext.BigInt'
130 | 'ESNext.Intl'
131 | 'ESNext.Promise'
132 | 'ESNext.String'
133 | 'ESNext.Symbol'
134 | 'ESNext.WeakRef'
135 | 'DOM'
136 | 'DOM.Iterable'
137 | 'ScriptHost'
138 | 'WebWorker'
139 | 'WebWorker.ImportScripts'
140 | 'WebWorker.Iterable'
141 // Lowercase alternatives
142 | 'es5'
143 | 'es6'
144 | 'es7'
145 | 'es2015'
146 | 'es2015.collection'
147 | 'es2015.core'
148 | 'es2015.generator'
149 | 'es2015.iterable'
150 | 'es2015.promise'
151 | 'es2015.proxy'
152 | 'es2015.reflect'
153 | 'es2015.symbol.wellknown'
154 | 'es2015.symbol'
155 | 'es2016'
156 | 'es2016.array.include'
157 | 'es2017'
158 | 'es2017.intl'
159 | 'es2017.object'
160 | 'es2017.sharedmemory'
161 | 'es2017.string'
162 | 'es2017.typedarrays'
163 | 'es2018'
164 | 'es2018.asyncgenerator'
165 | 'es2018.asynciterable'
166 | 'es2018.intl'
167 | 'es2018.promise'
168 | 'es2018.regexp'
169 | 'es2019'
170 | 'es2019.array'
171 | 'es2019.object'
172 | 'es2019.string'
173 | 'es2019.symbol'
174 | 'es2020'
175 | 'es2020.bigint'
176 | 'es2020.promise'
177 | 'es2020.string'
178 | 'es2020.symbol.wellknown'
179 | 'es2020.sharedmemory'
180 | 'es2020.intl'
181 | 'es2021'
182 | 'es2021.promise'
183 | 'es2021.string'
184 | 'es2021.weakref'
185 | 'es2022'
186 | 'es2022.array'
187 | 'es2022.error'
188 | 'es2022.intl'
189 | 'es2022.object'
190 | 'es2022.sharedmemory'
191 | 'es2022.string'
192 | 'es2022.regexp'
193 | 'esnext'
194 | 'esnext.array'
195 | 'esnext.asynciterable'
196 | 'esnext.bigint'
197 | 'esnext.intl'
198 | 'esnext.promise'
199 | 'esnext.string'
200 | 'esnext.symbol'
201 | 'esnext.weakref'
202 | 'dom'
203 | 'dom.iterable'
204 | 'scripthost'
205 | 'webworker'
206 | 'webworker.importscripts'
207 | 'webworker.iterable';
208
209 export type Plugin = {
210 /**
211 Plugin name.
212 */
213 name: string;
214 };
215
216 export type ImportsNotUsedAsValues =
217 | 'remove'
218 | 'preserve'
219 | 'error';
220
221 export type FallbackPolling =
222 | 'fixedPollingInterval'
223 | 'priorityPollingInterval'
224 | 'dynamicPriorityPolling'
225 | 'fixedInterval'
226 | 'priorityInterval'
227 | 'dynamicPriority'
228 | 'fixedChunkSize';
229
230 export type WatchDirectory =
231 | 'useFsEvents'
232 | 'fixedPollingInterval'
233 | 'dynamicPriorityPolling'
234 | 'fixedChunkSizePolling';
235
236 export type WatchFile =
237 | 'fixedPollingInterval'
238 | 'priorityPollingInterval'
239 | 'dynamicPriorityPolling'
240 | 'useFsEvents'
241 | 'useFsEventsOnParentDirectory'
242 | 'fixedChunkSizePolling';
243
244 export type ModuleResolution =
245 | 'classic'
246 | 'node'
247 | 'node10'
248 | 'node16'
249 | 'nodenext'
250 | 'bundler'
251 // Pascal-cased alternatives
252 | 'Classic'
253 | 'Node'
254 | 'Node10'
255 | 'Node16'
256 | 'NodeNext'
257 | 'Bundler';
258
259 export type ModuleDetection =
260 | 'auto'
261 | 'legacy'
262 | 'force';
263
264 export type IgnoreDeprecations = '5.0';
265 }
266
267 export type CompilerOptions = {
268 /**
269 The character set of the input files.
270
271 @default 'utf8'
272 @deprecated This option will be removed in TypeScript 5.5.
273 */
274 charset?: string;
275
276 /**
277 Enables building for project references.
278
279 @default true
280 */
281 composite?: boolean;
282
283 /**
284 Generates corresponding d.ts files.
285
286 @default false
287 */
288 declaration?: boolean;
289
290 /**
291 Specify output directory for generated declaration files.
292 */
293 declarationDir?: string;
294
295 /**
296 Show diagnostic information.
297
298 @default false
299 */
300 diagnostics?: boolean;
301
302 /**
303 Reduce the number of projects loaded automatically by TypeScript.
304
305 @default false
306 */
307 disableReferencedProjectLoad?: boolean;
308
309 /**
310 Enforces using indexed accessors for keys declared using an indexed type.
311
312 @default false
313 */
314 noPropertyAccessFromIndexSignature?: boolean;
315
316 /**
317 Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
318
319 @default false
320 */
321 emitBOM?: boolean;
322
323 /**
324 Only emit `.d.ts` declaration files.
325
326 @default false
327 */
328 emitDeclarationOnly?: boolean;
329
330 /**
331 Differentiate between undefined and not present when type checking.
332
333 @default false
334 */
335 exactOptionalPropertyTypes?: boolean;
336
337 /**
338 Enable incremental compilation.
339
340 @default `composite`
341 */
342 incremental?: boolean;
343
344 /**
345 Specify file to store incremental compilation information.
346
347 @default '.tsbuildinfo'
348 */
349 tsBuildInfoFile?: string;
350
351 /**
352 Emit a single file with source maps instead of having a separate file.
353
354 @default false
355 */
356 inlineSourceMap?: boolean;
357
358 /**
359 Emit the source alongside the sourcemaps within a single file.
360
361 Requires `--inlineSourceMap` to be set.
362
363 @default false
364 */
365 inlineSources?: boolean;
366
367 /**
368 Specify what JSX code is generated.
369
370 @default 'preserve'
371 */
372 jsx?: CompilerOptions.JSX;
373
374 /**
375 Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
376
377 @default 'React'
378 */
379 reactNamespace?: string;
380
381 /**
382 Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
383
384 @default 'React.createElement'
385 */
386 jsxFactory?: string;
387
388 /**
389 Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.
390
391 @default 'React.Fragment'
392 */
393 jsxFragmentFactory?: string;
394
395 /**
396 Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.
397
398 @default 'react'
399 */
400 jsxImportSource?: string;
401
402 /**
403 Print names of files part of the compilation.
404
405 @default false
406 */
407 listFiles?: boolean;
408
409 /**
410 Specifies the location where debugger should locate map files instead of generated locations.
411 */
412 mapRoot?: string;
413
414 /**
415 Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
416
417 @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
418 */
419 module?: CompilerOptions.Module;
420
421 /**
422 Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
423
424 @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
425 */
426 moduleResolution?: CompilerOptions.ModuleResolution;
427
428 /**
429 Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
430
431 @default 'LF'
432 */
433 newLine?: CompilerOptions.NewLine;
434
435 /**
436 Do not emit output.
437
438 @default false
439 */
440 noEmit?: boolean;
441
442 /**
443 Do not generate custom helper functions like `__extends` in compiled output.
444
445 @default false
446 */
447 noEmitHelpers?: boolean;
448
449 /**
450 Do not emit outputs if any type checking errors were reported.
451
452 @default false
453 */
454 noEmitOnError?: boolean;
455
456 /**
457 Warn on expressions and declarations with an implied 'any' type.
458
459 @default false
460 */
461 noImplicitAny?: boolean;
462
463 /**
464 Raise error on 'this' expressions with an implied any type.
465
466 @default false
467 */
468 noImplicitThis?: boolean;
469
470 /**
471 Report errors on unused locals.
472
473 @default false
474 */
475 noUnusedLocals?: boolean;
476
477 /**
478 Report errors on unused parameters.
479
480 @default false
481 */
482 noUnusedParameters?: boolean;
483
484 /**
485 Do not include the default library file (lib.d.ts).
486
487 @default false
488 */
489 noLib?: boolean;
490
491 /**
492 Do not add triple-slash references or module import targets to the list of compiled files.
493
494 @default false
495 */
496 noResolve?: boolean;
497
498 /**
499 Disable strict checking of generic signatures in function types.
500
501 @default false
502 @deprecated This option will be removed in TypeScript 5.5.
503 */
504 noStrictGenericChecks?: boolean;
505
506 /**
507 @deprecated use `skipLibCheck` instead.
508 */
509 skipDefaultLibCheck?: boolean;
510
511 /**
512 Skip type checking of declaration files.
513
514 @default false
515 */
516 skipLibCheck?: boolean;
517
518 /**
519 Concatenate and emit output to single file.
520 */
521 outFile?: string;
522
523 /**
524 Redirect output structure to the directory.
525 */
526 outDir?: string;
527
528 /**
529 Do not erase const enum declarations in generated code.
530
531 @default false
532 */
533 preserveConstEnums?: boolean;
534
535 /**
536 Do not resolve symlinks to their real path; treat a symlinked file like a real one.
537
538 @default false
539 */
540 preserveSymlinks?: boolean;
541
542 /**
543 Keep outdated console output in watch mode instead of clearing the screen.
544
545 @default false
546 */
547 preserveWatchOutput?: boolean;
548
549 /**
550 Stylize errors and messages using color and context (experimental).
551
552 @default true // Unless piping to another program or redirecting output to a file.
553 */
554 pretty?: boolean;
555
556 /**
557 Do not emit comments to output.
558
559 @default false
560 */
561 removeComments?: boolean;
562
563 /**
564 Specifies the root directory of input files.
565
566 Use to control the output directory structure with `--outDir`.
567 */
568 rootDir?: string;
569
570 /**
571 Unconditionally emit imports for unresolved files.
572
573 @default false
574 */
575 isolatedModules?: boolean;
576
577 /**
578 Generates corresponding '.map' file.
579
580 @default false
581 */
582 sourceMap?: boolean;
583
584 /**
585 Specifies the location where debugger should locate TypeScript files instead of source locations.
586 */
587 sourceRoot?: string;
588
589 /**
590 Suppress excess property checks for object literals.
591
592 @default false
593 @deprecated This option will be removed in TypeScript 5.5.
594 */
595 suppressExcessPropertyErrors?: boolean;
596
597 /**
598 Suppress noImplicitAny errors for indexing objects lacking index signatures.
599
600 @default false
601 @deprecated This option will be removed in TypeScript 5.5.
602 */
603 suppressImplicitAnyIndexErrors?: boolean;
604
605 /**
606 Do not emit declarations for code that has an `@internal` annotation.
607 */
608 stripInternal?: boolean;
609
610 /**
611 Specify ECMAScript target version.
612
613 @default 'es3'
614 */
615 target?: CompilerOptions.Target;
616
617 /**
618 Default catch clause variables as `unknown` instead of `any`.
619
620 @default false
621 */
622 useUnknownInCatchVariables?: boolean;
623
624 /**
625 Watch input files.
626
627 @default false
628 @deprecated Use watchOptions instead.
629 */
630 watch?: boolean;
631
632 /**
633 Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
634
635 @deprecated Use watchOptions.fallbackPolling instead.
636 */
637 fallbackPolling?: CompilerOptions.FallbackPolling;
638
639 /**
640 Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
641
642 @default 'useFsEvents'
643 @deprecated Use watchOptions.watchDirectory instead.
644 */
645 watchDirectory?: CompilerOptions.WatchDirectory;
646
647 /**
648 Specify the strategy for watching individual files.
649
650 @default 'useFsEvents'
651 @deprecated Use watchOptions.watchFile instead.
652 */
653 watchFile?: CompilerOptions.WatchFile;
654
655 /**
656 Enables experimental support for ES7 decorators.
657
658 @default false
659 */
660 experimentalDecorators?: boolean;
661
662 /**
663 Emit design-type metadata for decorated declarations in source.
664
665 @default false
666 */
667 emitDecoratorMetadata?: boolean;
668
669 /**
670 Do not report errors on unused labels.
671
672 @default false
673 */
674 allowUnusedLabels?: boolean;
675
676 /**
677 Report error when not all code paths in function return a value.
678
679 @default false
680 */
681 noImplicitReturns?: boolean;
682
683 /**
684 Add `undefined` to a type when accessed using an index.
685
686 @default false
687 */
688 noUncheckedIndexedAccess?: boolean;
689
690 /**
691 Report errors for fallthrough cases in switch statement.
692
693 @default false
694 */
695 noFallthroughCasesInSwitch?: boolean;
696
697 /**
698 Ensure overriding members in derived classes are marked with an override modifier.
699
700 @default false
701 */
702 noImplicitOverride?: boolean;
703
704 /**
705 Do not report errors on unreachable code.
706
707 @default false
708 */
709 allowUnreachableCode?: boolean;
710
711 /**
712 Disallow inconsistently-cased references to the same file.
713
714 @default true
715 */
716 forceConsistentCasingInFileNames?: boolean;
717
718 /**
719 Emit a v8 CPU profile of the compiler run for debugging.
720
721 @default 'profile.cpuprofile'
722 */
723 generateCpuProfile?: string;
724
725 /**
726 Base directory to resolve non-relative module names.
727 */
728 baseUrl?: string;
729
730 /**
731 Specify path mapping to be computed relative to baseUrl option.
732 */
733 paths?: Record<string, string[]>;
734
735 /**
736 List of TypeScript language server plugins to load.
737 */
738 plugins?: CompilerOptions.Plugin[];
739
740 /**
741 Specify list of root directories to be used when resolving modules.
742 */
743 rootDirs?: string[];
744
745 /**
746 Specify list of directories for type definition files to be included.
747 */
748 typeRoots?: string[];
749
750 /**
751 Type declaration files to be included in compilation.
752 */
753 types?: string[];
754
755 /**
756 Enable tracing of the name resolution process.
757
758 @default false
759 */
760 traceResolution?: boolean;
761
762 /**
763 Allow javascript files to be compiled.
764
765 @default false
766 */
767 allowJs?: boolean;
768
769 /**
770 Do not truncate error messages.
771
772 @default false
773 */
774 noErrorTruncation?: boolean;
775
776 /**
777 Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
778
779 @default module === 'system' || esModuleInterop
780 */
781 allowSyntheticDefaultImports?: boolean;
782
783 /**
784 Do not emit `'use strict'` directives in module output.
785
786 @default false
787 @deprecated This option will be removed in TypeScript 5.5.
788 */
789 noImplicitUseStrict?: boolean;
790
791 /**
792 Enable to list all emitted files.
793
794 @default false
795 */
796 listEmittedFiles?: boolean;
797
798 /**
799 Disable size limit for JavaScript project.
800
801 @default false
802 */
803 disableSizeLimit?: boolean;
804
805 /**
806 List of library files to be included in the compilation.
807 */
808 lib?: CompilerOptions.Lib[];
809
810 /**
811 Enable strict null checks.
812
813 @default false
814 */
815 strictNullChecks?: boolean;
816
817 /**
818 The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
819
820 @default 0
821 */
822 maxNodeModuleJsDepth?: number;
823
824 /**
825 Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
826
827 @default false
828 */
829 importHelpers?: boolean;
830
831 /**
832 Specify emit/checking behavior for imports that are only used for types.
833
834 @default 'remove'
835 @deprecated Use `verbatimModuleSyntax` instead.
836 */
837 importsNotUsedAsValues?: CompilerOptions.ImportsNotUsedAsValues;
838
839 /**
840 Parse in strict mode and emit `'use strict'` for each source file.
841
842 @default false
843 */
844 alwaysStrict?: boolean;
845
846 /**
847 Enable all strict type checking options.
848
849 @default false
850 */
851 strict?: boolean;
852
853 /**
854 Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
855
856 @default false
857 */
858 strictBindCallApply?: boolean;
859
860 /**
861 Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
862
863 @default false
864 */
865 downlevelIteration?: boolean;
866
867 /**
868 Report errors in `.js` files.
869
870 @default false
871 */
872 checkJs?: boolean;
873
874 /**
875 Disable bivariant parameter checking for function types.
876
877 @default false
878 */
879 strictFunctionTypes?: boolean;
880
881 /**
882 Ensure non-undefined class properties are initialized in the constructor.
883
884 @default false
885 */
886 strictPropertyInitialization?: boolean;
887
888 /**
889 Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
890
891 @default false
892 */
893 esModuleInterop?: boolean;
894
895 /**
896 Allow accessing UMD globals from modules.
897
898 @default false
899 */
900 allowUmdGlobalAccess?: boolean;
901
902 /**
903 Resolve `keyof` to string valued property names only (no numbers or symbols).
904
905 @default false
906 @deprecated This option will be removed in TypeScript 5.5.
907 */
908 keyofStringsOnly?: boolean;
909
910 /**
911 Emit ECMAScript standard class fields.
912
913 @default false
914 */
915 useDefineForClassFields?: boolean;
916
917 /**
918 Generates a sourcemap for each corresponding `.d.ts` file.
919
920 @default false
921 */
922 declarationMap?: boolean;
923
924 /**
925 Include modules imported with `.json` extension.
926
927 @default false
928 */
929 resolveJsonModule?: boolean;
930
931 /**
932 Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
933
934 @default false
935 */
936 assumeChangesOnlyAffectDirectDependencies?: boolean;
937
938 /**
939 Output more detailed compiler performance information after building.
940
941 @default false
942 */
943 extendedDiagnostics?: boolean;
944
945 /**
946 Print names of files that are part of the compilation and then stop processing.
947
948 @default false
949 */
950 listFilesOnly?: boolean;
951
952 /**
953 Disable preferring source files instead of declaration files when referencing composite projects.
954
955 @default true if composite, false otherwise
956 */
957 disableSourceOfProjectReferenceRedirect?: boolean;
958
959 /**
960 Opt a project out of multi-project reference checking when editing.
961
962 @default false
963 */
964 disableSolutionSearching?: boolean;
965
966 /**
967 Print names of files which TypeScript sees as a part of your project and the reason they are part of the compilation.
968
969 @default false
970 */
971 explainFiles?: boolean;
972
973 /**
974 Preserve unused imported values in the JavaScript output that would otherwise be removed.
975
976 @default true
977 @deprecated Use `verbatimModuleSyntax` instead.
978 */
979 preserveValueImports?: boolean;
980
981 /**
982 List of file name suffixes to search when resolving a module.
983 */
984 moduleSuffixes?: string[];
985
986 /**
987 Control what method is used to detect module-format JS files.
988
989 @default 'auto'
990 */
991 moduleDetection?: CompilerOptions.ModuleDetection;
992
993 /**
994 Allows TypeScript files to import each other with a TypeScript-specific extension like .ts, .mts, or .tsx.
995
996 @default false
997 */
998 allowImportingTsExtensions?: boolean;
999
1000 /**
1001 Forces TypeScript to consult the exports field of package.json files if it ever reads from a package in node_modules.
1002
1003 @default false
1004 */
1005 resolvePackageJsonExports?: boolean;
1006
1007 /**
1008 Forces TypeScript to consult the imports field of package.json files when performing a lookup that starts with # from a file whose ancestor directory contains a package.json.
1009
1010 @default false
1011 */
1012 resolvePackageJsonImports?: boolean;
1013
1014 /**
1015 Suppress errors for file formats that TypeScript does not understand.
1016
1017 @default false
1018 */
1019 allowArbitraryExtensions?: boolean;
1020
1021 /**
1022 List of additional conditions that should succeed when TypeScript resolves from package.json.
1023 */
1024 customConditions?: string[];
1025
1026 /**
1027 Anything that uses the type modifier is dropped entirely.
1028
1029 @default false
1030 */
1031 verbatimModuleSyntax?: boolean;
1032
1033 /**
1034 Suppress deprecation warnings
1035 */
1036 ignoreDeprecations?: CompilerOptions.IgnoreDeprecations;
1037 };
1038
1039 namespace WatchOptions {
1040 export type WatchFileKind =
1041 | 'FixedPollingInterval'
1042 | 'PriorityPollingInterval'
1043 | 'DynamicPriorityPolling'
1044 | 'FixedChunkSizePolling'
1045 | 'UseFsEvents'
1046 | 'UseFsEventsOnParentDirectory';
1047
1048 export type WatchDirectoryKind =
1049 | 'UseFsEvents'
1050 | 'FixedPollingInterval'
1051 | 'DynamicPriorityPolling'
1052 | 'FixedChunkSizePolling';
1053
1054 export type PollingWatchKind =
1055 | 'FixedInterval'
1056 | 'PriorityInterval'
1057 | 'DynamicPriority'
1058 | 'FixedChunkSize';
1059 }
1060
1061 export type WatchOptions = {
1062
1063 /**
1064 Specify the strategy for watching individual files.
1065
1066 @default 'UseFsEvents'
1067 */
1068 watchFile?: WatchOptions.WatchFileKind | Lowercase<WatchOptions.WatchFileKind>;
1069
1070 /**
1071 Specify the strategy for watching directories under systems that lack recursive file-watching functionality.
1072
1073 @default 'UseFsEvents'
1074 */
1075 watchDirectory?: WatchOptions.WatchDirectoryKind | Lowercase<WatchOptions.WatchDirectoryKind>;
1076
1077 /**
1078 Specify the polling strategy to use when the system runs out of or doesn't support native file watchers.
1079 */
1080 fallbackPolling?: WatchOptions.PollingWatchKind | Lowercase<WatchOptions.PollingWatchKind>;
1081
1082 /**
1083 Enable synchronous updates on directory watchers for platforms that don't support recursive watching natively.
1084 */
1085 synchronousWatchDirectory?: boolean;
1086
1087 /**
1088 Specifies a list of directories to exclude from watch
1089 */
1090 excludeDirectories?: string[];
1091
1092 /**
1093 Specifies a list of files to exclude from watch
1094 */
1095 excludeFiles?: string[];
1096 };
1097
1098 /**
1099 Auto type (.d.ts) acquisition options for this project.
1100 */
1101 export type TypeAcquisition = {
1102 /**
1103 Enable auto type acquisition.
1104 */
1105 enable?: boolean;
1106
1107 /**
1108 Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
1109 */
1110 include?: string[];
1111
1112 /**
1113 Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
1114 */
1115 exclude?: string[];
1116 };
1117
1118 export type References = {
1119 /**
1120 A normalized path on disk.
1121 */
1122 path: string;
1123
1124 /**
1125 The path as the user originally wrote it.
1126 */
1127 originalPath?: string;
1128
1129 /**
1130 True if the output of this reference should be prepended to the output of this project.
1131
1132 Only valid for `--outFile` compilations.
1133 @deprecated This option will be removed in TypeScript 5.5.
1134 */
1135 prepend?: boolean;
1136
1137 /**
1138 True if it is intended that this reference form a circularity.
1139 */
1140 circular?: boolean;
1141 };
1142}
1143
1144/**
1145Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
1146
1147@category File
1148*/
1149export type TsConfigJson = {
1150 /**
1151 Instructs the TypeScript compiler how to compile `.ts` files.
1152 */
1153 compilerOptions?: TsConfigJson.CompilerOptions;
1154
1155 /**
1156 Instructs the TypeScript compiler how to watch files.
1157 */
1158 watchOptions?: TsConfigJson.WatchOptions;
1159
1160 /**
1161 Auto type (.d.ts) acquisition options for this project.
1162 */
1163 typeAcquisition?: TsConfigJson.TypeAcquisition;
1164
1165 /**
1166 Enable Compile-on-Save for this project.
1167 */
1168 compileOnSave?: boolean;
1169
1170 /**
1171 Path to base configuration file to inherit from.
1172 */
1173 extends?: string | string[];
1174
1175 /**
1176 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.
1177 */
1178 files?: string[];
1179
1180 /**
1181 Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
1182
1183 Glob patterns require TypeScript version 2.0 or later.
1184 */
1185 exclude?: string[];
1186
1187 /**
1188 Specifies a list of glob patterns that match files to be included in compilation.
1189
1190 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`.
1191 */
1192 include?: string[];
1193
1194 /**
1195 Referenced projects.
1196 */
1197 references?: TsConfigJson.References[];
1198};