@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
34 lines (23 loc) • 1.34 kB
Markdown
lang: en
title: 'API docs: context.contextview._constructor_'
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.contextview._constructor_.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ContextView](./context.contextview.md) > [(constructor)](./context.contextview._constructor_.md)
## ContextView.(constructor)
Create a context view
<b>Signature:</b>
```typescript
constructor(context: Context, filter: BindingFilter, comparator?: BindingComparator | undefined, resolutionOptions?: Omit<ResolutionOptions, "session"> | undefined);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| context | [Context](./context.context.md) | Context object to watch |
| filter | [BindingFilter](./context.bindingfilter.md) | Binding filter to match bindings of interest |
| comparator | [BindingComparator](./context.bindingcomparator.md) \| undefined | Comparator to sort the matched bindings |
| resolutionOptions | Omit<[ResolutionOptions](./context.resolutionoptions.md)<!-- -->, "session"> \| undefined | |