/** * The `LockManager` is a singleton class designed to help wait for required async * promised operations to complete * before the page is generated. It provides functionalities to create, delete, and wait * for the release of locks. * The locks are stored in a Map with a unique ID (either provided or auto-generated) as * the key. * The class provides an instance property to get the singleton instance of `LockManager`. */ declare class LockManager { private static _instance; private locks; /** * Private constructor to prevent direct instantiation from outside. * Initializes the locks Map. */ private constructor(); /** * Provides a way to access the single instance of the LockManager. * If it doesn't exist, it creates one. * @returns {LockManager} The single instance of LockManager. */ static get instance(): LockManager; /** * Creates a new lock. * @param {string} [id] - An optional ID to use for the lock. If not provided, a UUID will be generated. * @returns {string} The ID of the created lock. */ createLock(id?: string): string; /** * Deletes a lock by its ID. * @param {string} lockId - The ID of the lock to be deleted. */ deleteLock(lockId: string): void; /** * Deletes all locks, clearing the locks Map. */ deleteAllLocks(): void; /** * Waits until all locks are released and then resolves. * @returns {Promise} A promise that resolves when all locks are released. */ waitForLockRelease(): Promise; } export declare const instance: LockManager; export {}; //# sourceMappingURL=LockManager.d.ts.map