Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
43 lines (43 loc) · 2 KB
/
Copy pathtsconfig.json
File metadata and controls
43 lines (43 loc) · 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
{
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"strict": true,
"module": "ES2022",
"noImplicitAny": true,
"outDir": "./dist",
"target": "esnext",
"esModuleInterop": true,
"moduleResolution": "node",
// Every package compiles worklet code and main-thread code together, so
// both `@types/audioworklet` and `lib.dom.d.ts` are in scope at once.
// Those two are not meant to meet: the AudioWorklet global scope is a
// *different* environment, and its types redeclare DOM globals (`URL`,
// `AbortSignal`, `ReadableStreamBYOBReader`) with the narrower signatures
// that scope actually has. Checking them against each other reports five
// conflicts in `node_modules` and nothing about this repository's code.
//
// Resolving it properly means compiling the two halves separately - a
// worklet tsconfig with no DOM lib for `worklet.ts`/`dsp.ts`, a DOM one
// for `index.ts` - across all 23 packages, with the build scripts split to
// match. Until that is worth doing, skip the declaration check: with it
// on, `tsc --noEmit` reports zero errors over the whole monorepo.
"skipLibCheck": true,
// The `./dsp` subpaths, which `moduleResolution: "node"` cannot find on its
// own: node10 resolution predates `exports`, so it looks for
// `node_modules/@synthlet/lookahead-limiter/dsp` as a directory and gives
// up. The published packages resolve it through their `exports` map; inside
// the repo these point at the source, so `tsc` and `tsup --dts` work on a
// fresh clone with no `dist/` anywhere.
"baseUrl": ".",
"paths": {
"synthlet/dsp": ["./packages/synthlet/src/dsp-entry.ts"],
"@synthlet/level-meter/dsp": ["./packages/level-meter/src/dsp-entry.ts"],
"@synthlet/lookahead-limiter/dsp": [
"./packages/lookahead-limiter/src/dsp-entry.ts"
]
}
},
"include": ["packages/**/*.ts", "../../packages/**/*"],
"exclude": ["node_modules", "**/dist/**/*"]
}