{"id":49298227,"url":"https://github.com/samchon/ttsc","last_synced_at":"2026-05-31T07:00:36.618Z","repository":{"id":353589355,"uuid":"1215827704","full_name":"samchon/ttsc","owner":"samchon","description":"A `typescript-go` toolchain for compiler-powered plugins and type-safe execution + 500x faster lint integrated into compiler","archived":false,"fork":false,"pushed_at":"2026-05-25T23:04:36.000Z","size":126121,"stargazers_count":142,"open_issues_count":25,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-25T23:22:48.944Z","etag":null,"topics":["ast","cli","compiler","compilers","eslint","esm","lint","loader","nodejs","plugin","runtime","toolchain","transformer","typescript","typescript-go","typia"],"latest_commit_sha":null,"homepage":"https://ttsc.dev/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samchon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["samchon"]}},"created_at":"2026-04-20T09:42:35.000Z","updated_at":"2026-05-25T23:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/samchon/ttsc","commit_stats":null,"previous_names":["samchon/ttsc"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/samchon/ttsc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fttsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fttsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fttsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fttsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchon","download_url":"https://codeload.github.com/samchon/ttsc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fttsc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33644313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","cli","compiler","compilers","eslint","esm","lint","loader","nodejs","plugin","runtime","toolchain","transformer","typescript","typescript-go","typia"],"created_at":"2026-04-26T05:02:06.832Z","updated_at":"2026-05-31T07:00:36.612Z","avatar_url":"https://github.com/samchon.png","language":"Go","funding_links":["https://github.com/sponsors/samchon"],"categories":[],"sub_categories":[],"readme":"# `ttsc`\n\n![banner of ttsc](https://ttsc.dev/og.jpg)\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/ttsc/blob/master/LICENSE) [![NPM Version](https://img.shields.io/npm/v/ttsc.svg)](https://www.npmjs.com/package/ttsc) [![NPM Downloads](https://img.shields.io/npm/dm/ttsc.svg)](https://www.npmjs.com/package/ttsc) [![Build Status](https://github.com/samchon/ttsc/workflows/test/badge.svg)](https://github.com/samchon/ttsc/actions?query=workflow%3Atest) [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://ttsc.dev/docs) [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat\u0026labelColor=5866f2\u0026logo=discord\u0026logoColor=white\u0026link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)\n\nA `typescript-go` toolchain for compiler-powered plugins and type-safe execution.\n\nBenchmarked against the legacy `tsc` + `eslint`/`prettier` path on real repositories; see the [benchmark guide](https://ttsc.dev/docs/benchmark) for per-project ratios.\n\n- **`ttsc`**: build, check, and transform.\n- **`ttsx`**: execute TypeScript with type checking.\n  - native TypeScript-Go execution instead of transpile-only runners.\n  - type checking that `tsx` does not provide.\n- **`@ttsc/lint`**: replaces `eslint` and `prettier`.\n  - lint violations as TS compile errors.\n  - format autofixes via `ttsc format`.\n- **plugin support**: compiler-powered libraries, such as `typia`.\n\n## Setup\n\n### Install\n\nInstall `ttsc`, `@ttsc/lint`, and the native TypeScript preview package:\n\n```bash\nnpm install -D ttsc @ttsc/lint @typescript/native-preview\n```\n\n### Commands\n\nRun TypeScript directly with `ttsx` (CLI command):\n\n```bash\nnpx ttsx src/index.ts\n```\n\nBuild, check, or watch the project with `ttsc`:\n\n```bash\nnpx ttsc\nnpx ttsc --noEmit\nnpx ttsc --watch\n```\n\nRewrite source files in place with the `@ttsc/lint` format rules:\n\n```bash\nnpx ttsc format\n```\n\n### VSCode Extension\n\nInstall the VS Code extension for live TypeScript-Go editor features plus saved-state ttsc plugin diagnostics and actions. Run `npx @ttsc/vscode`; it downloads the package and installs the bundled `.vsix` into VS Code, nothing to keep as a dependency:\n\n```bash\nnpx @ttsc/vscode\n```\n\nThen turn on format-on-save in `.vscode/settings.json`:\n\n```jsonc\n\"[typescript][typescriptreact]\": {\n  \"editor.defaultFormatter\": \"samchon.ttsc\",\n  \"editor.formatOnSave\": true\n}\n```\n\nLint fixes stay off-save by default; opt in with `\"editor.codeActionsOnSave\": { \"source.fixAll.ttsc\": \"explicit\" }`.\n\nSee [`@ttsc/vscode`](https://github.com/samchon/ttsc/tree/master/packages/vscode) for requirements and settings.\n\n### Bundlers\n\nUse `@ttsc/unplugin` when a bundler owns your build.\n\nIt runs `ttsc` plugins inside supported bundlers.\n\n```bash\nnpm install -D ttsc @ttsc/lint @typescript/native-preview\nnpm install -D @ttsc/unplugin\n```\n\nMinimal Vite setup:\n\n```ts\n// vite.config.ts\nimport ttsc from \"@ttsc/unplugin/vite\";\nimport { defineConfig } from \"vite\";\n\nexport default defineConfig({\n  plugins: [ttsc()],\n});\n```\n\nSupported bundlers:\n\n- Vite\n- Rollup\n- Rolldown\n- esbuild\n- Webpack\n- Rspack\n- Next.js\n- Farm\n- Bun\n\nSee [`@ttsc/unplugin`](https://github.com/samchon/ttsc/tree/master/packages/unplugin) for full setup and adapter options.\n\n## Plugins\n\nPlugins let libraries add compile-time checks, transforms, and type-driven code generation to normal `ttsc` and `ttsx` runs.\n\n```bash\n# compile\nnpx ttsc\n\n# execute\nnpx ttsx src/index.ts\n```\n\n### Transform Example\n\nA transform uses TypeScript types to generate JavaScript before runtime.\n\n```ts\nimport typia, { tags } from \"typia\";\nimport { v4 } from \"uuid\";\n\nconst matched: boolean = typia.is\u003cIMember\u003e({\n  id: v4(),\n  email: \"samchon.github@gmail.com\",\n  age: 30,\n});\nconsole.log(matched); // true\n\ninterface IMember {\n  id: string \u0026 tags.Format\u003c\"uuid\"\u003e;\n  email: string \u0026 tags.Format\u003c\"email\"\u003e;\n  age: number \u0026\n    tags.Type\u003c\"uint32\"\u003e \u0026\n    tags.ExclusiveMinimum\u003c19\u003e \u0026\n    tags.Maximum\u003c100\u003e;\n}\n```\n\nThe transform replaces `typia.is\u003cIMember\u003e()` with dedicated JavaScript checks at build time:\n\n```js\nimport typia from \"typia\";\nimport * as __typia_transform__isFormatEmail from \"typia/lib/internal/_isFormatEmail\";\nimport * as __typia_transform__isFormatUuid from \"typia/lib/internal/_isFormatUuid\";\nimport * as __typia_transform__isTypeUint32 from \"typia/lib/internal/_isTypeUint32\";\nimport { v4 } from \"uuid\";\n\nconst matched = (() =\u003e {\n  const _io0 = (input) =\u003e\n    \"string\" === typeof input.id \u0026\u0026\n    __typia_transform__isFormatUuid._isFormatUuid(input.id) \u0026\u0026\n    \"string\" === typeof input.email \u0026\u0026\n    __typia_transform__isFormatEmail._isFormatEmail(input.email) \u0026\u0026\n    \"number\" === typeof input.age \u0026\u0026\n    __typia_transform__isTypeUint32._isTypeUint32(input.age) \u0026\u0026\n    19 \u003c input.age \u0026\u0026\n    input.age \u003c= 100;\n  return (input) =\u003e \"object\" === typeof input \u0026\u0026 null !== input \u0026\u0026 _io0(input);\n})()({\n  id: v4(),\n  email: \"samchon.github@gmail.com\",\n  age: 30,\n});\nconsole.log(matched); // true\n```\n\n## Programmatic API\n\nEmbed `ttsc` from another Node tool with the `TtscCompiler` class:\n\n```ts\nimport { TtscCompiler } from \"ttsc\";\n\nconst compiler = new TtscCompiler({ cwd: \"./project\" });\nconst result = compiler.compile();\n\nif (result.type === \"success\") {\n  for (const [path, text] of Object.entries(result.output)) {\n    // path is project-relative (\"dist/index.js\", \"dist/index.d.ts\", ...)\n    console.log(path, text.length);\n  }\n} else if (result.type === \"failure\") {\n  for (const d of result.diagnostics) {\n    console.error(`${d.file}:${d.line}:${d.character} ${d.messageText}`);\n  }\n}\n```\n\nSee the [Programmatic API guide](https://ttsc.dev/docs/ttsc/api) for the full lifecycle, plugin overrides, and patterns. For browser embedding, see [`@ttsc/wasm`](https://github.com/samchon/ttsc/tree/master/packages/wasm) and the higher-level [`@ttsc/playground`](https://github.com/samchon/ttsc/tree/master/packages/playground) package.\n\n### List of Plugins\n\n`ttsc` ships a few small utility plugins in this repository.\n\n- [`@ttsc/banner`](https://github.com/samchon/ttsc/tree/master/packages/banner): adds `@packageDocumentation` JSDoc banners.\n- [`@ttsc/lint`](https://github.com/samchon/ttsc/tree/master/packages/lint): lints and formats TypeScript source.\n- [`@ttsc/paths`](https://github.com/samchon/ttsc/tree/master/packages/paths): rewrites source path aliases so JS and declaration emit receive relative imports.\n- [`@ttsc/strip`](https://github.com/samchon/ttsc/tree/master/packages/strip): removes configured calls and `debugger` statements.\n- [`@ttsc/unplugin`](https://github.com/samchon/ttsc/tree/master/packages/unplugin): runs `ttsc` plugins inside bundlers supported by `unplugin`.\n\nPlugin authors should start from the [`Guide Documents`](https://ttsc.dev/docs).\n\nEcosystem plugins are listed below; PRs adding `ttsc` plugins are welcome.\n\n- [`nestia`](https://github.com/samchon/nestia): generates NestJS routes, OpenAPI, and SDKs.\n- [`typia`](https://github.com/samchon/typia): generates validators, serializers, and type-driven runtime code.\n\n## Sponsors\n\n[![Sponsors](https://raw.githubusercontent.com/samchon/sponsor-images/refs/heads/master/public/circle.svg)](https://github.com/sponsors/samchon)\n\nThanks for your support.\n\nYour [donation](https://github.com/sponsors/samchon) encourages `ttsc` development.\n\n## References\n\n- TypeScript runners: [`ts-node`](https://github.com/TypeStrong/ts-node) and [`tsx`](https://github.com/privatenumber/tsx)\n- Transformer tooling: [`ttypescript`](https://github.com/cevek/ttypescript) and [`ts-patch`](https://github.com/nonara/ts-patch)\n- Inspired by: [`typical`](https://github.com/elliots/typical) and [`tsgonest`](https://github.com/tsgonest/tsgonest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fttsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchon%2Fttsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fttsc/lists"}