Task
interfaceA declared background task: a trigger the host evaluates durably, and a body that runs when it fires. Built with task and listed in `defineMod`'s `tasks` slot.
Import
import { Task } from '@modular/sdk';Members6
- id
stringIdentifier, unique within the mod.
- kind
'task'- run
TaskHandler<TPayload>- titleoptional
stringLabel shown where the host lists scheduled work.
- trigger
TaskTriggerDtoThe compiled trigger plan the host schedules.
- whenoptional
(payload: TPayload) => booleanOptional filter over the event payload, evaluated in the extension host before the body runs. A firing the filter declines does not consume the task's `once` slot.