Commit ce0aac9
committed
fix(test): type the journal rows in the #16225 pins as Partial<Row>
`tsc --noEmit` refused the metadata-protocol pin with TS2352: `Row` declares
no index signature, so asserting `Row[]` to `Record<string, unknown>[]` is not
a legal widening. `Partial<Row>` is legal AND true of these rows — a journal
row carries `type` and `name` and carries no `state`, which is exactly what
the assertions beside it read. The objectql pin's `any[]` is spelled the same
way for the same reason, replacing a cast that typechecked while saying
nothing.
Vitest never type-checks, so the suites were green over code tsc refuses; the
error was only ever reachable through the package's own `typecheck` script,
which this branch had last run before either pin existed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADLdAs2pVcH17h9tZKWMBg1 parent 220bfdb commit ce0aac9
2 files changed
Lines changed: 6 additions & 2 deletions
File tree
- packages
- metadata-protocol/src
- objectql/src
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
0 commit comments