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: string) => Promise<ModularActionDescriptorDto | null>One action's descriptor, or `null` when nothing is registered under `id`.
- listActions
() => Promise<readonly ModularActionDescriptorDto[]>Every action the host currently offers, this mod's included.
- state
<TValue>(declaration: StateDeclaration<TValue>) => State<TValue> | <TName extends 'editor.selection' | 'host.scope' | 'workbench.colorTheme' | 'workbench.layout' | 'workbench.windowState' | 'workspace.focusedEditorGroupTab'>(name: TName) => State<BuiltInStateValue<TName>>Read a declared or built-in state value.
Notes
- category
- Authoring