Page Contents

Home > @loopback/context > invokeInterceptors

invokeInterceptors() function

Invoke a chain of interceptors with the context

Signature:

export declare function invokeInterceptors<C extends Context = Context, T = InvocationResult>(context: C, interceptors: GenericInterceptorOrKey<C>[]): ValueOrPromise<T | undefined>;

Parameters

Parameter Type Description
context C Context object
interceptors GenericInterceptorOrKey<C>[] An array of interceptor functions or binding keys

Returns:

ValueOrPromise<T | undefined>