Skip to main content

Class: TsRestHandlerInterceptor

@ts-rest/nest.TsRestHandlerInterceptor

Implements

  • NestInterceptor

Constructors

constructor

new TsRestHandlerInterceptor(reflector, globalOptions)

Parameters

NameType
reflectorReflector
globalOptionsMaybeTsRestOptions

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:219

Properties

globalOptions

Private globalOptions: MaybeTsRestOptions

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:223


reflector

Private reflector: Reflector

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:220

Methods

getAppRouteFromContext

Private getAppRouteFromContext(ctx): { appRoute: AppRoute ; routeAlias: undefined = undefined; routeKey?: undefined } | { appRoute: AppRoute ; routeAlias?: undefined = undefined; routeKey: string }

Parameters

NameType
ctxExecutionContext

Returns

{ appRoute: AppRoute ; routeAlias: undefined = undefined; routeKey?: undefined } | { appRoute: AppRoute ; routeAlias?: undefined = undefined; routeKey: string }

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:226


intercept

intercept(ctx, next): Observable<any>

Parameters

NameType
ctxExecutionContext
nextCallHandler<any>

Returns

Observable<any>

Implementation of

NestInterceptor.intercept

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:272