Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
49 lines (43 loc) · 1.56 KB
/
Copy pathtsconfig.json
File metadata and controls
49 lines (43 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"compilerOptions": {
"declaration": true,
"declarationMap": true,
// Key target + module system stuff to ensure sanity.
"target": "ESNext",
"module": "nodenext",
"verbatimModuleSyntax": true,
"moduleResolution": "nodenext",
// Strictness (i.e., make things maximally strict)
"strict": true,
"allowUnreachableCode": false,
"noFallthroughCasesInSwitch": true,
"useDefineForClassFields": true,
"forceConsistentCasingInFileNames": true,
"exactOptionalPropertyTypes": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"useUnknownInCatchVariables": true,
"noUncheckedSideEffectImports": true,
// Ban syntax (like `enum`) that makes it harder to compile TS to JS,
// because that operation no longer involves just type annotation stripping,
// which forces the use of slower transpilers (e.g., tsc over swc; tsc-node
// over tsx). The TS team also considers these syntax additions as "regrets"
// in the language design (e.g., because enum is actually a reserved word in
// JS that TC39 might eventually want to use in a way that would conflict
// with TS). Cf. isolatedModules.
"erasableSyntaxOnly": true,
// Compilation performance
"incremental": true,
"skipLibCheck": true,
"isolatedModules": true,
// Handle JS + JSON files.
"allowJs": true,
"checkJs": true,
"resolveJsonModule": true,
"rootDir": ".",
"outDir": "dist",
"sourceMap": true
},
"include": ["./src", "./test"]
}