UNPKG

@loopback/docs

Version:
34 lines (21 loc) 864 B
--- lang: en title: 'API docs: core.aslifecycleobserver' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar 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`<!-- -->. <b>Signature:</b> ```typescript export declare function asLifeCycleObserver<T = unknown>(binding: Binding<T>): Binding<T>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | binding | <code>Binding&lt;T&gt;</code> | Binding object | <b>Returns:</b> `Binding<T>`