AsyncLocalStorage.prototype.getStore - Node documentation
method AsyncLocalStorage.prototype.getStore

Usage

import { AsyncLocalStorage } from "node:async_hooks";

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