Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Documentation Improvement for Persistent Layouts #33659

Merged
merged 4 commits into from Aug 22, 2022

Conversation

davewelsh
Copy link
Contributor

By making NextPageWithLayout generic and passing the type parameters to NextPage, our pages can continue to specify the props explicitly. This gives us type safety in getInitialProps, for example.

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running yarn lint

davewelsh and others added 2 commits January 25, 2022 13:26
By allowing `NextPageWithLayout` to accept an optional generic type, we can continue to specify our props explicitly on pages that use this type. This gives us type safety in `getInitialProps`, for example.
@davewelsh davewelsh changed the title Patch 1 Typescript Documentation Improvement for Persistent Layouts Feb 4, 2022
leerob
leerob previously approved these changes Aug 22, 2022
Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed merge conflict

@kodiakhq kodiakhq bot merged commit 8bc93d0 into vercel:canary Aug 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants