---
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/strongloop/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) &gt; [@loopback/context](./context.md) &gt; [GenericInterceptorChain](./context.genericinterceptorchain.md) &gt; [(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 |


