durable-execution - v0.32.0
    Preparing search index...

    Type Alias SequentialTasks<T>

    SequentialTasks: T extends readonly [] ? never : SequentialTasksHelper<T>

    Type constraint for sequential task execution where each task's output becomes the next task's input.

    This utility type ensures type safety in task pipelines by verifying that:

    • The sequence is not empty
    • Each task's output type matches the next task's input type
    • The overall pipeline type is valid

    Used internally by DurableExecutor.sequentialTasks to provide compile-time type checking for sequential task pipelines.

    Type Parameters

    // Valid sequential tasks
    const validSequence: SequentialTasks<[
    Task<{name: string}, {id: number, name: string}>,
    Task<{id: number, name: string}, {result: string}>
    ]> = [fetchUser, processUser]

    // Invalid: output/input types don't match
    const invalidSequence: SequentialTasks<[
    Task<{name: string}, {id: number}>,
    Task<{email: string}, {result: string}> // Error: needs {id: number}
    ]> = [fetchUser, processEmail] // TypeScript error