@zodiac-ui/ng-observable
Version:
Create powerful reactive components with Angular. AoT compatible and Ivy ready.
59 lines (58 loc) • 1.61 kB
TypeScript
import { TypedChanges } from "./interfaces";
import { AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit } from "@angular/core";
import { mixins } from "./internals/apply-mixins";
/**
* Implements all of the builtin lifecycle hooks provided by Angular and makes them observable.
*
* @usageNotes
*
* ```ts
* @Component()
* export class MyComponent extends NgObservable {
* constructor() {
* ngOnInit(this).subscribe(() => {
* console.log("ngOnInit")
* })
* }
* }
* ```
*
* @publicApi
*/
export declare abstract class NgObservable implements OnInit, OnChanges, DoCheck, OnDestroy, AfterContentInit, AfterContentChecked, AfterViewInit, AfterViewChecked {
static [mixins]: void;
/**
* OnChanges lifecycle hook
*
* @param changes Simple changes can be strongly typed where input props are known
*/
ngOnChanges(changes: TypedChanges<any>): void;
/**
* OnInit lifecycle hook
*/
ngOnInit(): void;
/**
* ngDoCheck lifecycle hook
*/
ngDoCheck(): void;
/**
* ngAfterContentInit lifecycle hook
*/
ngAfterContentInit(): void;
/**
* ngAfterContentChecked lifecycle hook
*/
ngAfterContentChecked(): void;
/**
* ngAfterViewInit lifecycle hook
*/
ngAfterViewInit(): void;
/**
* ngAfterViewChecked lifecycle hook
*/
ngAfterViewChecked(): void;
/**
* ngOnDestroy lifecycle hook
*/
ngOnDestroy(): void;
}