/// import EventEmitter from "node:events"; /** * This is effectively a Promise that can be resolved multiple times in different scopes without messily holding references to the resolve function. */ export declare class AsyncWorkTracker extends EventEmitter { private state; private lastResult; /** * If work is still pending, this waits for the next work result. If work is already resolved, it returns the last result. */ waitForResult(): Promise; /** * Call this when you start async work. */ beginAsyncWork(): void; /** * Call this when the async work is done with the result. */ finishAsyncWork(result: Result): void; }