UNPKG

@altostra/core

Version:

Core library for shared types and logic

13 lines (12 loc) 418 B
/** * Allow running async operation sequentially */ export declare class Synchronizer { #private; /** * Queue an action to run after all previous actions have finished * @param action The action to queue to run after all previous actions have finished * @returns A promise to the result (or rejection) of the executed action */ synchronize<T>(action: () => Promise<T>): Promise<T>; }