Class: TsRestHandlerInterceptor
@ts-rest/nest.TsRestHandlerInterceptor
Implements
NestInterceptor
Constructors
constructor
• new TsRestHandlerInterceptor(reflector
, globalOptions
)
Parameters
Name | Type |
---|---|
reflector | Reflector |
globalOptions | MaybeTsRestOptions |
Defined in
libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:295
Properties
globalOptions
• Private
globalOptions: MaybeTsRestOptions
Defined in
libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:299
reflector
• Private
reflector: Reflector
Defined in
libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:296
Methods
getAppRouteFromContext
▸ Private
getAppRouteFromContext(ctx
): TsRestAppRouteMetadata
We use metadata to store the route, and the key of the route in a router on a given method
Parameters
Name | Type |
---|---|
ctx | ExecutionContext |
Returns
TsRestAppRouteMetadata
Defined in
libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:305
intercept
▸ intercept(ctx
, next
): Observable
<any
>
Parameters
Name | Type |
---|---|
ctx | ExecutionContext |
next | CallHandler <any > |
Returns
Observable
<any
>
Implementation of
NestInterceptor.intercept
Defined in
libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:325