nestjs-cls
Version:
A continuation-local storage module compatible with NestJS's dependency injection.
21 lines • 858 B
TypeScript
import { OnModuleInit } from '@nestjs/common';
import { DiscoveryService } from '@nestjs/core';
import { ClsInitContext } from './cls-plugin.interface';
/**
* This class gathers all the plugin hooks registered in the DI
* and makes them available to the CLS-initializers (Cls-Middleware, -Guard, -Interceptor)
* via a singleton instance.
*/
export declare class ClsPluginsHooksHost implements OnModuleInit {
private readonly discoveryService;
private beforeSetupHooks;
private afterSetupHooks;
private readonly cls;
private static _instance;
static getInstance(): ClsPluginsHooksHost;
constructor(discoveryService: DiscoveryService);
onModuleInit(): void;
beforeSetup(context: ClsInitContext): Promise<void>;
afterSetup(context: ClsInitContext): Promise<void>;
}
//# sourceMappingURL=cls-plugin-hooks-host.d.ts.map