Why TypeScript?
TypeScript adds static typing to JavaScript, which helps in catching errors early during development and improves code maintainability.
Installation
```bash npm install --save-dev typescript @types/react @types/node
or
yarn add --dev typescript @types/react @types/node ```
Next, create a `tsconfig.json` file in your project root. Next.js will often do this for you automatically.