import { Subscribe } from "../_interfaces"; import { EventStream } from "../EventStream"; /** * Creates an EventStream that calls the given `subscribe` function * at the stream activation and starts emitting values provided by the `subscribe` * function. * * When the last subscriber unsubscribes from this stream, subscriber function * gets disposed and the (optional) disposer function gets called. * * @param subscribe - Subscriber function that is called at the stream activation * @see Subscribe * * @example * * const events = F.fromBinder(sink => { * sink("Hello") * sink(new F.Error("oops")) * const id = setTimeout(() => sink("world!"), 1000) * return () => { * clearTimeout(id) * } * }) * * @public */ export declare function fromBinder(subscribe: Subscribe): EventStream;