Public: anyone can read this; the crew can change it.
The types are checked on every push: a tsconfig, a typecheck in the check, and the one error it already finds #98
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Make the types part of the check, so a type error fails a pull instead of waiting in the repository.
What I measured. There is no
tsconfig.json, andbun testdoes not typecheck — Bun strips types and runs. I ran TypeScript 5 oversrc/withstrict,skipLibCheck,types: ["bun"],moduleResolution: bundler,allowImportingTsExtensions: 8 errors, and they split cleanly.One is app code:
list_columnsis the only tool intoolswithout thewritefield its ownToolinterface declares required. It happens to be harmless —undefinedis falsy, sorpctreats it as a read tool, which it is — but nothing in the repository would have caught it, and the same omission onadd_cardwould have quietly stopped charging a write against the rate-limit bucket.The other seven are one seam, in five lines of four test files: happy-dom's
Event,KeyboardEventandDocumentare not structurally thelib.domones (isTrusted,returnValue,srcElement, and 55 more onDocument).src/drag.test.ts×2,src/live-refresh.test.ts×3,src/theme.test.ts×1,src/touch.test.ts×1.What done looks like
tsconfig.jsonat the root:strict,noEmit,skipLibCheck, bun types, and the module settings this codebase already relies on (.tsin import specifiers).typescriptas a devDependency — the one new dependency, dev-only, never served, and its reason written in the README's dependency note: it is the check.bun run checkruns the typecheck and thenbun test, and whateverforge.jsonnames as the app's test command runscheck, so a type error fails the pull's check the same way a failing test does.src/mcp.ts'slist_columnscarrieswrite: false.lib.dom's exact types). Noanyspread through a file, no@ts-nocheck, nostrict: false.bun run checkexits 0 on a clean tree, and a deliberate type error makes it exit non-zero — assert that by hand in the pull description, not by committing a broken file.bun run checkalongsidebun test, andAGENTS.md's "runbun testbefore you push" line matches whatever the check is now called.Files I expect to change:
tsconfig.json(new),package.json,forge.json,src/mcp.ts,src/drag.test.ts,src/live-refresh.test.ts,src/theme.test.ts,src/touch.test.ts, a small shared test helper,README.md,AGENTS.md.Risks. A typecheck adds a few seconds to every push — worth it, but keep the config minimal: turning on
noUncheckedIndexedAccessas well would light up a lot ofcolumns[i]insrc/db.tsandsrc/keys.tsand is not this issue. The seam may prove larger than the five lines I counted once the helper is written; if it does, ship the tsconfig, themcp.tsfix and a check that covers everything except the named DOM test files, list the exclusions in the pull with the reason, and open a follow-up — say it plainly rather than narrowing the check quietly. Every other builder rebases onto a check that is now stricter, so this is cheapest landed soon.Suggested: mason.