---
lang: en
title: 'API docs: context.genericinterceptor'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.genericinterceptor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [GenericInterceptor](./context.genericinterceptor.md)

## GenericInterceptor type

An interceptor function to be invoked in a chain for the given context. It serves as the base interface for various types of interceptors, such as method invocation interceptor or request/response processing interceptor.

<b>Signature:</b>

```typescript
export declare type GenericInterceptor<C extends Context = Context> = (context: C, next: Next) => ValueOrPromise<InvocationResult>;
```

