To install TypeScript globally, use the following command:
npm install -g typescript
After writing your TypeScript file (e.g., file.ts
), compile it with:
tsc file.ts
For a complete list of TypeScript commands, check the official documentation:
TypeScript CLI Commands