The return type of the functions
Optional context type passed to each function
Resets the sequence (currently a no-op).
Returns a promise that resolves when all currently queued items complete.
A promise that resolves when the queue is empty
Adds a function to the sequence queue for sequential execution.
The function will be executed after all previously queued functions complete. Returns a promise that resolves with the function's result.
A promise that resolves with the function's result
Executes functions sequentially, one at a time, ensuring order of execution.
ResolveSeq maintains a queue of functions and executes them in order, waiting for each to complete before starting the next. This is useful when you need to ensure operations happen in a specific sequence, even when multiple operations are queued concurrently.
Example