Commit 1651180
committed
fix(read-router): typecheck failure on result.outcome.answer access
CI typecheck failed at src/read-router/__tests__/read-router.test.ts:211
because result.outcome was inferred as unknown when calling
.startsWith() on it. Tests passed locally because vitest doesn't run
strict TS on test files; pnpm typecheck does.
Fix: pass the explicit { answer: string } type parameter to
decideAndDispatch so the result is correctly typed.
- const result = await router.decideAndDispatch('Q?', ['e1', 'e2']);
+ const result = await router.decideAndDispatch<{ answer: string }>(
+ 'Q?',
+ ['e1', 'e2'],
+ );
163/163 router-family tests still pass. Full agentos typecheck clean.1 parent 425a9fc commit 1651180
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
0 commit comments