@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
33 lines (22 loc) • 1.35 kB
Markdown
lang: en
title: 'API docs: context.genericinterceptorchain._constructor__1'
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.genericinterceptorchain._constructor__1.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [GenericInterceptorChain](./context.genericinterceptorchain.md) > [(constructor)](./context.genericinterceptorchain._constructor__1.md)
## GenericInterceptorChain.(constructor)
Create an invocation interceptor chain with a binding filter and comparator. The interceptors are discovered from the context using the binding filter and sorted by the comparator (if provided).
<b>Signature:</b>
```typescript
constructor(context: C, filter: BindingFilter, comparator?: BindingComparator);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| context | C | Context object |
| filter | [BindingFilter](./context.bindingfilter.md) | A binding filter function to select interceptors |
| comparator | [BindingComparator](./context.bindingcomparator.md) | An optional comparator to sort matched interceptor bindings |