UNPKG

@nestjs/core

Version:

The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.

18 lines (17 loc) • 1.33 kB
import { ContextId, InstanceWrapper } from '../injector/instance-wrapper.js'; import { type Controller } from '@nestjs/common/internal'; export declare abstract class ContextCreator { abstract createConcreteContext<T extends any[], R extends any[]>(metadata: T, contextId?: ContextId, inquirerId?: string): R; getGlobalMetadata?<T extends any[]>(contextId?: ContextId, inquirerId?: string): T; createContext<T extends unknown[] = any, R extends unknown[] = any>(instance: Controller, callback: (...args: any[]) => void, metadataKey: string, contextId?: ContextId, inquirerId?: string): R; reflectClassMetadata<T>(instance: Controller, metadataKey: string): T; reflectMethodMetadata<T>(callback: (...args: unknown[]) => unknown, metadataKey: string): T; /** * Returns the enhancer to run for one bound as a class: the instance that * the container holds for it. The class itself is used only when that * instance doesn't implement the method and the class has a static one of * that name, so a static method no longer takes the place of the instance. */ protected pickEnhancer<T extends object>(metatype: Function, instance: T | null | undefined, methodKey: keyof T): T | null; protected getContextId(contextId: ContextId, instanceWrapper: InstanceWrapper): ContextId; }