import { Computation, Computation_T, Computation_type, PureStatelessComputationModule } from "../computations.js"; import { EventListenerLike, EventSourceLike } from "../events.js"; import { Function1, SideEffect1 } from "../functions.js"; import { DisposableLike } from "../utils.js"; /** * @noInheritDoc */ export interface EventSourceComputation extends Computation { readonly [Computation_type]?: EventSourceLike; } /** * @noInheritDoc */ export interface EventSourceModule extends PureStatelessComputationModule { addEventHandler(handler: SideEffect1): Function1, DisposableLike>; create(setup: SideEffect1>): EventSourceLike; fromPromise(): Function1, EventSourceLike>; merge(fst: EventSourceLike, snd: EventSourceLike, ...tail: readonly EventSourceLike[]): EventSourceLike; mergeMany(eventSources: readonly EventSourceLike[]): EventSourceLike; mergeWith(snd: EventSourceLike, ...tail: readonly EventSourceLike[]): Function1, EventSourceLike>; } export type Signature = EventSourceModule; export declare const addEventHandler: Signature["addEventHandler"]; export declare const create: Signature["create"]; export declare const fromPromise: Signature["fromPromise"]; export declare const keep: Signature["keep"]; export declare const map: Signature["map"]; export declare const merge: Signature["merge"]; export declare const mergeMany: Signature["mergeMany"]; export declare const mergeWith: Signature["mergeWith"];