AquaScript is a friendlier superset of TypeScript that compiles to clean JavaScript. Less ceremony, full type safety, and seamless compatibility with every JS and TS package you already use.
AquaScript keeps the safety and expressiveness of TypeScript while adding the syntax that makes daily development genuinely enjoyable.
val and var replace const and let. Access modifiers pub, priv, prot. Constructors via init.match with literal, OR, object, binding, and is type-guard patterns. Exhaustiveness checked by the linter.|>. Use _ as a placement placeholder. Compiles to nested calls..map().filter().guard. Narrows the binding to non-null for the rest of the function.Ok<T> and Err<E> for explicit error handling without exceptions. Pairs naturally with match.async fun* and yield support for streaming data, paginated APIs, and event sequences with for await.Str, Int, Bool, List<T>, Maybe<T>, Dict<K,V>. Use AquaScript aliases or native TS types — both always valid.[Int, Str, Bool]. Named elements, optional and rest positions, full generic inference. Fully erased at compile time.A | B, intersection types A & B, discriminated unions, and the Either<A,B> alias.`task:${Status}` expands to all variants. Includes Uppercase, Lowercase, Capitalize.T extends U ? A : B. Full infer support, distributive evaluation, and built-in utilities like ReturnType<T>.as but safe.AquaScript feels like TypeScript learned from the best parts of modern languages. Same safety, cleaner surface.
AquaScript compiles to identical JavaScript. The only difference is what you write.
AquaScript ships with a formatter, linter, REPL, and CLI. No config required to get started.
.aq files to clean, readable JavaScript with source maps. Single file or full directory.--check mode for CI. No style debates.--fix auto-fixes what it can.~/.aquascript_history.aqua.config.json, tsconfig.json, and a starter src/index.aq.AquaScript doesn't ask you to abandon your tools. Every npm package, TypeScript library, and JavaScript file works without any changes.
.d.ts files and @types/* packages automatically, bringing full type safety to all your TS dependencies.require() packages with import syntax — the compiler handles it.js { ... } and it passes through unchanged.The compiler is feature-complete. Here's what's shipped and what's coming next.
is type guards|> with _ placeholderasync fun* and yieldinfer and distributionsatisfies operatorFeature-complete compiler, formatter, linter, and REPL.
Install in one command and bring your whole ecosystem with you.