Convert the app's main and preload source from .js to .ts (git mv preserves history), adding types where they carry value: the core-consumption seam (BuildIndexOptions/BuildIndexResult, FileInfo), the indexer service/worker factories, and the preload IPC bridge. Module-to-module specifiers use the real .ts extension (mirroring scripts/, since Node type-stripping does not rewrite .js->.ts); the worker's runtime path stays indexer-worker.js because that is the built output. Toolchain: - Add app/tsconfig.json: strict but noImplicitAny:false (the app orchestrates the already-strict core; annotating every SQLite-handle helper is low-value churn) + allowImportingTsExtensions (safe under noEmit). - Add @types/better-sqlite3 for the injected binding. - electron.vite.config.ts inputs -> .ts; refresh the stale CommonJS comment. - typecheck script runs root + app projects. Root tsconfig excludes the app-importing tests (app-*.test.mjs, recap-capture-query.test.mjs) so the lenient app files are not dragged into the strict root program; the app source is covered by app/tsconfig.json instead. See docs/adr/0005. Verified: npm run typecheck (root + app) clean; suite 121/121; electron-vite build emits all 6 main entries + preload with no .ts/node:sqlite residue in the bundles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
601 B
JSON
28 lines
601 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "NodeNext",
|
|
"moduleResolution": "NodeNext",
|
|
"lib": ["ES2023"],
|
|
"types": ["node"],
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"allowJs": true,
|
|
"checkJs": false,
|
|
"erasableSyntaxOnly": true,
|
|
"skipLibCheck": true,
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"forceConsistentCasingInFileNames": true
|
|
},
|
|
"include": ["scripts/**/*", "tests/**/*"],
|
|
"exclude": [
|
|
"node_modules",
|
|
"app",
|
|
"dist",
|
|
"release",
|
|
"tests/app-*.test.mjs",
|
|
"tests/recap-capture-query.test.mjs"
|
|
]
|
|
}
|