Commit 4843e58
committed
test(objectql): type-clean the new transaction contract test under the TEST_DEBT re-measure (#5696)
objectql's test layer is excluded from its own `tsconfig.json`, so
`pnpm --filter @objectstack/objectql typecheck` never reads these files —
only the ledger's `--re-measure` does, by synthesizing a config with the test
globs unexcluded. The new file arrived with 7 errors nothing local reported.
Two shapes, both fixed rather than absorbed:
- `registry.registerObject(x as any)` — `packageId` is not optional (TS2554).
- `promise.catch((e) => e as E)` types the result `E | <resolved type>`, so
every property read on it is TS2339. Replaced by a `rejection<E>()` helper
that narrows to the rejection AND throws if the call did not reject at all —
which the bare `.catch()` would have let pass silently as a green test.
Re-measured: zero errors in this file.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Q7oc7ASjh8yxyS3Yz78We1 parent 9915480 commit 4843e58
1 file changed
Lines changed: 21 additions & 4 deletions
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
32 | 49 | | |
33 | 50 | | |
34 | 51 | | |
| |||
107 | 124 | | |
108 | 125 | | |
109 | 126 | | |
110 | | - | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
132 | 149 | | |
133 | 150 | | |
134 | 151 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
138 | 155 | | |
139 | 156 | | |
140 | 157 | | |
| |||
0 commit comments