UNPKG

@loopback/docs

Version:

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

26 lines (17 loc) 989 B
--- lang: en title: 'API docs: context.contextobserverfn' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context permalink: /doc/en/lb4/apidocs.context.contextobserverfn.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextObserverFn](./context.contextobserverfn.md) ## ContextObserverFn type Listen on `bind`<!-- -->, `unbind`<!-- -->, or other events <b>Signature:</b> ```typescript export declare type ContextObserverFn = (eventType: ContextEventType, binding: Readonly<Binding<unknown>>, context: Context) => ValueOrPromise<void>; ``` <b>References:</b> [ContextEventType](./context.contexteventtype.md)<!-- -->, [Binding](./context.binding.md)<!-- -->, [Context](./context.context.md)<!-- -->, [ValueOrPromise](./context.valueorpromise.md)