@types/continuation-local-storage
- Version 3.2.7
- Published
- 5.52 kB
- 1 dependency
- MIT license
Install
npm i @types/continuation-local-storage
yarn add @types/continuation-local-storage
pnpm add @types/continuation-local-storage
Overview
TypeScript definitions for continuation-local-storage
Index
Functions
function createNamespace
createNamespace: (name: string) => Namespace;
function destroyNamespace
destroyNamespace: (name: string) => void;
function getNamespace
getNamespace: (name: string) => Namespace | undefined;
function reset
reset: () => void;
Interfaces
interface Namespace
interface Namespace {}
property active
readonly active: Context;
property name
readonly name: string;
method bind
bind: <T = void>( callback: BindCallbackFn<T>, context?: Context) => BindCallbackFn<T>;
method bindEmitter
bindEmitter: (emitter: NodeJS.EventEmitter) => void;
method createContext
createContext: () => Context;
method enter
enter: (context: Context) => void;
method exit
exit: (context: Context) => void;
method get
get: <T>(key: string) => T | undefined;
method run
run: <T = void>(callback: RunCallbackFn<T>) => Context;
method runAndReturn
runAndReturn: <T>(callback: RunCallbackFn<T>) => T;
method set
set: <T>(key: string, value: T) => T;
Type Aliases
type BindCallbackFn
type BindCallbackFn<T> = (...args: any[]) => T;
type Context
type Context = { [key: string]: any;};
type RunCallbackFn
type RunCallbackFn<T> = (context: Context) => T;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/continuation-local-storage
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/continuation-local-storage)
- HTML<a href="https://www.jsdocs.io/package/@types/continuation-local-storage"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 951 ms. - Missing or incorrect documentation? Open an issue for this package.