1+ // source: https://2ality.com/2025/01/tsconfig-json.html#summary
12{
3+ "include" : [
4+ " src/**/*" ,
5+ " test/**/*"
6+ ],
27 "compilerOptions" : {
8+ // Specified explicitly (not derived from source file paths)
9+ "rootDir" : " ." ,
310 "outDir" : " dist" ,
4- "module" : " ESNext" ,
5- "target" : " ES2021" ,
6- "moduleResolution" : " bundler" ,
7- "declaration" : true ,
8- "declarationMap" : true ,
9- "sourceMap" : true ,
10- "strict" : true ,
11- "esModuleInterop" : true ,
12- "allowSyntheticDefaultImports" : true
13- },
14- "include" : [" src" ],
15- "exclude" : [" node_modules" , " dist" , " test" ]
16- }
11+ // ========== Output: JavaScript ==========
12+ "target" : " ES2024" ,
13+ "lib" : [
14+ " ES2024"
15+ ], // remove if you want to use the DOM
16+ "skipLibCheck" : true ,
17+ "module" : " NodeNext" , // sets up "moduleResolution"
18+ // Emptily imported modules must exist
19+ "noUncheckedSideEffectImports" : true ,
20+ "sourceMap" : true , // .js.map files
21+ // ========== Compiling TS with tools other than tsc ==========
22+ // ----- Emitting .js -----
23+ // Enforces keyword `type` for type imports etc.
24+ "verbatimModuleSyntax" : true , // implies "isolatedModules"
25+ // - Forbids non-JavaScript language constructs such as JSX,
26+ // enums, constructor parameter properties and namespaces
27+ // - Important for type stripping
28+ "erasableSyntaxOnly" : true , // TS 5.8+
29+ // ----- Emitting .d.ts -----
30+ // - Enforces constraints that enable efficient .d.ts generation:
31+ // no inferred return types of exported functions etc.
32+ // - Even though this option would be generally useful, it requires
33+ // that `declaration` or `composite` is true.
34+ "isolatedDeclarations" : true ,
35+ // ========== Type checking ==========
36+ "strict" : true , // activates several useful options
37+ "exactOptionalPropertyTypes" : true , // remove if not helpful
38+ "noFallthroughCasesInSwitch" : true ,
39+ "noImplicitOverride" : true ,
40+ "noImplicitReturns" : true ,
41+ "noPropertyAccessFromIndexSignature" : true ,
42+ "noUncheckedIndexedAccess" : true ,
43+ // ========== Non-code artifacts ==========
44+ // Lets us import JSON files
45+ "resolveJsonModule" : true ,
46+ // ===== Output: declarations =====
47+ "declaration" : true , // .d.ts files
48+ // “Go to definition” jumps to TS source etc.
49+ "declarationMap" : true // .d.ts.map files
50+ }
51+ }
0 commit comments