import type { IStream } from '../../stream/types.js'; /** * Create a stream from a callback-based API * * The callback function is invoked once and can emit multiple values over time. * Returns disposable/cleanup function if provided by the callback setup. * * Example with DOM events: * setup: addEventListener('click', cb) * events: ----c----c--c-------c---> * output: ----e----e--e-------e---> * * Example with interval: * setup: setInterval(cb, 3) * output: ---x---x---x---x---x---> * * Example with WebSocket: * setup: ws.onmessage = cb * messages: ------m-----m--m------> * output: ------d-----d--d------> */ export declare const fromCallback: (callbackFunction: (cb: (...args: FnArgs) => any) => any, mapFn?: (...args: FnArgs) => T, context?: any) => IStream;