rsnext/docs
jpveilleux 0234e6d553
Added type to Page Component for TypeScript (#36608)
* Added type to Page Component for TypeScript

Following this tutorial, I noticed that TS was complaining that "getLayout" did not exist on Page. That is normal since Page is typed as NextPage. I simply exported the new type we create in "_App.tsx" and used it as the return type for Page. This will probably help others seeing that red in their editors and perhaps being confused.

* Small linting change

* Apply suggestions from code review

* Update layouts.md

* lint fix

* update type

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-03 15:58:31 -05:00
..
advanced-features fixed typo, that should say 'in' not 'from' (#36046) 2022-04-15 15:34:21 +00:00
api-reference Add note about running next without a sub-command (#36560) 2022-04-29 02:57:48 +00:00
api-routes Add API config to allow disabling response size warning (#34700) 2022-02-25 02:04:02 +00:00
basic-features Added type to Page Component for TypeScript (#36608) 2022-05-03 15:58:31 -05:00
guides Few touch-ups to the docs on web forms in Next (#34286) 2022-02-14 20:21:27 +00:00
migrating Add instructions to create pages directory and add an index.js file to it (#35971) 2022-04-15 14:40:37 +02:00
routing Update shallow routing caveat (#35052) 2022-03-07 23:29:07 +00:00
authentication.md Alphabetize auth docs providers. (#34281) 2022-02-13 00:51:53 +00:00
deployment.md Link to with-docker-multi-env example. (#35820) 2022-04-01 15:45:22 +00:00
faq.md fix: change showcase url (#34590) 2022-02-19 22:33:32 +00:00
getting-started.md Update Manual Steps in Getting Started guide (#35898) 2022-04-06 13:06:50 +00:00
going-to-production.md [docs] Update going to production docs around caching headers (#35374) 2022-03-16 22:11:06 +00:00
manifest.json Moving middleware file (#36009) 2022-04-11 14:01:14 +00:00
testing.md docs: add jest-environment-jsdom package for Jest configuration (#36632) 2022-05-03 11:12:52 +00:00
upgrading.md Update upgrading.md (#36091) 2022-04-15 14:43:26 +02:00