-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.engine.json
More file actions
59 lines (59 loc) · 2.22 KB
/
tsconfig.engine.json
File metadata and controls
59 lines (59 loc) · 2.22 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
57
58
59
// #15: engine-only tsconfig — drops `DOM` lib + `vite/client` types so a
// browser global inside an engine kernel (chaos, density, calibration, etc.)
// becomes a compile error. The seam ("single engine, two consumers") was
// previously enforced by grep only; this catches violations at typecheck.
//
// Strategy: explicit kernel WHITELIST (the canonical compute path + data
// model + serialization). Files NOT listed below are either FE/BE host
// layers (DOM, navigator, requestAnimationFrame, `import.meta.env`, etc.)
// or middle-tier shims that transitively import host code. They typecheck
// in the base tsconfig.json which keeps DOM + vite/client.
//
// Ambient `*.wgsl?raw` module declaration is shared via src/wgsl-modules.d.ts.
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
// ES2022 + WebWorker lib: WebWorker provides the cross-environment runtime
// globals legitimately used by engine modules (TextEncoder, TextDecoder,
// atob, btoa — all available in both browser AND Node, NOT browser-only).
// Excludes window/document/navigator (which would defeat the engine seam).
// Previously these globals typechecked only because src/diff-image.ts in the
// whitelist transitively pulled @types/pngjs → @types/node, masking that
// ES2022 alone lacks them. #93 moved diff-image.ts out of src/, so this lib
// now carries them explicitly.
"lib": ["ES2022", "WebWorker"],
"types": ["@webgpu/types"],
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"skipLibCheck": true,
"esModuleInterop": true,
"isolatedModules": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"noEmit": true
},
"include": [
"src/calibration.ts",
"src/chaos.ts",
"src/compare.ts",
"src/density.ts",
"src/feature-score.ts",
"src/flam3-palettes-data.ts",
"src/flam3-palettes.ts",
"src/genome.ts",
"src/isaac.ts",
"src/palette.ts",
"src/presets.ts",
"src/renderer.ts",
"src/serialize.ts",
"src/spatial-filter.ts",
"src/symmetry.ts",
"src/tonemap.ts",
"src/variations.ts",
"src/visualize.ts",
"src/wgsl-modules.d.ts"
]
}