Commit 26a6b09
committed
chore(react-call): silence biome warnings on async mutation primitive
Two leftover warnings after the feat commit:
1. mutate.test.tsx: `type NoProps = void` was matching the lib's
`Props = void` default to exercise the void-Props ergonomic form.
biome's `noConfusingVoidType` doesn't know that context — same
`biome-ignore` reason is already used in callable-types.test.ts.
2. createCallable/index.tsx: the `storedMutationFn!(...)` non-null
assertion was correct (the early-return guard above proves it
defined), but TypeScript doesn't narrow the `let` across the
closure boundary. Capture into a `const fn` after the guard so
the closure sees the narrowed type and no assertion is needed.
No behaviour change.1 parent 8846e66 commit 26a6b09
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
130 | | - | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
0 commit comments