@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 864 B
Markdown
---
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) > [@loopback/core](./core.md) > [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<T></code> | Binding object |
<b>Returns:</b>
`Binding<T>`