MutkaMutka
API ReferenceSandboxAuthoring

sandbox/authoring/defineModule

Reference — sandbox/authoring/defineModule in the Mutka module API.

sandbox/authoring/defineModule

Interfaces

InterfaceDescription
SandboxModuleDef-

Functions

FunctionDescription
defineModuleAuthor-facing helper. At runtime it returns its argument unchanged (so the built file is import-free once bundled); at the type level it infers the union of commands[].id literals and threads it into host.onCommand, so a typo'd or stale command id is a compile error. With no commands, ids stay string.

References

SandboxHostApi

Re-exports SandboxHostApi

On this page