UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

97 lines (48 loc) 1.51 kB
--- lang: en title: 'API docs: context.createviewgetter' 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.createviewgetter.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [createViewGetter](./context.createviewgetter.md) ## createViewGetter() function Create a context view as a getter with the given filter **Signature:** ```typescript export declare function createViewGetter<T = unknown>(ctx: Context, bindingFilter: BindingFilter, session?: ResolutionSession): Getter<T[]>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> ctx </td><td markdown="1"> [Context](./context.context.md) </td><td markdown="1"> Context object </td></tr> <tr><td markdown="1"> bindingFilter </td><td markdown="1"> [BindingFilter](./context.bindingfilter.md) </td><td markdown="1"> A function to match bindings </td></tr> <tr><td markdown="1"> session </td><td markdown="1"> [ResolutionSession](./context.resolutionsession.md) </td><td markdown="1"> _(Optional)_ Resolution session </td></tr> </tbody></table> **Returns:** Getter&lt;T\[\]&gt;