Demo

class Main {
function main(): unit =
Builtins.println("Hello World!")
}

Optimized TypeScript

type Str = [number, string];
const _builtin_stringConcat = ([, a]: Str, [, b]: Str): Str => [1, a + b];
const __Builtins_println = ([, line]: Str): number => { console.log(line); return 0; };
const __Builtins_stringToInt = ([, v]: Str): number => parseInt(v, 10);
const __Builtins_intToString = (v: number): Str => [1, String(v)];
const __Builtins_panic = ([, v]: Str): number => { throw Error(v); };
const _builtin_free = (v: unknown): number => 0;
const GLOBAL_STRING_0: Str = [0, "Hello World!"];
function _Demo_Main_main(): number {
__Builtins_println(GLOBAL_STRING_0);
return 0;
}
_Demo_Main_main();

Program Standard Out

Hello World!