#4832·civitai

typecheck.mjs is blind to apps/* — it reports OK over a planted type error there

Author: ZacxDevCreated Sep 14, 2026Updated Sep 14, 2026

node scripts/typecheck.mjs does not type-check anything under apps/, and reports OK over a planted error there.

Measured

Root tsconfig.json's include is:

["scripts/**/*.ts", "scripts/**/*.tsx", "src", "packages/*/src", "tests", "test", ".next/types/**/*.ts"]

There is no apps/* entry. A planted const typeError: number = someString; in a file under apps/moderator/src/lib/ still produced typecheck: OK — 0 type errors.

Why it matters

It is the command people reach for and quote as evidence. On a recent PR, 15 of 18 changed files were under apps/moderator/ — so the gate that was being cited covered 3 of them and nobody noticed. svelte-check (each app's own typecheck script) is the instrument that actually covers this code, including its plain .ts, and it caught the same planted error immediately.

Not a CI gap

CI is not blind: scripts/ci/typecheck-apps.mjs runs each app's own typecheck, which for apps/moderator is svelte-check. This is a local-only gap, and its cost is that it trains people to quote a command that cannot see the code they changed.

Closing condition

Either root tsconfig.json includes apps/*/src, or scripts/typecheck.mjs delegates per-spoke — verified by planting a type error in a file under apps/ and watching the command exit non-zero.

Checked by: node scripts/typecheck.mjs exits non-zero with a planted type error in a file under apps/moderator/src/, and exits 0 once it is removed.