Registry / serialization / tsc
library0.3.4jsnpmunverified

The `tsc` npm package is a **deprecated** placeholder that offered an older, unsupported release of the TypeScript compiler. Users seeking the TypeScript compiler's command-line interface (`tsc`) should install the official `typescript` npm package instead. The current stable version of the `typescript` package is 6.0.3, released recently (as of April 2026). TypeScript generally follows a quarterly release cadence for major versions, with monthly patch updates to address bugs and regressions. Key differentiators of the `typescript` package include its comprehensive static type-checking capabilities, support for modern ECMAScript features, and rich tooling integration. It transpile TypeScript code into various JavaScript targets, ensuring broad compatibility across browsers and Node.js environments.

npm install tsc
INSTALL
IMPORT
SIG · TSC
T
tsc
serializationjavascriptv0.3.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Programmatic usage of TypeScript compiler
import ts from 'typescript'; const program = ts.createProgram(['./src/index.ts'], { target: ts.ScriptTarget.ES2020, module: ts.ModuleKind.CommonJS, }); // ... further programmatic compilation steps
import { tsc } from 'tsc'; // The 'tsc' package does not expose programmatic APIs.
The deprecated `tsc` package offered no programmatic APIs. For direct interaction with the TypeScript compiler from JavaScript/TypeScript, you must import `typescript` after installing the official `typescript` npm package.

This quickstart demonstrates how to install and use the `tsc` command-line interface provided by the official `typescript` npm package to compile a basic TypeScript project.

/* This quickstart demonstrates how to set up and use the actual TypeScript compiler (tsc) by installing the officially supported 'typescript' npm package. */ // 1. Initialize a new Node.js project // npm init -y // 2. Install the official TypeScript compiler as a development dependency // npm install --save-dev typescript // 3. Initialize a tsconfig.json file for your project (optional, but recommended) // npx tsc --init // 4. Create a TypeScript file (e.g., src/index.ts) // (You would typically create this file manually or through your IDE) // src/index.ts interface User { id: number; name: string; email?: string; } function greetUser(user: User): string { return `Hello, ${user.name} (ID: ${user.id})!`; } const newUser: User = { id: 1, name: 'Alice', email: 'alice@example.com', }; console.log(greetUser(newUser)); // 5. Compile your TypeScript code to JavaScript // npx tsc // This will create a 'dist' folder (or your configured outDir) with index.js // You can then run the compiled JavaScript: // node dist/index.js // Output in console: Hello, Alice (ID: 1)!
Debug
Known issues
breakingThe `tsc` npm package is officially deprecated and should not be used. It contains an outdated version of the TypeScript compiler and may lack critical features, bug fixes, or security patches present in the official `typescript` package.
fix
Migrate immediately to the `typescript` npm package. Uninstall `tsc` and install `typescript`: `npm uninstall tsc && npm install -D typescript`.
affects: >=2.0.4
gotchaAttempting to use `tsc` directly after installing the deprecated `tsc` package will result in an outdated compiler version. This can lead to unexpected syntax errors, missing type definitions, or incompatibilities with modern TypeScript language features or libraries.
fix
Always install `typescript` (e.g., `npm install -D typescript`) to ensure you have the latest stable TypeScript compiler. Use `npx tsc` or define `"tsc": "tsc"` in your `package.json` scripts to ensure the locally installed version is used.
affects: >=2.0.4
Errors
Common errors & fixes
'tsc' is not recognized as an internal or external command, operable program or batch file.
The `tsc` command-line tool is not found in your system's PATH. This usually happens if `typescript` is installed locally but not globally, or if `npm`'s bin directory isn't in PATH.
fix
If `typescript` is installed locally (`npm install -D typescript`), use `npx tsc` to execute the local version. If you intend to use it globally, install it via `npm install -g typescript`.
error TSxxxx: <Some error related to an old TypeScript feature>
You are using an outdated version of the TypeScript compiler, possibly from the deprecated `tsc` package or an older global `typescript` installation.
fix
Ensure you are using the latest `typescript` package. Run `npm uninstall tsc && npm install -D typescript` in your project. If you have a global installation, run `npm update -g typescript`.
Upgrade
Version history
0.3.4latest on npm
Audit
Dependencies
typescriptrequiredThis `tsc` package is deprecated. The `typescript` package is the correct, official way to install and use the TypeScript compiler (`tsc`) CLI and its programmatic APIs.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
tsc — npm install tsc · libregistry