{"id":26542,"library":"ttsc","title":"ttsc","description":"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.","status":"active","version":"0.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/samchon/ttsc","tags":["javascript","tsgo","runner","transformer","plugin-host","ttsc","typescript"],"install":[{"cmd":"npm install ttsc","lang":"bash","label":"npm"},{"cmd":"yarn add ttsc","lang":"bash","label":"yarn"},{"cmd":"pnpm add ttsc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for ttsc to compile TypeScript with the native preview runtime.","package":"@typescript/native-preview","optional":false}],"imports":[{"note":"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.","wrong":"const ttsc = require('ttsc')","symbol":"ttsc","correct":"import ttsc from 'ttsc'"},{"note":"ttsx is a separate runtime; import from the subpath 'ttsc/ttsx' for programmatic use. CLI is invoked via 'npx ttsx'.","wrong":"import { ttsx } from 'ttsc'","symbol":"ttsx","correct":"import ttsx from 'ttsc/ttsx'"},{"note":"Used when defining custom plugins. Available as a named export.","wrong":null,"symbol":"TransformPlugin","correct":"import { TransformPlugin } from 'ttsc'"}],"quickstart":{"code":"// 1. Install dependencies\n// npm i -D ttsc @typescript/native-preview\n\n// 2. Create a TypeScript file src/index.ts:\nimport typia, { tags } from 'typia';\n\nconst result = typia.is<{ name: string }>({ name: 'test' });\nconsole.log(result); // true\n\n// 3. Run with ttsx:\n// npx ttsx src/index.ts\n\n// 4. Or compile with ttsc:\n// npx ttsc\n","lang":"typescript","description":"Shows installation and basic usage of ttsc/ttsx with typia for type validation, including CLI commands for execution and compilation."},"warnings":[{"fix":"Run 'npm i -D @typescript/native-preview' alongside ttsc.","message":"ttsc v0.6.0 requires @typescript/native-preview to be installed as a devDependency. Without it, ttsc fails with 'Cannot find module @typescript/native-preview'.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Run 'npx ttsc clean' after modifying plugin code.","message":"Plugin transformations run in Go binaries; cache can become stale when developing plugins. Clear cache with 'npx ttsc clean' to avoid unpredictable behavior.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Avoid reliance on built-in linting; configure ESLint independently.","message":"The 'ttsc lint' command was experimental in v0.5.0 and may be removed in future versions. Use dedicated linters like ESLint instead.","severity":"deprecated","affected_versions":"0.5.x"},{"fix":"Ensure plugin objects have a 'transform' property pointing to the module import path.","message":"Plugin configuration in tsconfig.json uses 'transform' key (not 'transformer'), which can cause silent failures if misnamed.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Replace 'tsgo' with 'ttsc' in package.json scripts and shell commands.","message":"ttsc v0.4.0 changed the binary name from 'tsgo' to 'ttsc'. Scripts referencing 'tsgo' will break.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Install and configure @ttsc/paths plugin in tsconfig.json.","message":"ttsx does not support all TypeScript config features like tsconfig paths without the @ttsc/paths plugin. May cause module resolution failures.","severity":"gotcha","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with 'npm i -D @typescript/native-preview'.","cause":"Missing required dependency after updating to ttsc v0.6.0.","error":"Cannot find module '@typescript/native-preview'"},{"fix":"Install TypeScript: 'npm i -D typescript'.","cause":"TypeScript is not installed or the wrong version is used (ttsc requires TypeScript 5.x or later).","error":"Error: TypeScript compiler host not found. Is TypeScript installed?"},{"fix":"Check that 'transform' property points to a valid plugin module (e.g., 'typia/lib/transform').","cause":"Incorrect plugin transform path in tsconfig.json, causing type mismatch.","error":"error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}