/// import { AsyncLocalStorage } from "async_hooks"; type Store = Map; type RunCallback = () => void; interface AsyncStoreInterface { run(callback: RunCallback): void; exists(): boolean; set(key: string, value: T): void; get(key: string): T | undefined; has(key: string): boolean; } export default class AsyncStore implements AsyncStoreInterface { _asyncLocalStorage: AsyncLocalStorage; constructor(); /** * Run the provided method with an async store context */ run(callback: RunCallback): void; /** * Returns true if an async store exists * for the current asynchronous context */ exists(): boolean; /** * Sets a value in the current async store */ set(key: string, value: T): void; /** * Gets a value from the current async store */ get(key: string): T | undefined; /** * Checks if a value exists in the current async store */ has(key: string): boolean; private _getStore; } export {};