Skip to content
Docs
Errors

global_unavailable

A module uses a global that disko-js does not have, such as Math or Date.

A module uses a global that disko-js does not have, such as Math or Date.

KindBuild or validation problem
Reported byArchive and source validation
disko exit code1 (problems)

A module uses a global that disko-js, the language disko games run in, does not have. Games run the same on every computer, so disko-js leaves out what would differ between them:

  • Math: import the functions from disko:math instead.

  • Date and performance: count time in ticks, from the tick event.

  • eval and Function: disko-js never runs code made from text.

  • WeakRef and FinalizationRegistry, SharedArrayBuffer and Atomics.

  • Anything from browsers or Node.js, such as console, setTimeout or document.

Wrong

src/rules.ts
src/rules.ts

See also