@bluelibs/runner - v6.3.1
    Preparing search index...

    Interface ITask<TInput, TOutput, TDependencies, TMeta, TTags, TMiddleware>

    Normalized runtime task definition.

    interface ITask<
        TInput = any,
        TOutput extends Promise<unknown> = Promise<unknown>,
        TDependencies extends DependencyMapType = {},
        TMeta extends ITaskMeta = any,
        TTags extends TaskTagType[] = TaskTagType[],
        TMiddleware extends
            TaskMiddlewareAttachmentType[] = TaskMiddlewareAttachmentType[],
    > {
        "[symbolFilePath]": string;
        "[symbolRpcLanePolicy]"?: IRpcLanePolicy;
        "[symbolRpcLaneRoutedBy]"?: string;
        "[symbolTask]": true;
        computedDependencies?: DependencyValuesType<TDependencies>;
        dependencies: TDependencies | (() => TDependencies);
        id: string;
        inputSchema?: IValidationSchema<TInput>;
        isRpcRouted?: boolean;
        meta?: TMeta;
        middleware: TMiddleware;
        optional: () => IOptionalDependency<
            ITask<TInput, TOutput, TDependencies, TMeta, TTags, TMiddleware>,
        >;
        path?: string;
        resultSchema?: IValidationSchema<TOutput extends Promise<U> ? U : never>;
        run: (
            input: HasInputContracts<[...TTags[], ...TMiddleware[]]> extends true
                ? [TInput] extends [undefined]
                    ? InferInputOrViolationFromContracts<[...TTags[], ...TMiddleware[]]>
                    : EnsureInputSatisfiesContracts<[...TTags[], ...TMiddleware[]], TInput>
                : TInput,
            dependencies: DependencyValuesType<TDependencies>,
            context?: TaskRunContext,
        ) => HasOutputContracts<[...TTags[], ...TMiddleware[]]> extends true
            ? EnsureOutputSatisfiesContracts<
                [...TTags[], ...TMiddleware[]],
                TOutput,
            >
            : TOutput;
        tags: TTags;
        throws?: NormalizedThrowsList;
    }

    Type Parameters

    Hierarchy

    Index

    Properties

    "[symbolFilePath]": string

    Source file where the task was defined.

    "[symbolRpcLanePolicy]"?: IRpcLanePolicy

    Stores lane policy used for caller-side middleware filtering.

    "[symbolRpcLaneRoutedBy]"?: string

    Records which rpc-lanes resource owns the task routing patch (exclusivity).

    "[symbolTask]": true

    Brand marker used by runtime checks and tooling.

    computedDependencies?: DependencyValuesType<TDependencies>

    Resolved dependency values cached by the runtime when needed.

    dependencies: TDependencies | (() => TDependencies)

    Normalized dependency declaration.

    id: string

    Stable task identifier within its owner subtree.

    inputSchema?: IValidationSchema<TInput>

    Normalized input validation schema.

    isRpcRouted?: boolean

    Indicates if the task was patched for remote execution through rpc lanes.

    meta?: TMeta

    Optional metadata used for docs, filtering and tooling.

    middleware: TMiddleware

    Middleware attachments applied around task execution.

    Return an optional dependency wrapper for this task.

    path?: string
    resultSchema?: IValidationSchema<TOutput extends Promise<U> ? U : never>

    Normalized result validation schema.

    run: (
        input: HasInputContracts<[...TTags[], ...TMiddleware[]]> extends true
            ? [TInput] extends [undefined]
                ? InferInputOrViolationFromContracts<[...TTags[], ...TMiddleware[]]>
                : EnsureInputSatisfiesContracts<[...TTags[], ...TMiddleware[]], TInput>
            : TInput,
        dependencies: DependencyValuesType<TDependencies>,
        context?: TaskRunContext,
    ) => HasOutputContracts<[...TTags[], ...TMiddleware[]]> extends true
        ? EnsureOutputSatisfiesContracts<
            [...TTags[], ...TMiddleware[]],
            TOutput,
        >
        : TOutput

    Task implementation body.

    Runner validates input before this runs and validates the result immediately after it resolves when schemas are configured.

    tags: TTags

    Normalized tags attached to the task.

    Normalized list of error ids declared via throws.