Set up TypeScript in your project:
npm install typescript --save-dev
npx tsc --init # Creates tsconfig.json
The tsconfig.json file configures compilation options. Start with strict: true for maximum type safety. Run npx tsc to compile .ts files to .js.