Repository navigation
Commit 40ac71f
committed
test(utils): type the hoisted fs actuals by the callback return type
The drift control's hoisted holder cast undefined straight to two overloaded function types,
which tsc rejects (TS2352 at safeWriteJson.stagingDirectory.spec.ts:9 and :10). The holder is
now typed by the hoisted callback's return type instead, so there is no cast on undefined and no
double assertion.
Measured with the worktree's own node_modules (split-1833/u7 got a real pnpm install this round,
and @roo-code/types now resolves to that worktree's packages/types): tsc -p tsconfig.json exit 0
with 0 errors; vitest run of safeWriteJson.test.ts, safeWriteJson.lockKey.spec.ts and
safeWriteJson.stagingDirectory.spec.ts exit 0, 3 files, 36 passed, 4 skipped.1 parent 504af84 commit 40ac71f
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
0 commit comments