import { ReadonlySignal } from './index.js'; /** * Create a signal that emits whenever the passed signal emits. The original * emitted value gets transformed by the passed function and the result gets * emitted. * * Example: * ```ts * const signal$ = makeSignal(); * const derived$ = deriveSignal(signal$, (n) => n + 100); * derived$.subscribe((v) => console.log(v)); * signal$.emit(3); // will trigger console.log, echoing 103 * ``` * @param signal$ a signal. * @param transform a transformation function. * @returns a new signal that will emit the transformed data. */ export declare function deriveSignal(signal$: ReadonlySignal, transform: (data: T) => U): ReadonlySignal; /** * Coalesce multiple signals into one that will emit the latest value emitted * by any of the source signals. * * Example: * ```ts * const lastUpdate1$ = makeSignal(); * const lastUpdate2$ = makeSignal(); * const latestUpdate$ = coalesceSignals([lastUpdate1$, lastUpdate2$]); * latestUpdate$.subscribe((v) => console.log(v)); * lastUpdate1$.emit(1577923200000); // will log 1577923200000 * lastUpdate2$.emit(1653230659450); // will log 1653230659450 * ``` * @param signals$ an array of signals to observe. * @returns a new signal that emits whenever one of the source signals emits. */ export declare function coalesceSignals(signals$: { [P in keyof T]: ReadonlySignal; }): ReadonlySignal;