Skip to content

composeSequential

composeSequential(operations): Operation<unknown[]>

Defined in: packages/db/src/compose.ts:84

Runs multiple Operations sequentially and returns their results as an array.

This is a shorthand for the common compose pattern where operations are simply awaited in order with no data dependencies between them:

// Before: verbose
compose([op1, op2], async (run1, run2) => {
await run1({});
await run2({});
});
// After: concise
composeSequential([op1, op2]);

Operation<unknown>[]

The operations to run in order.

Operation<unknown[]>

A single Operation that runs all operations sequentially and returns their results.