mirror of
https://github.com/Andre-Bzk/twitch4steamdeck.git
synced 2026-11-15 15:43:08 +01:00
The 12 cross-process data types were manually copied across src/preload/index.ts and src/renderer/src/types/t4sd.d.ts. A silent field addition or rename in either file would not produce a compile error in the other — the divergence only surfaces at runtime. A shared module makes the compiler enforce consistency. Preload imports from shared/types and re-exports for downstream consumers. The renderer's t4sd.d.ts re-exports the same types from shared/types, so all existing screen imports continue to work without modification. Both tsconfigs are extended to include src/shared so the module is reachable from both composite projects.
26 lines
623 B
JSON
26 lines
623 B
JSON
{
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"target": "ES2022",
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"jsx": "react-jsx",
|
|
"types": ["vite/client"],
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noImplicitReturns": true,
|
|
"esModuleInterop": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"skipLibCheck": true,
|
|
"resolveJsonModule": true,
|
|
"allowSyntheticDefaultImports": true
|
|
},
|
|
"include": [
|
|
"src/renderer/**/*.ts",
|
|
"src/renderer/**/*.tsx",
|
|
"src/shared/**/*.ts"
|
|
]
|
|
}
|