Files
openmotion/tsconfig.backend.json
Dery Ferdika d7b29bd4ec chore(types): type-check the whole backend tree, not seven pinned entries (#625)
typecheck:backend named seven entry files. tsc follows imports, so the real checked set was 119 files, but 46 backend files were never reached at all: every scripts/*.ts, several shared/ modules including editor-daemon and workspace-studio, tracking/browser.ts, and ten more.

The JavaScript helpers had a related blind spot. Several TypeScript modules import the design-system and motion-package modules, and without allowJs those imports resolve to any, so nothing compared the call site with what the helper accepts.

Move the same compiler requirements onto a tsconfig.backend.json project that covers the root modules, shared/, gateway/, tracking/ and scripts/, with allowJs enabled so the imported JavaScript joins the program. checkJs stays off, so the JavaScript participates in resolution and inference without starting a JavaScript type-checking migration. Coverage rises from 119 to 180 files in the same run. integrations/dsh stays out: it ships its own tsconfig and typecheck script and needs the optional DSH client dependency the root checkout does not install.

The wider net immediately found one real mismatch, server.ts passing dataDirectory to collectDiagnostics while the helper declared no parameter shape. That is fixed with the missing JSDoc contract rather than a cast at the call site.

Verified by injecting a type error into scripts/distribution.ts: the previous command still exited 0, the project reports it.
2026-11-19 16:27:29 +08:00

24 lines
523 B
JSON

{
"compilerOptions": {
"noEmit": true,
"erasableSyntaxOnly": true,
"target": "es2024",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowImportingTsExtensions": true,
"allowJs": true,
"checkJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"types": ["node"]
},
"include": [
"*.ts",
"shared/**/*.ts",
"gateway/**/*.ts",
"tracking/**/*.ts",
"scripts/**/*.ts",
"packages/design-system/*.js",
"packages/motion-package/*.mjs"
]
}