xxxxxxxxxx
# Mind this is a simple setup, consider reading official documentation for project setup
mkdir typescript-project
cd typescript-project
npm i typescript --save-dev
npx tsc --init
touch index.ts
npx tsc index.ts && node index.js
xxxxxxxxxx
npx create-next-app@latest --ts
# or
yarn create next-app --typescript