feat: types for prerender options and result; better result checks#29
Merged
rschristian merged 4 commits intopreactjs:masterfrom Feb 6, 2026
Merged
Conversation
Contributor
Author
|
@rschristian check it out, please 🙏 |
bb095cf to
75046d8
Compare
rschristian
previously requested changes
Dec 9, 2025
Member
rschristian
left a comment
There was a problem hiding this comment.
From a quick skim, I'm not sure any of this is useful? It's a lot of minor formatting changes or just moving around jsdoc casts, neither of which are valuable.
Contributor
Author
|
@rschristian it's because of prettier. looks like nobody called "pnpm format" for a long time. I can format all the code in additional commit, it you want The sense of PR is in exported types |
Member
|
Don't change the formatting at all please, revert the unrelated changes entirely and then I'll take another look. |
75046d8 to
40d3251
Compare
Contributor
Author
|
Returned formatting |
rschristian
reviewed
Dec 13, 2025
Comment on lines
-497
to
+502
| result.renderTarget == 'body' | ||
| renderTarget == 'body' | ||
| ? '`renderTarget` was not specified in plugin options and <body> does not exist in input HTML template' | ||
| : `Unable to detect prerender renderTarget "${result.selector}" in input HTML template`, | ||
| : `Unable to detect prerender renderTarget "${renderTarget}" in input HTML template`, |
Member
There was a problem hiding this comment.
Oof, good spot on both (or good spot from the types). Changed this API ages ago and I guess it slipped through.
rschristian
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
async function prerender({}: PrerenderOptions): Promise<PrerenderResult | string>