@bluelibs/runner - v5.5.0
    Preparing search index...

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

    interface ITask<
        TInput = any,
        TOutput extends Promise<unknown> = Promise<unknown>,
        TDependencies extends DependencyMapType = {},
        TMeta extends ITaskMeta = any,
        TTags extends TagType[] = TagType[],
        TMiddleware extends
            TaskMiddlewareAttachmentType[] = TaskMiddlewareAttachmentType[],
    > {
        "[symbolFilePath]": string;
        "[symbolPhantomTask]"?: true;
        "[symbolTask]": true;
        "[symbolTunneledBy]"?: string;
        computedDependencies?: DependencyValuesType<TDependencies>;
        dependencies: TDependencies | (() => TDependencies);
        id: string;
        inputSchema?: IValidationSchema<TInput>;
        isTunneled?: boolean;
        meta?: TMeta;
        middleware: TMiddleware;
        optional: () => IOptionalDependency<
            ITask<TInput, TOutput, TDependencies, TMeta, TTags, TMiddleware>,
        >;
        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?: { journal: ExecutionJournal },
        ) => HasOutputContracts<[...TTags[], ...TMiddleware[]]> extends true
            ? EnsureOutputSatisfiesContracts<
                [...TTags[], ...TMiddleware[]],
                TOutput,
            >
            : TOutput;
        tags: TTags;
        throws?: readonly string[];
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    "[symbolFilePath]": string
    "[symbolPhantomTask]"?: true

    Present only for phantom tasks.

    "[symbolTask]": true
    "[symbolTunneledBy]"?: string

    Records which tunnel resource owns the task (exclusivity).

    computedDependencies?: DependencyValuesType<TDependencies>
    dependencies: TDependencies | (() => TDependencies)

    Access other tasks/resources/events. Can be an object or a function when you need late or config‑dependent resolution.

    id: string
    inputSchema?: IValidationSchema<TInput>

    Optional validation schema for runtime input validation. When provided, task input will be validated before execution.

    isTunneled?: boolean

    Indicates if the task is tunneled through a tunnel client.

    meta?: TMeta

    Optional metadata used for docs, filtering and tooling.

    middleware: TMiddleware

    Middleware applied around task execution.

    Return an optional dependency wrapper for this task.

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

    Optional validation schema for the task result. When provided, the result will be validated immediately after the task's run resolves, without considering middleware.

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

    Tags applied to the task that might define its behvaiour or impact the systems.

    throws?: readonly string[]

    Normalized list of error ids declared via throws.