mirror of
https://github.com/expo/examples.git
synced 2026-11-13 20:38:07 -10:00
This PR was automatically created by the [upgrade workflow](./.github/workflows/upgrade.yml). > ⚠️ Review the [job logs](https://github.com/expo/examples/actions/runs/28587793003) before merging Co-authored-by: amandeepmittal <[email protected]>
TypeScript Example
Launch your own
npx create-expo --example with-typescript
TypeScript is a superset of JavaScript which gives you static types and powerful tooling in Visual Studio Code including autocompletion and useful inline warnings for type errors.
🚀 How to use
Creating a new project
- Create a project:
npx create-expo --example with-typescript cdinto the project
Adding TypeScript to existing projects
- Create a blank TypeScript config:
touch tsconfig.json - Run
yarn startornpm run startto automatically configure TypeScript - Rename files to TypeScript,
.tsxfor React components and.tsfor plain typescript files
💡 You can disable the TypeScript setup in Expo CLI with the environment variable
EXPO_NO_TYPESCRIPT_SETUP=1 expo start