The console methods the sandbox installs on its console global.
Single source for three things that have to agree: the functions
buildConsole actually installs, the level a captured LogEntry can
carry, and the ambient console declaration that
scripts/generate-bim-globals.mjs emits into bim-globals.d.ts.
The sandbox global scope has exactly two members — bim and this console
— so the ambient declaration must be derived from this list rather than
borrowed from TypeScript's DOM lib: that would compile a template calling
console.table, document or fetch, none of which exist in QuickJS.
The console methods the sandbox installs on its
consoleglobal.Single source for three things that have to agree: the functions
buildConsoleactually installs, thelevela capturedLogEntrycan carry, and the ambientconsoledeclaration thatscripts/generate-bim-globals.mjsemits intobim-globals.d.ts.The sandbox global scope has exactly two members —
bimand thisconsole— so the ambient declaration must be derived from this list rather than borrowed from TypeScript'sDOMlib: that would compile a template callingconsole.table,documentorfetch, none of which exist in QuickJS.