@nestjs/websockets
Version:
Nest - modern, fast, powerful node.js web framework (@websockets)
40 lines (39 loc) • 2.89 kB
TypeScript
import type { ArgumentMetadata, ContextType, PipeTransform } from '@nestjs/common';
import { type Controller } from '@nestjs/common/internal';
import { type ExecutionContextHost, type GuardsConsumer, type GuardsContextCreator, type InterceptorsConsumer, type InterceptorsContextCreator, type ParamProperties, type ParamsMetadata, type PipesConsumer, type PipesContextCreator } from '@nestjs/core/internal';
import { WsParamsFactory } from '../factories/ws-params-factory.js';
import { ExceptionFiltersContext } from './exception-filters-context.js';
import { WsProxy } from './ws-proxy.js';
type WsParamProperties = ParamProperties & {
metatype?: any;
};
export interface WsHandlerMetadata {
argsLength: number;
paramtypes: any[];
getParamsMetadata: (moduleKey: string) => WsParamProperties[];
}
export declare class WsContextCreator {
private readonly wsProxy;
private readonly exceptionFiltersContext;
private readonly pipesContextCreator;
private readonly pipesConsumer;
private readonly guardsContextCreator;
private readonly guardsConsumer;
private readonly interceptorsContextCreator;
private readonly interceptorsConsumer;
private readonly contextUtils;
private readonly wsParamsFactory;
private readonly handlerMetadataStorage;
constructor(wsProxy: WsProxy, exceptionFiltersContext: ExceptionFiltersContext, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer);
create<T extends ParamsMetadata = ParamsMetadata>(instance: Controller, callback: (...args: unknown[]) => void, moduleKey: string, methodName: string, contextId?: import("@nestjs/core").ContextId, inquirerId?: string): (...args: any[]) => Promise<void>;
reflectCallbackParamtypes(instance: Controller, callback: (...args: any[]) => any): any[];
reflectCallbackPattern(callback: (...args: any[]) => any): string;
createGuardsFn<TContext extends string = ContextType>(guards: any[], instance: Controller, callback: (...args: unknown[]) => any, contextType?: TContext): Function | null;
getMetadata<TMetadata, TContext extends ContextType = ContextType>(instance: Controller, methodName: string, contextType: TContext): WsHandlerMetadata;
exchangeKeysForValues<TMetadata = any>(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: WsParamsFactory, contextFactory: (args: unknown[]) => ExecutionContextHost): ParamProperties[];
createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & {
metatype?: unknown;
})[]): ((args: unknown[], ...params: unknown[]) => Promise<void>) | null;
getParamValue<T>(value: T, metadata: ArgumentMetadata, pipes: PipeTransform[]): Promise<any>;
}
export {};