name: project description: What ttsc is, the workspace layout, and the canonical commands.
Project Outline
Product Contract
ttsc is a standalone TypeScript-Go compiler, runtime, plugin host, and LSP host. It ships three CLIs and a plugin protocol:
ttsc: build, check, watch, and source-to-source transform on top oftypescript(the native TypeScript-Go compiler).ttsx: run a TypeScript entrypoint after a real type-check (a typedtsx/ts-node).ttscserver: LSP host wrappingtsc --lsp --stdioand proxying JSON-RPC so ttsc plugin diagnostics, code actions, andworkspace/executeCommandhandlers reach the editor through one stream.- Plugins: Go source packages that share TypeScript-Go's AST/Checker. Executable
package mainsources build as sidecars; non-maintransform packages link into a native host.ttscbuilds plugin source on demand and caches the binary.
The contract is general-purpose. Downstream projects like typia and nestia are compatibility fixtures, not the product definition.
Layout
packages/ttsc: JS launcher/API plus Go host (cmd/*,driver,internal,utility,shim/).driver.PluginSourceis the public seam embedders implement;NativePluginSourceadaptscapabilities.lspsidecars.internal/lspserveris the byte-level LSP proxy ttscserver uses.packages/{banner,paths,strip}: utility transform plugins with package-owneddriver/logic linked into a generic native host.packages/lint:@ttsc/lintwith its own native engine, exposing LSP verbs fromlinthost/lsp.goso ttscserver andpackages/vscodecall them through the language client. Rules may consult the TypeScript-Go Checker directly viactx.Checker; third-party rules ship through the publicrulepackage and may use therule/astutilhelpers.packages/wasm:@ttsc/wasm, Gohosthelper plus JS boot scaffolding for in-browser ttsc playgrounds.host.ExposebindsglobalThis[apiName]with the standard verbs (build/check/transform/plugin/plugins/version) plus fountain verbs (snapshot/getDiagnostics/getNodeAtPosition/...) over a snapshot handle table.packages/playground:@ttsc/playground, reusable Web Worker + React shell built on@ttsc/wasm. ExportscreateWorkerCompiler(worker-sideICompilerServicefactory),PlaygroundShell(Tailwind 4 React component), runtime npm dependency installer, typia source/runtime pack helpers, and Monaco editor wrappers. Consumed bywebsite/andtypia/website/.packages/factory:@ttsc/factory, a hand-written, zero-dependency TypeScript AST factory and width-aware printer (notypescriptimport) for source-code generation that survives the tsgo migration. Standalone published library; nothing else in the workspace depends on it yet.packages/unplugin: bundler adapters.packages/vscode: VS Code extension that wiresvscode-languageclientto ttscserver, exposes the built-in lint/format command bridge, and lets other plugin command ids execute through the language client with editor-appliedWorkspaceEdits.packages/ttsc-*: per-platform packages (native helper + bundled Go SDK). Each ships both thettschelper and thettscserverbinary.tests/projects: project-shaped fixtures copied into temp dirs byTestProject.copyProject.tests/test-*: feature-test packages (run viapnpm test:features).tests/utils: shared helpers (@ttsc/testing).tests/<plugin-name>: workspace packages that need to berequire.resolve-able from a fixture'snode_modules(e.g.tests/lint-contributor-demo). Built byscripts/build-current.cjsbefore tests run.website: Nextra-based docs site (src/content/docs/**/*.mdx) that is the canonical home for guides, shipped to https://ttsc.dev.config,scripts: shared tsconfig and workspace scripts.
Commands
pnpm install
pnpm format
pnpm build
pnpm test:go
pnpm test