tta small language for TypeScript and TSX

Start

React, with exhaustive JSX.

.ttx is TSX plus tt. JSX stays intact, while tt constructs inside expression containers compile with the same diagnostics and evaluation guarantees as ordinary expressions.

example.ttx
import { useState } from "react";

variant LoadState {
Ready(message: string),
Empty,
Failed(message: string),
}

export const Status = () => {
const [state] = useState<LoadState>(LoadState.Ready("Hello ttx"));

return (
<section data-state={match (state) {
Ready => "ready",
Empty => "empty",
Failed => "failed",
}}>
{match (state) {
Ready(message) => <strong>{message}</strong>,
Empty => <span>Nothing here</span>,
Failed(message) => <mark>{message}</mark>,
}}
</section>
);
};

Features

  • Ordinary TSX remains valid in .ttx; JSX tags and text pass through byte for byte.
  • tt constructs work inside JSX children and attribute expression containers.
  • Concise arrow components preserve lexical scope and JSX evaluation order.
  • Relative .ttx imports work through the CLI, editor, and @openload28/unplugin-tt.
Nextvariant →