Registry / devops / ttsc
library0.6.0jsnpmunverified

ttsc is a general-purpose TypeScript-to-Go compiler, plugin host, and runtime that enables compiler-powered transforms and type-safe execution. Current stable version is v0.6.0, released with ongoing updates roughly every few months. Key differentiators: it provides a ttsx executor that is 10x faster than ts-node and includes type checking (unlike tsx), supports native Go-based transformer plugins configured via tsconfig.json, and integrates with libraries like typia. It includes a built-in linter and supports TypeScript 6 preview.

npm install ttsc
INSTALL
IMPORT
SIG · TTSC
T
ttsc
devopsjavascriptv0.6.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.

ttsc
import ttsc from 'ttsc'
const ttsc = require('ttsc')
ttsc is typically used as a CLI binary, but the package also exports a default function for programmatic use. The named export may not be available in all versions.
ttsx
import ttsx from 'ttsc/ttsx'
import { ttsx } from 'ttsc'
ttsx is a separate runtime; import from the subpath 'ttsc/ttsx' for programmatic use. CLI is invoked via 'npx ttsx'.
TransformPlugin
import { TransformPlugin } from 'ttsc'
Used when defining custom plugins. Available as a named export.

Shows installation and basic usage of ttsc/ttsx with typia for type validation, including CLI commands for execution and compilation.

// 1. Install dependencies // npm i -D ttsc @typescript/native-preview // 2. Create a TypeScript file src/index.ts: import typia, { tags } from 'typia'; const result = typia.is<{ name: string }>({ name: 'test' }); console.log(result); // true // 3. Run with ttsx: // npx ttsx src/index.ts // 4. Or compile with ttsc: // npx ttsc
ttsc --version
Debug
Known issues
breakingttsc v0.6.0 requires @typescript/native-preview to be installed as a devDependency. Without it, ttsc fails with 'Cannot find module @typescript/native-preview'.
fix
Run 'npm i -D @typescript/native-preview' alongside ttsc.
affects: >=0.6.0
gotchaPlugin transformations run in Go binaries; cache can become stale when developing plugins. Clear cache with 'npx ttsc clean' to avoid unpredictable behavior.
fix
Run 'npx ttsc clean' after modifying plugin code.
affects: >=0.4.0
deprecatedThe 'ttsc lint' command was experimental in v0.5.0 and may be removed in future versions. Use dedicated linters like ESLint instead.
fix
Avoid reliance on built-in linting; configure ESLint independently.
affects: 0.5.x
gotchaPlugin configuration in tsconfig.json uses 'transform' key (not 'transformer'), which can cause silent failures if misnamed.
fix
Ensure plugin objects have a 'transform' property pointing to the module import path.
affects: >=0.4.0
breakingttsc v0.4.0 changed the binary name from 'tsgo' to 'ttsc'. Scripts referencing 'tsgo' will break.
fix
Replace 'tsgo' with 'ttsc' in package.json scripts and shell commands.
affects: >=0.4.0
gotchattsx does not support all TypeScript config features like tsconfig paths without the @ttsc/paths plugin. May cause module resolution failures.
fix
Install and configure @ttsc/paths plugin in tsconfig.json.
affects: >=0.4.0
Errors
Common errors & fixes
Cannot find module '@typescript/native-preview'
Missing required dependency after updating to ttsc v0.6.0.
fix
Install with 'npm i -D @typescript/native-preview'.
Error: TypeScript compiler host not found. Is TypeScript installed?
TypeScript is not installed or the wrong version is used (ttsc requires TypeScript 5.x or later).
fix
Install TypeScript: 'npm i -D typescript'.
error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'
Incorrect plugin transform path in tsconfig.json, causing type mismatch.
fix
Check that 'transform' property points to a valid plugin module (e.g., 'typia/lib/transform').
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
@typescript/native-previewrequiredRequired for ttsc to compile TypeScript with the native preview runtime.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
ttsc — npm install ttsc · libregistry