@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
35 lines (22 loc) • 1.03 kB
Markdown
---
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) > [@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 | [Binding](./context.binding.md)<!-- --><T> | Binding object |
<b>Returns:</b>
[Binding](./context.binding.md)<!-- --><T>