CheckContext
interfaceWhat a check body gets to inspect the half-built mod with. Deliberately narrow. A check reads what the host registered and asserts on it. It cannot run actions, open UI, or change state, because it runs while the generation is still provisional.
Import
import { CheckContext } from '@modular/sdk';Members4
- assert()
(condition: boolean, message: string) => voidFails the check with `message` when `condition` is false.
- describeAction()
(id: HostActionId) => ModularActionDescriptorDto | undefinedOne action's descriptor, or `undefined` when nothing is registered under `id`.
- listActions()
() => readonly ModularActionDescriptorDto[]Every action the host currently offers, this mod's included.
- state()
<TValue>(declaration: StateDeclaration<TValue>) => State<TValue> | <TName extends BuiltInStateName>(name: TName) => State<BuiltInStateValue<TName>>Read a declared or built-in state value.