Replies: 1 comment
-
As we now also have generated types for next/link (typedRoutes), it would also be nice to automatically have params generated in these types |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Add Typescript types for new app-router file conventions.
Non-Goals
No response
Background
Previously for the pages router we had type exports for
getServerSideProps
,NextPage
, etc. For the new file conventions, having typescript types for the functions would be ideal.Proposal
For the new app router, having types for
layout.tsx
,page.tsx
, etc would be optimal as we would be able to know about using:{ children: ReactNode; params?: Record<string, string> }
{ params?: Record<string, string>; searchParams?: Record<string, string> }
and so on. Having these in typescript types reduces the need to go to the documentation.
Beta Was this translation helpful? Give feedback.
All reactions