---
lang: en
title: 'API docs: core.filterbyserviceinterface'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.filterbyserviceinterface.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [filterByServiceInterface](./core.filterbyserviceinterface.md)

## filterByServiceInterface() function

Create a binding filter by service class

<b>Signature:</b>

```typescript
export declare function filterByServiceInterface(serviceInterface: ServiceInterface): BindingFilter;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  serviceInterface | [ServiceInterface](./core.serviceinterface.md) | Service class matching the one used by <code>binding.toClass()</code> |

<b>Returns:</b>

[BindingFilter](./context.bindingfilter.md)


