TypeScript roots, modern language ergonomics

VexaScript

VexaScript programming language is a non-strict TypeScript superset. Human and AI friendly: easier to read for humans; less tokens for AI.

Consume javascript and typescript libraries directly, adds concise declarations, function and operator overloading, delegated variables and classes, trailing lambdas, await-less asynchronous code, new-less instantiation, optional this, int and long types and plenty of quick fixes among other features.

hello.vx
class User(val name: string, val score: int)

sync fun loadMessage(user: User): string {
  let bonus = fetchBonus(user.name)
  return `Hello ${user.name}, score: ${user.score + bonus}`
}

Syntax tour

Readable syntax for application code.

The full supported syntax reference lives on its own page and is rendered directly from the canonical documentation file of the language.

Concise declarations

Use fun or function, val for read-only values, and primary-constructor class members. Operator overloading and shorthand functions and properties.

class Point(val x: number, val y: number) {
  operator+() { return this }
  operator-() => Point(-x, -y)
  operator+(other: Point) => Point(x + other.x, y + other.y)
  operator-(other: Point) => Point(x - other.x, y - other.y)
  operator*(scale: number) => Point(x * scale, y * scale)
  length => Math.hypot(x, y)
}
val point = -Point(1, 2) + Point(3, 4) * 2

Null-aware access

Optional chaining, non-null assertions, and type analysis help make nullable flows explicit.

let city = user.address?.city ?? "Unknown"
let name = maybeUser!.name

Sync async style

sync await-less functions automatically await produced promises, while go avoids awaiting for manual orchestration.

declare class Fetch { arrayBuffer(): Promise<ArrayBuffer> }
declare fun fetch(str: string): Promise<Fetch>

sync fun loadBytes(): Uint8Array {
  return Uint8Array(fetch('file.bin').arrayBuffer())
}

Examples

Patterns that teach the language.

Operator overloading

Operator and method overloading and new-less constructions, for concise writing.

class Vec2(val x: number, val y: number) {
  operator+(other: Vec2) => Vec2(x + other.x, y + other.y)
  operator-(other: Vec2) => Vec2(x - other.x, y - other.y)
}
Vec2(1, 2) + Vec2(3, 4)

JSX with Preact

Destructuring with types to avoid duplication while being concise.

import { h } from "preact"

fun Welcome({ name: string }) {
  return <section>Hello {name}</section>
}

Implicit property access

When no ambiguity happens, this is optional.

class Counter(var value: int) {
  fun increment(): int => ++value
}

VexaScript CLI

Compile, bundle, run, inspect, and format from the terminal.

The CLI guide lives on its own page, with the core commands, supported switches, and copy-ready examples for compiler, syntax, and test workflows.

Blog

Follow release news and project updates.

Read launch announcements, milestone notes, and ecosystem updates from the VexaScript team.

Embedding API

Bring the editors into your own site.

The full embedding guide now lives on its own page with copy-ready setup snippets for both editor modes.