• Version 3.2.7
  • Published
  • 5.52 kB
  • 1 dependency
  • MIT license


npm i @types/continuation-local-storage
yarn add @types/continuation-local-storage
pnpm add @types/continuation-local-storage


TypeScript definitions for continuation-local-storage



function createNamespace

createNamespace: (name: string) => Namespace;

    function destroyNamespace

    destroyNamespace: (name: string) => void;

      function getNamespace

      getNamespace: (name: string) => Namespace | undefined;

        function reset

        reset: () => void;


          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.


                                        To add a badge like this onejsDocs.io badgeto 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
                                        • 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>