stx typecheck reports errors for a single file and zero for a glob that contains that same file. A project checking itself the documented way — stx typecheck with a pattern — gets a clean bill of health while real type errors sit in its client blocks.
Repro
Plant one obvious error in a <script client> block:
<script client>
const probe: number = "definitely not a number"Then check the same file two ways, clearing .stx/cache between runs:
$ stx typecheck resources/views/dashboard.stx
Checked 2 script block(s) and 54 template expression(s) in 1 file(s) — 46 error(s), 0 warning(s)
$ stx typecheck 'resources/**/*.stx'
Checked 51 script block(s) and 357 template expression(s) in 38 file(s) — 0 error(s), 0 warning(s)The glob run walks 38 files including that one, reports 51 script blocks — so it opened the block — and finds nothing. --no-client is not set. Same on resources/views/**/*.stx (49 blocks, 0 errors).
Reproduced on stx 0.2.175, bun 1.3.14, macOS. Not a caching artifact: rm -rf .stx/cache before each run, and the counts differ every time in the same direction.
Why it matters
The glob is the form a project actually uses — it is what the docs show, and it is what goes in CI. In this repo it reports 0 error(s) across 38 files, which I quoted as evidence in three commit messages before testing whether it could fail at all. It cannot: I could not construct a type error that a glob run would report.
The other half
Single-file mode is not a usable fallback, because it over-reports. On a component whose types come from elsewhere in the project it produces errors that are artifacts of checking in isolation:
AutofixPanel.stx:28:25 error TS2304 Cannot find name 'AutofixRun'.
AutofixPanel.stx:32:28 error TS2304 Cannot find name 'AutofixState'.Those names resolve fine at runtime and in the glob run. It also reported Checked 1 script block(s) for a file with two, so it appears to skip the server block and check the client block without whatever the server block establishes.
So the two modes fail in opposite directions: the glob sees the blocks and reports nothing, single-file reports things that are not wrong. Between them there is currently no configuration that answers "does this project typecheck".
Note on warnings
Warnings behave correctly in glob mode, which is what makes the split visible. Removing one defineClientPayload takes a glob run from 0 warning(s) to 1 warning(s) and restoring it goes back — so the glob path is walking the blocks and producing diagnostics, just not error-level ones.