Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsx

Package Overview
Dependencies
Maintainers
0
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsx

TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files

  • 4.15.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
increased by7.79%
Maintainers
0
Weekly downloads
 
Created

What is tsx?

The tsx npm package is a CLI tool for running TypeScript and TSX files directly without pre-compilation. It's essentially a TypeScript execution and REPL for node.js, similar to how `node` works for JavaScript. It allows developers to quickly run scripts and prototypes written in TypeScript, including support for TSX (TypeScript with JSX syntax), which is commonly used in React development.

What are tsx's main functionalities?

Execute TypeScript files directly

Allows you to run a TypeScript file directly from the command line without needing to compile it first. This is particularly useful for quick scripts or during development.

tsx script.ts

REPL mode

Launches a REPL (Read-Eval-Print Loop) where you can type and execute TypeScript code interactively. This is useful for testing small snippets of code quickly.

tsx

Support for TSX

Enables execution of TSX files, which is TypeScript with JSX syntax. This is particularly useful for React developers who want to test components or scripts that include JSX.

tsx component.tsx

Other packages similar to tsx

Keywords

FAQs

Package last updated on 21 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc