The type of keys used in the context.
The type of values stored in the context.
Included for backwards compatibility. Use Namespace#getStore.
Retrieves the current store.
The current store or undefined if there is no store.
Binds a function to a given context. Errors thrown by the bound function will have their context attached on [ERROR_SYMBOL].
The function to bind.
Optional
context: Dictionary<K, V>The context to bind to.
The bound function.
Binds an EventEmitter to the current context.
NOTE: This method will throw if the optional dependency emitter-listener is not installed.
The EventEmitter to bind.
The backbone of the Legacy API, this class represents an object with the same interface as the namespace objects in cls-hooked, including getting/setting values and running functions in the context of the associated store.
Example