Commit b31c516
fix(news): restore unreachable throw to satisfy TS narrowing
#432's "remove dead code" change deleted a post-loop throw that was
unreachable at runtime but required for TypeScript to narrow the
return type. Without it, the for-loop's normal exit path makes the
function signature `Promise<{...} | undefined>`, which fails to match
the MCP tool registration parameter type.
Restored the throw with a comment explaining why it must stay even
though it's "dead." Build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ed60ec6 commit b31c516
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
837 | 843 | | |
838 | 844 | | |
839 | 845 | | |
| |||
0 commit comments