UNPKG

@loopback/docs

Version:

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

35 lines (22 loc) 1.03 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`<!-- -->. <b>Signature:</b> ```typescript export declare function asLifeCycleObserver<T = unknown>(binding: Binding<T>): Binding<T>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | binding | [Binding](./context.binding.md)<!-- -->&lt;T&gt; | Binding object | <b>Returns:</b> [Binding](./context.binding.md)<!-- -->&lt;T&gt;