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:211

Properties

globalOptions

Private globalOptions: MaybeTsRestOptions

Defined in

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


reflector

Private reflector: Reflector

Defined in

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

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:218


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:264