create new app with
yarn create next-appyarn is default used
Add tsconfig.json file to root of application
Add typescript to project
yarn add --dev typescript @types/react @types/noderun yarn dev and the tsconfig.json file will be populated with the right content.
Rename all components and pages from .js to .tsx