export declare class StaleWaiterError extends Error { constructor(); } export declare const processNext: () => void; export declare const waitForTurn: ({ getPriority, fn, onDone, onError, }: { getPriority: () => number | null; fn: () => Promise; onDone: (result: T, triggerNext: () => void) => void; onError: (err: unknown) => void; }) => void;