Registry / devops / tsc-esbuild

tsc-esbuild

JSON →
library0.0.1-0jsnpmunverified

tsc-esbuild is a thin wrapper that runs TypeScript's compiler (tsc) for type checking but delegates actual JavaScript/declaration file emission to esbuild for dramatically faster builds. Version 0.0.1-0 is the initial prerelease with peer dependency on TypeScript 3.x or 4.x. Unlike ts-speedy or other hybrid approaches, this package directly patches the tsc API to intercept output, making it drop-in compatible with existing tsc invocations. It targets Node.js environments (CLI) and is not intended for browser use. Release cadence is irregular as it's in early development.

npm install tsc-esbuild
INSTALL
IMPORT
SIG · TSC-ESBUILD
T
tsc-esbuild
devopsjavascriptv0.0.1-0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
import tscEsbuild from 'tsc-esbuild'
const tscEsbuild = require('tsc-esbuild')
Package is ESM-only; CommonJS require will fail. Use dynamic import() if needed.
runTscWithEsbuild
import { runTscWithEsbuild } from 'tsc-esbuild'
import { run } from 'tsc-esbuild'
Named export is 'runTscWithEsbuild' (not 'run'). Use named import for programmatic access.
TscEsbuildOptions
import type { TscEsbuildOptions } from 'tsc-esbuild'
TypeScript users should import the type for options object; available since 0.0.1-0 in .d.ts files.

Shows programmatic usage with async/await, passing tsconfig path and esbuild options.

import tscEsbuild from 'tsc-esbuild'; const options = { tsconfig: './tsconfig.json', esbuildOptions: { target: 'es2020', format: 'esm', }, }; async function build() { try { const result = await tscEsbuild(options); console.log('Build succeeded:', result.outputFiles); } catch (err) { console.error('Build failed:', err); } } build();
tsc-esbuild --version
Debug
Known issues
breakingRequires TypeScript 3.x or 4.x only; not compatible with TypeScript 5.x.
fix
Downgrade TypeScript to 4.x or wait for package update.
affects: >=0.0.1-0 <0.1.0
gotchaDefault export is a function, not a class; calling without `new` is correct.
fix
Use `tscEsbuild(options)` directly, not `new tscEsbuild()`.
affects: >=0.0.1-0
deprecatedThe `emitOnAll` option (if used) is deprecated; use `emitOn` instead.
fix
Replace `emitOnAll` with `emitOn: 'all'` in options.
affects: >=0.0.1-0
gotchaesbuild must be installed separately; not bundled.
fix
Run `npm install esbuild --save-dev` in your project.
affects: >=0.0.1-0
Errors
Common errors & fixes
Error: Cannot find module 'esbuild'
esbuild peer dependency not installed; package uses it at runtime.
fix
Run `npm install esbuild` or add it to your package.json.
TypeScript error: 'TscEsbuildOptions' is not a valid type
Importing type from wrong path or not using type import.
fix
Use `import type { TscEsbuildOptions } from 'tsc-esbuild'` instead of regular import.
TypeError: tscEsbuild is not a function
Using `new tscEsbuild()` or incorrect import (e.g., CommonJS require).
fix
Import with `import tscEsbuild from 'tsc-esbuild'` and call as `tscEsbuild(options)`.
Upgrade
Version history
0.0.1-0latest on npm
Audit
Dependencies
typescriptrequiredtsc is used for type checking; must be installed separately
esbuildrequiredesbuild handles actual code emission
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
1
Resources
tsc-esbuild — npm install tsc-esbuild · libregistry