The type of keys in the store.
The type of values in the store.
Runs a function within a new store context.
The function to run.
Optionaldefaults: Dictionary<K, V>The default values to initialize the store with.
The result of the function.
ExperimentalExits the current store context and runs a function. Marked experimental as it depends on AsyncLocalStorage#exit
The function to run.
The result of the function.
ExperimentalDisables the instance of ALS and its underlying AsyncLocalStorage instance. See AsyncLocalStorage#disable for implications. Marked experimental as it depends on AsyncLocalStorage#disable
ExperimentalBinds a function to the current store context. Marked experimental as it depends on AsyncLocalStorage.bind
The function to bind.
The bound function.
ExperimentalEnters a new store context with the given default values. Marked experimental as it depends on AsyncLocalStorage#enterWith
Optionaldefaults: Dictionary<K, V>The default values to initialize the store with.
The backbone of the Modern API, this class provides a modern implementation for managing key-value stores within asynchronous contexts. It leverages AsyncLocalStorage to create, retrieve, and manipulate context-specific data.