import { Emitter } from './emitter.js'; export declare type Subscriber = (emit: Emitter) => Unsubscriber; export declare type Unsubscriber = { unsubscribe(): void; } | (() => any) | void; export interface ISubscription { unsubscribe(): void; readonly closed: boolean; } export interface IObserver { start?(sub: ISubscription): any; next?(val: T): any; error?(err: Error): any; complete?(val?: any): any; } export interface IObservable { subscribe(observer: IObserver): ISubscription; subscribe(next: (val: T) => any, error?: (err: Error) => void, complete?: (val: any) => void): ISubscription; } export declare type IntoObservable = IObservable | Promise | AsyncIterable | Iterable;