{"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,"search_vec":"'10x':50 '6':88 'base':66 'built':82 'built-in':81 'check':59 'compil':12,20 'compiler-pow':19 'configur':69 'current':28 'differenti':42 'enabl':18 'everi':38 'execut':27 'executor':47 'faster':51 'general':6 'general-purpos':5 'go':11,65 'go-bas':64 'host':14,96 'includ':57,79 'integr':73 'javascript':90 'key':41 'librari':75 'like':76 'linter':84 'month':40 'nativ':63 'node':55 'ongo':35 'plugin':13,68,95 'plugin-host':94 'power':21 'preview':89 'provid':44 'purpos':7 'releas':33 'rough':37 'runner':92 'runtim':16 'safe':26 'stabl':29 'support':62,86 'transform':22,67,93 'ts':54 'ts-node':53 'tsconfig.json':71 'tsgo':91 'tsx':61 'ttsc':1,2,97 'ttsx':46 'type':25,58 'type-saf':24 'typescript':9,87,98 'typescript-to-go':8 'typia':77 'unlik':60 'updat':36 'v0.6.0':32 'version':30 'via':70","created_at":"2026-05-01T13:50:31.661323+00:00","updated_at":"2026-05-01T13:50:31.661323+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"ttsc","cli_version":null,"type":"library","homepage":"https://ttsc.dev","github":"https://github.com/samchon/ttsc","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ttsc","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}