UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

81 lines (41 loc) 1.44 kB
--- lang: en title: 'API docs: context.invokeinterceptors' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context permalink: /doc/en/lb4/apidocs.context.invokeinterceptors.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [invokeInterceptors](./context.invokeinterceptors.md) ## invokeInterceptors() function Invoke a chain of interceptors with the context **Signature:** ```typescript export declare function invokeInterceptors<C extends Context = Context, T = InvocationResult>(context: C, interceptors: GenericInterceptorOrKey<C>[]): ValueOrPromise<T | undefined>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> context </td><td markdown="1"> C </td><td markdown="1"> Context object </td></tr> <tr><td markdown="1"> interceptors </td><td markdown="1"> [GenericInterceptorOrKey](./context.genericinterceptororkey.md)<!-- -->&lt;C&gt;\[\] </td><td markdown="1"> An array of interceptor functions or binding keys </td></tr> </tbody></table> **Returns:** [ValueOrPromise](./context.valueorpromise.md)<!-- -->&lt;T \| undefined&gt;