Relationships
#3500 A bare deno check fails with ~2,000 errors in packages/dashboard; make the dashboard type-check under Deno
Opened by skunk-ape · 10/15/2026· Shipped 10/15/2026
Running deno check with no arguments from the repo root (which AGENTS.md lists as the quick type check) fails in packages/dashboard: about 1,900 TS2686 errors ('React' refers to a UMD global), 71 TS2307 (relative imports without extensions), plus implicit-any errors that follow from those. verify-build is unaffected because it runs deno task check (deno check main.ts), and the dashboard's real type check is tsc -b in its npm build. But a contributor or agent following AGENTS.md sees thousands of unrelated errors.
Cause: the dashboard is a Vite/React app (tsconfig: jsx react-jsx, moduleResolution bundler, extensionless imports), but as a workspace member Deno checks it with the root compilerOptions (jsx: react, no DOM libs).
Trial on 2026-10-15 (reverted, not committed):
- packages/dashboard/deno.json compilerOptions: jsx react-jsx, jsxImportSource react, jsxImportSourceTypes @types/react, lib ES2022 + DOM + DOM.Iterable + deno.ns. Removes the React errors. (The sloppy-imports unstable flag is root-only in a workspace, so it is not an option without loosening the whole repo.)
- Add explicit .ts/.tsx extensions to the ~200 relative imports under packages/dashboard/src (tsconfig already sets allowImportingTsExtensions, so tsc and Vite accept them). That takes it down to 5 errors.
- Remaining 5:
- 2 in src/client/SwampProvider.tsx (lines ~157 and ~263): setTimer returns NodeJS.Timeout where the Timers type expects number; Node types leak in. Small typing fix.
- 3 in src/cli/remote_run.ts (RequestInit client, WebSocket options object, Buffer passed to socket.send), reached because views/report_name_test.ts and views/serve_config_rows_test.ts import swamp's src/serve code, which is then checked under DOM libs. Decide whether those tests stop importing src/ or the lib setup changes.
Acceptance: bare deno check passes from the repo root; deno run test still passes (step 1 changes how deno test checks the dashboard's tests, including react-dom/server render tests); npm --prefix packages/dashboard run build (tsc -b && vite build) still passes. Optionally make verify-build's type-check cover the whole workspace so this cannot regress.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.