@rx-angular/state
Version:
@rx-angular/state is a light-weight, flexible, strongly typed and tested tool dedicated to reduce the complexity of managing component state and side effects in angular
29 lines • 929 B
TypeScript
import { Observable, Subject } from 'rxjs';
/**
* Interface to declare name and value of the OnDestroy lifecycle hook
*/
export interface DestroyProp {
destroy: true;
}
/**
* Interface to declare names and values of single shot lifecycle hook. e.g. init, afterViewInit, afterContentInit, destroy
*/
export type SingleShotProps = DestroyProp;
/**
* Interface to declare names and values of lifecycle hook. e.g. init, changes, afterViewInit, etc...
*/
export type HookProps = DestroyProp;
/**
* Interface to specify an Observable channel for lifecycle hooks.
* It is types as Partial of possible lifecycle names and values
*/
export interface DestroyChannel$ {
readonly _hooks$: Subject<DestroyProp>;
}
/**
* Interface to specify the channel for the `onDestroy` hook as Observable
*/
export interface OnDestroy$ extends DestroyChannel$ {
onDestroy$: Observable<boolean>;
}
//# sourceMappingURL=model.d.ts.map