Repository navigation
Expand file tree
/
Copy pathtsconfig.server.json
More file actions
56 lines (54 loc) · 2.2 KB
/
Copy pathtsconfig.server.json
File metadata and controls
56 lines (54 loc) · 2.2 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
50
51
52
53
54
55
56
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.server.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "nodenext",
"skipLibCheck": true,
/*
* Node runs this code directly — `node server.ts`, type-stripping, no bundler — so it
* is Node's ESM resolver that decides whether an import resolves, and that resolver
* does NOT guess extensions: `./liveAudioConfig` is a missing module, only
* `./liveAudioConfig.ts` is a file. `moduleResolution: nodenext` is what makes tsc
* apply that same rule, so `npm run typecheck` fails on an extensionless relative
* import instead of the server failing to boot at runtime.
*
* This matters most for the modules under src/ that both halves share
* (liveAudioConfig, transcriptKeys, slideTranslation...): tsconfig.app.json checks
* them under `bundler` resolution, where extensionless is legal and Vite resolves it
* happily — vitest included. Nothing in the browser-side toolchain can notice the
* break, so the server's own project has to.
*/
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"verbatimModuleSyntax": true,
// `node server.ts` also type-strips at runtime — this rejects enums, namespaces with
// runtime members, and other TS syntax Node's stripper can't erase before tsc does.
"erasableSyntaxOnly": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
/*
* Entrypoints only — tsc follows imports from here, which is how the rest of the
* root .ts files, live-audio/, and the shared src/ modules get pulled in and checked
* under Node's resolution rules. The live-audio tests are listed because nothing
* imports them, and they were otherwise the only files in the repo no project checked.
*/
"include": [
"server.ts",
"nlp.ts",
"bible.ts",
"slideLibrary.ts",
"slideConversationStore.ts",
"dump-docs.ts",
"*.test.ts",
"live-audio/*.test.ts"
]
}