Repository navigation
Commit 2d9b8f9
committed
fix(desktop): narrow the lock check into a type guard
`atomic-write.ts(48,32): Type 'unknown' is not assignable to type
'Error | undefined'` under `bun run typecheck` in packages/desktop: the
retry loop returns the caught error after the retries run out, but a
plain boolean helper does not narrow the catch variable.
Making isLockedError a `cause is NodeJS.ErrnoException` guard narrows
the caught value past the early throw. Tests, lint and formatting are
unchanged.1 parent 7257166 commit 2d9b8f9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments