UNPKG

@lifaon/rx-js-light

Version:

Blazing fast Observables

11 lines (10 loc) 978 B
import { IObservable } from '../../../../../type/observable.type'; import { IFromPromiseFactoryCreatePromiseFunction, IFromPromiseFactoryObservableNotifications, IFromPromiseFactoryObservableOptions } from './from-promise-factory-observable-notifications.type'; /** * Creates an Observable from a promise factory function * This function is called immediately with an AbortSignal which should be used to abort any async job if the Observable is unsubscribed. * INFO: you may provide yourself an AbortSignal in the 'options'. * - if this one is already aborted, the Observable emits an 'abort' notification, and 'createPromise' is never called * - else, the 'signal' arguments of 'createPromise' is directly linked with the provided one. */ export declare function fromPromiseFactory<GValue>(createPromise: IFromPromiseFactoryCreatePromiseFunction<GValue>, options?: IFromPromiseFactoryObservableOptions): IObservable<IFromPromiseFactoryObservableNotifications<GValue>>;