import { Stream } from '@motorcycle/types'; /** * Flattens a stream of sinks into a single sink. * * @name switchSinkOr(or$: Sinks[K], sinkName: K, sinks$: Stream): Sinks[K] * @example * import { switchSinkOr, map, now, never } from '@motorcycle/stream' * * const switchSinkOrNever = switchSinkOr(never()) * * function Component(sources) { * const { listOfItems$ } = sources * * const sinks$ = map(items => SubComponent({ ...sources, items$: now(items) }), listOfItems$) * * const history$ = switchSinkOrNever('history$', sinks$) * * return { history$ } * } */ export declare const switchSinkOr: SwitchSinkOr; export interface SwitchSinkOr { ; }, K extends keyof Sinks = keyof Sinks>(or$: Sinks[K], sinkName: K, sinks$: Stream): Sinks[K]; ; }, K extends keyof Sinks = keyof Sinks>(or$: Sinks[K], sinkName: K): (sinks$: Stream) => Sinks[K]; ; }, K extends keyof Sinks = keyof Sinks>(or$: Sinks[K]): (sinkName: K, sinks$: Stream) => Sinks[K]; ; }, K extends keyof Sinks = keyof Sinks>(or$: Sinks[K]): (sinkName: K) => (sinks$: Stream) => Sinks[K]; }