tta small language for TypeScript and TSX

Start

TypeScript, with better control flow.

tt is a small language that adds tagged unions, exhaustive pattern matching, Result control flow, pipelines, and mutation-safe bindings to TypeScript. Its syntax compiles to readable TypeScript without a runtime dependency.

bunx @openload28/create-tt@next my-app
example.tt
import * as Result from "@tt/std/result";

const message = input
|> parse
|> Result.mapP(format)
|> (result => match (result) {
Ok(value) => value,
Err(error) => `Error: ${error}`,
});

Features

  • Every valid TypeScript or TSX file remains a valid .tt or .ttx file.
  • Only completely parsed tt constructs are transformed; ordinary source passes through unchanged except for configured relative .tt and .ttx import rewriting.
  • tt-level diagnostics come from ttc at the original source range, while TypeScript owns ordinary type errors.
  • The emitted TypeScript or TSX preserves the source program's evaluation order.
NextInstall →