Commit d440b4b
Fix TypeScript error in processPromise return type (#2204)
## Summary
- Fixed TypeScript compilation error in `serverRenderReactComponent.ts`
that was blocking the release script
- The error occurred because TypeScript couldn't narrow the type
properly after the `isValidElement` check in the `.then()` callback
- Added explicit type assertion to `FinalHtmlResult` since after the
`isValidElement` check, the remaining types (`string` and
`ServerRenderHashRenderedHtml`) are all valid `FinalHtmlResult` types
## Test plan
- [x] TypeScript type-check passes (`pnpm run type-check`)
- [x] Build completes successfully (`pnpm run build`)
- [x] ESLint passes (`pnpm run lint`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Improved type safety for server-side rendering operations to ensure
more robust handling of promise resolutions.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5d5900c commit d440b4b
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
0 commit comments