Skip to main content
AsyncLocalStorage.prototype.getStore - async_hooks - Node documentation
method AsyncLocalStorage.prototype.getStore

Usage in Deno

import { AsyncLocalStorage } from "node:async_hooks";
AsyncLocalStorage.prototype.getStore(): T | undefined

Returns the current store. If called outside of an asynchronous context initialized by calling asyncLocalStorage.run() or asyncLocalStorage.enterWith(), it returns undefined.

Return Type

T | undefined