Beignet API reference
    Preparing search index...

    Interface TaskDef<Name, Input, Ctx, Output>

    Operational task definition created by defineTask(...).

    interface TaskDef<
        Name extends string = string,
        Input extends StandardSchema = StandardSchema,
        Ctx = unknown,
        Output = unknown,
    > {
        description?: string;
        input: Input;
        kind: "task";
        name: Name;
        handle(
            args: TaskHandleArgs<TaskDef<Name, Input, Ctx, Output>, Ctx>,
        ): MaybePromise<Output>;
    }

    Type Parameters

    Index
    description?: string

    Optional human-readable description for docs and tooling.

    input: Input

    Standard Schema input validator.

    kind: "task"

    Discriminator for task definitions.

    name: Name

    Stable task name used by CLIs and operational runners.