UNPKG

@ng-doc/ui-kit

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

40 lines (35 loc) 1.11 kB
import { NgDocSubscribable } from '@ng-doc/ui-kit/types'; import { Observable, OperatorFunction, MonoTypeOperatorFunction } from 'rxjs'; import { NgZone } from '@angular/core'; /** * @param subscribable */ declare function fromSubscribe<T>(subscribable: NgDocSubscribable<T>): Observable<T>; type StatedObservable<T, E = Error> = Observable<ObservableState<T, E>>; interface ObservableState<T, E = Error> { result: T | null; error: E | null; pending: boolean; } /** * * @param retry */ declare function observableState<T, E = Error>(retry?: Observable<unknown>): OperatorFunction<T, ObservableState<T, E>>; /** * * @param ngZone */ declare function ngDocZoneAttach<T>(ngZone?: NgZone): MonoTypeOperatorFunction<T>; /** * * @param ngZone */ declare function ngDocZoneDetach<T>(ngZone?: NgZone): MonoTypeOperatorFunction<T>; /** * * @param ngZone */ declare function ngDocZoneOptimize<T>(ngZone?: NgZone): MonoTypeOperatorFunction<T>; export { fromSubscribe, ngDocZoneAttach, ngDocZoneDetach, ngDocZoneOptimize, observableState }; export type { ObservableState, StatedObservable };