import { MapFunction, SubscribeFunction, ScanFunction, FilterFunction, Consumer } from "./frp-common";
import { Behavior } from "./Behavior";
export declare abstract class Stream<A> implements Consumer<any> {
    eventListeners: Consumer<A>[];
    publish(a: A): void;
    def: Stream<any>;
    subscribe(fn: SubscribeFunction<A>): void;
    abstract push(a: any, b: any): void;
    map<B>(fn: MapFunction<A, B>): Stream<B>;
    mapTo<B>(val: B): Stream<B>;
    merge<B>(otherStream: Stream<B>): Stream<(A | B)>;
    filter(fn: FilterFunction<A>): Stream<A>;
    scanS<B>(fn: ScanFunction<A, B>, startingValue: B): Behavior<Stream<B>>;
    scan<B>(fn: ScanFunction<A, B>, init: B): Behavior<Behavior<B>>;
    unlisten(listener: Consumer<any>): void;
}
export declare class SinkStream<A> extends Stream<A> {
    push(a: A): void;
}
export declare function scanS<A, B>(fn: ScanFunction<A, B>, startingValue: B, stream: Stream<A>): Behavior<Stream<B>>;
export declare function snapshot<A, B>(behavior: Behavior<B>, stream: Stream<A>): Stream<[A, B]>;
export declare function snapshotWith<A, B, C>(fn: (a: A, b: B) => C, behavior: Behavior<B>, stream: Stream<A>): Stream<C>;
/**
 * Takes a stream valued behavior and returns at stream that emits
 * values from the current stream at the behavior.
 */
export declare function switchStream<A>(b: Behavior<Stream<A>>): Stream<A>;
export declare function mergeList<A>(ss: Stream<A>[]): Stream<A>;
export declare function empty<A>(): Stream<A>;
export declare function subscribe<A>(fn: SubscribeFunction<A>, stream: Stream<A>): void;
export declare function publish<A>(a: A, stream: Stream<A>): void;
export declare function merge<A, B>(a: Stream<A>, b: Stream<B>): Stream<(A | B)>;
export declare function map<A, B>(fn: MapFunction<A, B>, stream: Stream<A>): Stream<B>;
export declare function filter<A>(fn: FilterFunction<A>, stream: Stream<A>): Stream<A>;
export declare function isStream(obj: any): boolean;
