{ // Clean: check-e2e-typecheck-ratchet.mjs (CI via run-ratchets, local via `pnpm lint`) fails on any // tests/ error. Not in `typecheck`, which would also surface out-of-scope cloud/ and mobile/ errors. "extends": "@electron-toolkit/tsconfig/tsconfig.node.json", // Why: specs import renderer and main modules directly, so the ambient declarations those // modules rely on (vite client types, build-time defines) have to be in the program too. "include": [ "../tests/**/*.ts", "../tests/**/*.tsx", "../src/renderer/src/env.d.ts", "../src/types/**/*" ], "exclude": ["../tests/e2e/.cross-version-checkouts/**"], "compilerOptions": { "allowImportingTsExtensions": true, // Why: specs run browser code inside page.evaluate, so the DOM lib has to be visible here // even though the harness itself is Node. "lib": ["ESNext", "DOM", "DOM.Iterable"], "types": ["node"], "paths": { "@renderer/*": ["../src/renderer/src/*"], "@/*": ["../src/renderer/src/*"], // Shared schemas and mobile readers must use one Zod type identity even when // mobile's independent lockfile installs a different patch version. "zod": ["../node_modules/zod"], // Why: specs reach mobile/src/transport, whose native imports resolve only once mobile is // installed and then load React Native's globals (numeric timers, a required NODE_ENV). // An empty stub keeps the error count the same with or without mobile's install. "expo-crypto": ["./e2e-typecheck-mobile-native-stub.ts"], "@react-native-async-storage/async-storage": ["./e2e-typecheck-mobile-native-stub.ts"] } } }