惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
罗磊的独立博客
B
Blog
博客园_首页
A
About on SuperTechFans
有赞技术团队
有赞技术团队
V
V2EX
U
Unit 42
I
InfoQ
IT之家
IT之家
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
H
Help Net Security

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - samchon/ttsc: A `typescript-go` toolchain for co...
autobe · 2026-05-04 · via Hacker News: Show HN

banner of ttsc

GitHub license NPM Version NPM Downloads Build Status Guide Documents Discord Badge

A typescript-go toolchain for compiler-powered plugins and type-safe execution.

Benchmarked against the legacy tsc + eslint/prettier path on real repositories; see the benchmark guide for per-project ratios.

  • ttsc: build, check, and transform.
  • ttsx: execute TypeScript with type checking.
    • native TypeScript-Go execution instead of transpile-only runners.
    • type checking that tsx does not provide.
  • @ttsc/lint: replaces eslint and prettier.
    • lint violations as TS compile errors.
    • format autofixes via ttsc format.
  • plugin support: compiler-powered libraries, such as typia.

Setup

Install

Install ttsc, @ttsc/lint, and the native TypeScript preview package:

npm install -D ttsc @ttsc/lint @typescript/native-preview

Commands

Run TypeScript directly with ttsx (CLI command):

Build, check, or watch the project with ttsc:

npx ttsc
npx ttsc --noEmit
npx ttsc --watch

Rewrite source files in place with the @ttsc/lint format rules:

VS Code Extension

Install the VS Code extension for live TypeScript-Go editor features plus saved-state ttsc plugin diagnostics and actions.

Install it from the VS Code Marketplace by searching ttsc, or run:

Then turn on format-on-save in .vscode/settings.json:

Lint fixes stay off-save by default; opt in with "editor.codeActionsOnSave": { "source.fixAll.ttsc": "explicit" }.

See @ttsc/vscode for requirements and settings.

Bundlers

Use @ttsc/unplugin when a bundler owns your build.

It runs ttsc plugins inside supported bundlers.

npm install -D ttsc @ttsc/lint @typescript/native-preview
npm install -D @ttsc/unplugin

Minimal Vite setup:

// vite.config.ts
import ttsc from "@ttsc/unplugin/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [ttsc()],
});

Supported bundlers:

  • Vite
  • Rollup
  • Rolldown
  • esbuild
  • Webpack
  • Rspack
  • Next.js
  • Farm
  • Bun

See @ttsc/unplugin for full setup and adapter options.

Plugins

Plugins let libraries add compile-time checks, transforms, and type-driven code generation to normal ttsc and ttsx runs.

# compile
npx ttsc

# execute
npx ttsx src/index.ts

Transform Example

A transform uses TypeScript types to generate JavaScript before runtime.

import typia, { tags } from "typia";
import { v4 } from "uuid";

const matched: boolean = typia.is<IMember>({
  id: v4(),
  email: "samchon.github@gmail.com",
  age: 30,
});
console.log(matched); // true

interface IMember {
  id: string & tags.Format<"uuid">;
  email: string & tags.Format<"email">;
  age: number &
    tags.Type<"uint32"> &
    tags.ExclusiveMinimum<19> &
    tags.Maximum<100>;
}

The transform replaces typia.is<IMember>() with dedicated JavaScript checks at build time:

import typia from "typia";
import * as __typia_transform__isFormatEmail from "typia/lib/internal/_isFormatEmail";
import * as __typia_transform__isFormatUuid from "typia/lib/internal/_isFormatUuid";
import * as __typia_transform__isTypeUint32 from "typia/lib/internal/_isTypeUint32";
import { v4 } from "uuid";

const matched = (() => {
  const _io0 = (input) =>
    "string" === typeof input.id &&
    __typia_transform__isFormatUuid._isFormatUuid(input.id) &&
    "string" === typeof input.email &&
    __typia_transform__isFormatEmail._isFormatEmail(input.email) &&
    "number" === typeof input.age &&
    __typia_transform__isTypeUint32._isTypeUint32(input.age) &&
    19 < input.age &&
    input.age <= 100;
  return (input) => "object" === typeof input && null !== input && _io0(input);
})()({
  id: v4(),
  email: "samchon.github@gmail.com",
  age: 30,
});
console.log(matched); // true

Programmatic API

Embed ttsc from another Node tool with the TtscCompiler class:

import { TtscCompiler } from "ttsc";

const compiler = new TtscCompiler({ cwd: "./project" });
const result = compiler.compile();

if (result.type === "success") {
  for (const [path, text] of Object.entries(result.output)) {
    // path is project-relative ("dist/index.js", "dist/index.d.ts", ...)
    console.log(path, text.length);
  }
} else if (result.type === "failure") {
  for (const d of result.diagnostics) {
    console.error(`${d.file}:${d.line}:${d.character} ${d.messageText}`);
  }
}

See the Programmatic API guide for the full lifecycle, plugin overrides, and patterns. For browser embedding, see @ttsc/wasm and the higher-level @ttsc/playground package.

List of Plugins

ttsc ships a few small utility plugins in this repository.

  • @ttsc/banner: adds @packageDocumentation JSDoc banners.
  • @ttsc/lint: lints and formats TypeScript source.
  • @ttsc/paths: rewrites source path aliases so JS and declaration emit receive relative imports.
  • @ttsc/strip: removes configured calls and debugger statements.
  • @ttsc/unplugin: runs ttsc plugins inside bundlers supported by unplugin.

Plugin authors should start from the Guide Documents.

Ecosystem plugins are listed below; PRs adding ttsc plugins are welcome.

  • nestia: generates NestJS routes, OpenAPI, and SDKs.
  • typia: generates validators, serializers, and type-driven runtime code.

Sponsors

Sponsors

Thanks for your support.

Your donation encourages ttsc development.

References