{"id":26525,"library":"tsc-esbuild","title":"tsc-esbuild","description":"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.","status":"active","version":"0.0.1-0","language":"javascript","source_language":"en","source_url":"https://github.com/fi3ework/tsc-esbuild","tags":["javascript","esbuild","tsc","typescript"],"install":[{"cmd":"npm install tsc-esbuild","lang":"bash","label":"npm"},{"cmd":"yarn add tsc-esbuild","lang":"bash","label":"yarn"},{"cmd":"pnpm add tsc-esbuild","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"tsc is used for type checking; must be installed separately","package":"typescript","optional":false},{"reason":"esbuild handles actual code emission","package":"esbuild","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail. Use dynamic import() if needed.","wrong":"const tscEsbuild = require('tsc-esbuild')","symbol":"default","correct":"import tscEsbuild from 'tsc-esbuild'"},{"note":"Named export is 'runTscWithEsbuild' (not 'run'). Use named import for programmatic access.","wrong":"import { run } from 'tsc-esbuild'","symbol":"runTscWithEsbuild","correct":"import { runTscWithEsbuild } from 'tsc-esbuild'"},{"note":"TypeScript users should import the type for options object; available since 0.0.1-0 in .d.ts files.","symbol":"TscEsbuildOptions","correct":"import type { TscEsbuildOptions } from 'tsc-esbuild'"}],"quickstart":{"code":"import tscEsbuild from 'tsc-esbuild';\n\nconst options = {\n  tsconfig: './tsconfig.json',\n  esbuildOptions: {\n    target: 'es2020',\n    format: 'esm',\n  },\n};\n\nasync function build() {\n  try {\n    const result = await tscEsbuild(options);\n    console.log('Build succeeded:', result.outputFiles);\n  } catch (err) {\n    console.error('Build failed:', err);\n  }\n}\n\nbuild();","lang":"typescript","description":"Shows programmatic usage with async/await, passing tsconfig path and esbuild options."},"warnings":[{"fix":"Downgrade TypeScript to 4.x or wait for package update.","message":"Requires TypeScript 3.x or 4.x only; not compatible with TypeScript 5.x.","severity":"breaking","affected_versions":">=0.0.1-0 <0.1.0"},{"fix":"Use `tscEsbuild(options)` directly, not `new tscEsbuild()`.","message":"Default export is a function, not a class; calling without `new` is correct.","severity":"gotcha","affected_versions":">=0.0.1-0"},{"fix":"Replace `emitOnAll` with `emitOn: 'all'` in options.","message":"The `emitOnAll` option (if used) is deprecated; use `emitOn` instead.","severity":"deprecated","affected_versions":">=0.0.1-0"},{"fix":"Run `npm install esbuild --save-dev` in your project.","message":"esbuild must be installed separately; not bundled.","severity":"gotcha","affected_versions":">=0.0.1-0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install esbuild` or add it to your package.json.","cause":"esbuild peer dependency not installed; package uses it at runtime.","error":"Error: Cannot find module 'esbuild'"},{"fix":"Use `import type { TscEsbuildOptions } from 'tsc-esbuild'` instead of regular import.","cause":"Importing type from wrong path or not using type import.","error":"TypeScript error: 'TscEsbuildOptions' is not a valid type"},{"fix":"Import with `import tscEsbuild from 'tsc-esbuild'` and call as `tscEsbuild(options)`.","cause":"Using `new tscEsbuild()` or incorrect import (e.g., CommonJS require).","error":"TypeError: tscEsbuild is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}