/** * LoadingGate — One-shot initialization barrier. * * Ensures an async init function runs exactly once, even if multiple * callers race to trigger it. All callers receive the same result. * * Usage: * const gate = new LoadingGate(); * // In any code path that needs init to be done: * await gate.ensure(async () => { ... expensive init ... }); */ export declare class LoadingGate { private _promise; private _resolved; private _value; /** Whether the gate has been opened (init completed successfully). */ get isReady(): boolean; /** * Run the init function if it hasn't been started yet. * If init is in progress, join the existing promise. * If init completed, return the cached result immediately. */ ensure(init: () => Promise): Promise; /** Reset the gate so init can run again. */ reset(): void; } //# sourceMappingURL=loading-gate.d.ts.map