Split out of the review on #245, where this bit for real.
tsconfig.json has "include": ["src"], so nothing type-checks the root config files — vite.config.ts, vitest.browser.config.ts, vitest.setup.ts, docker/*.mjs. npm run typecheck is clean whatever they contain.
How it showed up
#212 added a test: block to vite.config.ts; #245 added one too, in a different place. Git merged both without a conflict and left a duplicate object key:
export default defineConfig({
test: { setupFiles: ["./vitest.setup.ts"] }, // #212
build: { … },
test: { exclude: [...] }, // #245 — silently wins
});
The second key wins, setupFiles is dropped, and with it the PointerEvent polyfill that src/replay-history/history-replay.test.ts depends on. The symptom is two failures in a file neither PR touched, which is a misleading place to start debugging. tsc says nothing, because it never looks at the file. npm test does catch it, so CI would not let it through — but only after a detour.
TypeScript reports duplicate object keys (ts(1117)) when it checks the file at all. It just never checks this one.
What would close it
Add the root config files to the type-check. Either widen include, or keep the app's tsconfig.json narrow and add a tsconfig.node.json covering the config files, with npm run typecheck running both. A typo'd Vite or Vitest option is the same class of silent failure, so the value is not only the duplicate key.
Split out of the review on #245, where this bit for real.
tsconfig.jsonhas"include": ["src"], so nothing type-checks the root config files —vite.config.ts,vitest.browser.config.ts,vitest.setup.ts,docker/*.mjs.npm run typecheckis clean whatever they contain.How it showed up
#212 added a
test:block tovite.config.ts; #245 added one too, in a different place. Git merged both without a conflict and left a duplicate object key:The second key wins,
setupFilesis dropped, and with it thePointerEventpolyfill thatsrc/replay-history/history-replay.test.tsdepends on. The symptom is two failures in a file neither PR touched, which is a misleading place to start debugging.tscsays nothing, because it never looks at the file.npm testdoes catch it, so CI would not let it through — but only after a detour.TypeScript reports duplicate object keys (
ts(1117)) when it checks the file at all. It just never checks this one.What would close it
Add the root config files to the type-check. Either widen
include, or keep the app'stsconfig.jsonnarrow and add atsconfig.node.jsoncovering the config files, withnpm run typecheckrunning both. A typo'd Vite or Vitest option is the same class of silent failure, so the value is not only the duplicate key.