UNPKG

@nestdevx/database

Version:

Database module designed to work with mongodb for multi-tenant NestJS applications.

9 lines (8 loc) 342 B
import { AsyncLocalStorage } from 'async_hooks'; export interface Context { tenantId: string | null; tenantHostName?: string | null; } export declare const requestStorage: AsyncLocalStorage<Context>; export declare function runWithContext(ctx: Context, fn: () => void): void; export declare function currentTenantId(): string | null;