UNPKG

@loopback/docs

Version:

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

38 lines (25 loc) 1.19 kB
--- lang: en title: 'API docs: context.contextview.once_1' 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.once_1.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; [once](./context.contextview.once_1.md) ## ContextView.once() method The "unbind" event is emitted a new binding is removed from the view. <b>Signature:</b> ```typescript once(eventName: 'unbind', listener: <V>(event: ContextViewEvent<V> & { cachedValue?: V; }) => void): this; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | eventName | 'unbind' | The name of the event - always <code>unbind</code>. | | listener | &lt;V&gt;(event: [ContextViewEvent](./context.contextviewevent.md)<!-- -->&lt;V&gt; &amp; { cachedValue?: V; }) =&gt; void | The listener function to call when the event is emitted. | <b>Returns:</b> this