UNPKG

@loopback/docs

Version:
35 lines (22 loc) 863 B
--- lang: en title: 'API docs: context.contextview.observe' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.contextview.observe.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextView](./context.contextview.md) &gt; [observe](./context.contextview.observe.md) ## ContextView.observe() method Listen on `bind` or `unbind` and invalidate the cache <b>Signature:</b> ```typescript observe(event: ContextEventType, binding: Readonly<Binding<unknown>>): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | event | <code>ContextEventType</code> | | | binding | <code>Readonly&lt;Binding&lt;unknown&gt;&gt;</code> | | <b>Returns:</b> `void`