Globals (Vael & console)
Both vjs (V8) and vjs-lite (QuickJS) install only two ambient globals — Vael and console — with no browser or legacy host globals.
globalThis.Vael & globalThis.console
v8/globals.d.ts and lite/globals.d.tsAmbient Declarations
Section titled “Ambient Declarations”console
Section titled “console”declare const console: VaelConsole;
Global console output object installed by vjs (vaeljs, V8).
declare const Vael: VaelGlobal;
Frozen VaelJS runtime introspection object (engine: "vael").
Interfaces
Section titled “Interfaces”VaelConsole
Section titled “VaelConsole”interface VaelConsole {
log(...args: unknown[]): void;
debug(...args: unknown[]): void;
info(...args: unknown[]): void;
warn(...args: unknown[]): void;
error(...args: unknown[]): void;
}
Standard console output methods installed on globalThis.console in the
vjs (vaeljs, V8) runtime.
log, debug, and info write to stdout; warn and error write to
stderr. Strings print unchanged, typed arrays print their type and up to
ten elements, and objects are formatted as indented JSON when serializable.
VaelConsole.log
Section titled “VaelConsole.log”log(...args: unknown[]): void;
Write formatted arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidconsole.log("hello", { ok: true });VaelConsole.debug
Section titled “VaelConsole.debug”debug(...args: unknown[]): void;
Write formatted debug arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidVaelConsole.info
Section titled “VaelConsole.info”info(...args: unknown[]): void;
Write formatted informational arguments separated by spaces to stdout, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stdout. |
voidVaelConsole.warn
Section titled “VaelConsole.warn”warn(...args: unknown[]): void;
Write formatted warning arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidVaelConsole.error
Section titled “VaelConsole.error”error(...args: unknown[]): void;
Write formatted error arguments separated by spaces to stderr, followed by a newline.
| Name | Type | Description |
|---|---|---|
...args | unknown[] | Values to format and write to stderr. |
voidconsole.error("operation failed:", new Error("timeout"));VaelBuiltInModuleMap
Section titled “VaelBuiltInModuleMap”interface VaelBuiltInModuleMap {
"vael:age": typeof import("vael:age");
"vael:amqp": typeof import("vael:amqp");
"vael:ansi": typeof import("vael:ansi");
"vael:archive": typeof import("vael:archive");
"vael:assert": typeof import("vael:assert")["default"];
"vael:chars": typeof import("vael:chars");
"vael:console": typeof import("vael:console")["default"];
"vael:cron": typeof import("vael:cron");
"vael:crypto": typeof import("vael:crypto");
"vael:db": typeof import("vael:db");
"vael:db/migrate": typeof import("vael:db/migrate");
"vael:exec": typeof import("vael:exec");
"vael:fetch": typeof import("vael:fetch");
"vael:fmt": typeof import("vael:fmt");
"vael:fmt/bytes": typeof import("vael:fmt/bytes");
"vael:fmt/duration": typeof import("vael:fmt/duration");
"vael:fmt/inspect": typeof import("vael:fmt/inspect");
"vael:fmt/printf": typeof import("vael:fmt/printf");
"vael:fmt/strip-ansi-code": typeof import("vael:fmt/strip-ansi-code");
"vael:fs": typeof import("vael:fs");
"vael:fs/acl": typeof import("vael:fs/acl");
"vael:http": typeof import("vael:http");
"vael:nats": typeof import("vael:nats");
"vael:os": typeof import("vael:os");
"vael:os/dirs": typeof import("vael:os/dirs");
"vael:path": typeof import("vael:path");
"vael:redis": typeof import("vael:redis");
"vael:slices": typeof import("vael:slices");
"vael:ssh": typeof import("vael:ssh");
"vael:stdio": typeof import("vael:stdio");
"vael:strings": typeof import("vael:strings");
"vael:template": Omit<typeof import("vael:template"), "default">;
"vael:test": Omit<typeof import("vael:test"), "default">;
"vael:uuid": typeof import("vael:uuid");
"vael:uuid/v4": typeof import("vael:uuid/v4");
"vael:uuid/v7": typeof import("vael:uuid/v7");
}
Mapping from canonical vael:* built-in module specifiers available in the
vjs (vaeljs, V8) profile to the object returned by Vael.getBuiltInModule.
| Specifier | Returned Value Type | Availability |
|---|---|---|
vael:age | typeof import("vael:age") | vjs only |
vael:amqp | typeof import("vael:amqp") | vjs only |
vael:ansi | typeof import("vael:ansi") | vjs & vjs-lite |
vael:archive | typeof import("vael:archive") | vjs & vjs-lite |
vael:assert | typeof import("vael:assert")["default"] | vjs & vjs-lite |
vael:chars | typeof import("vael:chars") | vjs & vjs-lite |
vael:console | typeof import("vael:console")["default"] | vjs & vjs-lite |
vael:cron | typeof import("vael:cron") | vjs only |
vael:crypto | typeof import("vael:crypto") | vjs & vjs-lite |
vael:db | typeof import("vael:db") | vjs only |
vael:db/migrate | typeof import("vael:db/migrate") | vjs only |
vael:exec | typeof import("vael:exec") | vjs & vjs-lite |
vael:fetch | typeof import("vael:fetch") | vjs & vjs-lite |
vael:fmt | typeof import("vael:fmt") | vjs & vjs-lite |
vael:fmt/bytes | typeof import("vael:fmt/bytes") | vjs & vjs-lite |
vael:fmt/duration | typeof import("vael:fmt/duration") | vjs & vjs-lite |
vael:fmt/inspect | typeof import("vael:fmt/inspect") | vjs & vjs-lite |
vael:fmt/printf | typeof import("vael:fmt/printf") | vjs & vjs-lite |
vael:fmt/strip-ansi-code | typeof import("vael:fmt/strip-ansi-code") | vjs & vjs-lite |
vael:fs | typeof import("vael:fs") | vjs & vjs-lite |
vael:fs/acl | typeof import("vael:fs/acl") | vjs & vjs-lite |
vael:http | typeof import("vael:http") | vjs only |
vael:nats | typeof import("vael:nats") | vjs only |
vael:os | typeof import("vael:os") | vjs & vjs-lite |
vael:os/dirs | typeof import("vael:os/dirs") | vjs & vjs-lite |
vael:path | typeof import("vael:path") | vjs & vjs-lite |
vael:redis | typeof import("vael:redis") | vjs only |
vael:slices | typeof import("vael:slices") | vjs & vjs-lite |
vael:ssh | typeof import("vael:ssh") | vjs & vjs-lite |
vael:stdio | typeof import("vael:stdio") | vjs only |
vael:strings | typeof import("vael:strings") | vjs & vjs-lite |
vael:template | Omit<typeof import("vael:template"), "default"> | vjs & vjs-lite |
vael:test | Omit<typeof import("vael:test"), "default"> | vjs & vjs-lite |
vael:uuid | typeof import("vael:uuid") | vjs & vjs-lite |
vael:uuid/v4 | typeof import("vael:uuid/v4") | vjs & vjs-lite |
vael:uuid/v7 | typeof import("vael:uuid/v7") | vjs & vjs-lite |
VaelGlobal
Section titled “VaelGlobal”interface VaelGlobal {
readonly engine: "vael";
getBuiltInModule<K extends keyof VaelBuiltInModuleMap>(specifier: K): VaelBuiltInModuleMap[K];
getBuiltInModule(specifier: string): unknown;
getBuiltInModulesList(): readonly string[];
}
Frozen introspection global installed on globalThis.Vael in the vjs
(vaeljs, V8) runtime.
| Property | Type | Description | Since |
|---|---|---|---|
engine readonly | "vael" | Active runtime engine identifier ("vael" for V8). | v0.0.0-alpha.0 |
VaelGlobal.getBuiltInModule
Section titled “VaelGlobal.getBuiltInModule”getBuiltInModule<K extends keyof VaelBuiltInModuleMap>(specifier: K): VaelBuiltInModuleMap[K];
getBuiltInModule(specifier: string): unknown;
Return the cached built-in module object for a canonical vael:* specifier,
or undefined when the specifier is not registered.
| Name | Type | Description |
|---|---|---|
specifier | K | string | Canonical vael:* built-in module specifier; Module specifier string to look up. |
VaelBuiltInModuleMap[K]— The cached built-in module object forspecifier.unknown— The cached built-in module object, orundefinedif unknown.
TypeError— whenspecifieris not a string.
const os = Vael.getBuiltInModule("vael:os");console.log(os.platform);VaelGlobal.getBuiltInModulesList
Section titled “VaelGlobal.getBuiltInModulesList”getBuiltInModulesList(): readonly string[];
Return the frozen array of canonical vael:* specifiers enabled in this
runtime, in registration order.
readonly string[] — Frozen array of registered vael:* module specifiers.const modules = Vael.getBuiltInModulesList();console.log(modules.includes("vael:fs"));