UNPKG

@loopback/docs

Version:

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

65 lines (34 loc) 1.2 kB
--- lang: en title: 'API docs: core.aslifecycleobserver' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core permalink: /doc/en/lb4/apidocs.core.aslifecycleobserver.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [asLifeCycleObserver](./core.aslifecycleobserver.md) ## asLifeCycleObserver() function A `BindingTemplate` function to configure the binding as life cycle observer by tagging it with `CoreTags.LIFE_CYCLE_OBSERVER`<!-- -->. **Signature:** ```typescript export declare function asLifeCycleObserver<T = unknown>(binding: Binding<T>): Binding<T>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> binding </td><td markdown="1"> [Binding](./context.binding.md)<!-- -->&lt;T&gt; </td><td markdown="1"> Binding object </td></tr> </tbody></table> **Returns:** [Binding](./context.binding.md)<!-- -->&lt;T&gt;