Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WsContextCreator

Hierarchy

  • WsContextCreator

Index

Constructors

constructor

  • new WsContextCreator(wsProxy: WsProxy, exceptionFiltersContext: ExceptionFiltersContext, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer): WsContextCreator

Properties

Private Readonly contextUtils

contextUtils: ContextUtils = new ContextUtils()

Private Readonly exceptionFiltersContext

exceptionFiltersContext: ExceptionFiltersContext

Private Readonly guardsConsumer

guardsConsumer: GuardsConsumer

Private Readonly guardsContextCreator

guardsContextCreator: GuardsContextCreator

Private Readonly handlerMetadataStorage

handlerMetadataStorage: HandlerMetadataStorage<WsHandlerMetadata, any> = new HandlerMetadataStorage<WsHandlerMetadata>()

Private Readonly interceptorsConsumer

interceptorsConsumer: InterceptorsConsumer

Private Readonly interceptorsContextCreator

interceptorsContextCreator: InterceptorsContextCreator

Private Readonly pipesConsumer

pipesConsumer: PipesConsumer

Private Readonly pipesContextCreator

pipesContextCreator: PipesContextCreator

Private Readonly wsParamsFactory

wsParamsFactory: WsParamsFactory = new WsParamsFactory()

Private Readonly wsProxy

wsProxy: WsProxy

Methods

create

  • create<T>(instance: Controller, callback: (...args: unknown[]) => void, moduleKey: string, methodName: string): (...args: any[]) => Promise<void>
  • Type parameters

    Parameters

    • instance: Controller
    • callback: (...args: unknown[]) => void
        • (...args: unknown[]): void
        • Parameters

          • Rest ...args: unknown[]

          Returns void

    • moduleKey: string
    • methodName: string

    Returns (...args: any[]) => Promise<void>

      • (...args: any[]): Promise<void>
      • Parameters

        • Rest ...args: any[]

        Returns Promise<void>

createGuardsFn

  • createGuardsFn<TContext>(guards: any[], instance: Controller, callback: (...args: unknown[]) => any, contextType?: TContext): Function | null

createPipesFn

  • createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & { metatype?: unknown })[]): pipesFn

exchangeKeysForValues

  • exchangeKeysForValues<TMetadata>(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: WsParamsFactory, contextFactory: (args: unknown[]) => ExecutionContextHost): ParamProperties[]
  • Type parameters

    • TMetadata = any

    Parameters

    • keys: string[]
    • metadata: TMetadata
    • moduleContext: string
    • paramsFactory: WsParamsFactory
    • contextFactory: (args: unknown[]) => ExecutionContextHost
        • (args: unknown[]): ExecutionContextHost
        • Parameters

          • args: unknown[]

          Returns ExecutionContextHost

    Returns ParamProperties[]

getMetadata

getParamValue

  • getParamValue<T>(value: T, __namedParameters: { data: any; metatype: any; type: any }, pipes: PipeTransform[]): Promise<any>

reflectCallbackParamtypes

  • reflectCallbackParamtypes(instance: Controller, callback: (...args: any[]) => any): any[]

Generated using TypeDoc