TypeScript
tsx Commands
Use tsx for blazing-fast TypeScript execution powered by esbuild. Run TypeScript files, watch for changes, and execute scripts without configuration.
7 commands
Pro Tips
Run any TypeScript file: 'npx tsx script.ts' — works with ESM, CommonJS, and mixed projects.
Use 'tsx watch app.ts' for development with automatic restarts on file changes.
tsx supports path aliases from tsconfig.json out of the box — no additional configuration needed.
Common Mistakes
tsx (via esbuild) strips types but doesn't check them. Still run 'tsc --noEmit' separately for type safety.
Some TypeScript features like const enums and namespace merging aren't supported by esbuild.