import { Observable, ObservableLike, SubscriptionObserver } from "observable-fns"; declare type Initializer = (observer: SubscriptionObserver) => UnsubscribeFn | void; declare type Thenable = { then: (onFulfilled?: (value: T) => any, onRejected?: (error: any) => any) => any; }; declare type UnsubscribeFn = () => void; /** * Creates a hybrid, combining the APIs of an Observable and a Promise. * * It is used to proxy async process states when we are initially not sure * if that async process will yield values once (-> Promise) or multiple * times (-> Observable). * * Note that the observable promise inherits some of the observable's characteristics: * The `init` function will be called *once for every time anyone subscribes to it*. * * If this is undesired, derive a hot observable from it using `makeHot()` and * subscribe to that. */ export declare class ObservablePromise extends Observable implements Promise { private initHasRun; private fulfillmentCallbacks; private rejectionCallbacks; private firstValue; private firstValueSet; private rejection; private state; readonly [Symbol.toStringTag]: "[object ObservablePromise]"; constructor(init: Initializer); private onNext; private onError; private onCompletion; then(onFulfilledRaw?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onRejectedRaw?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; catch(onRejected: ((error: Error) => Promise | Result) | null | undefined): Promise; finally(onCompleted?: (() => void) | null | undefined): Promise; static from(thing: Observable | ObservableLike | ArrayLike | Thenable): ObservablePromise; } export {};