fix(gatsby): Update types for WrapPageElement*Args #22120
Merged
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.
Description
Hi, and thanks for a great project! This (my first) PR is just a small thing proposing an update to the typescript types. It should possibly be opened as an issue first, but since the changes are so small I thought it would be easiest to make it a PR directly – a PR which of course can be closed if I've misunderstood anything.
I propose updated types for the interfaces
WrapPageElementBrowserArgs
andWrapPageElementNodeArgs
with a more detailedprops
definition. PR #21542 introduced a new detailed interface for page props and I figured this interface can also be used for the types forwrapPageElement
.I could of course be wrong (the docs and the current interface only specify
props
as a vagueobject
) but my guess is thatprops
inwrapPageElement
is the same props passed to pages. Please correct me if I'm wrong.Documentation
The arguments passed to
wrapPageElement
are documented in two places – browser and ssr. Would you like me to touch on these as well?Related Issues
No related issues found.