import type { MemoizationFunction } from '../types/memoization-function.type.js'; import type { MappingFunction } from '../types/mapping-function.type.js'; import { type Observable } from '../../../external/rxjs/index.js'; type ArrayToObservableTypes>> = { [K in keyof T]: T[K] extends Observable ? U : never; }; /** * @function mergeObservables * @param {Array>} sources - an Array of Observables to merge for this Observable. * @param {(mappable: Array) => R} mergeFunction - Merge method to return the part for this Observable to return. * @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the merged data has changed. Should return true when data is different. * @returns {Observable} - Returns a new Observable that combines the Observables into a single Observable. * @description - Creates a Observable from two or more Observables. * @example * * const mergedObservable = mergeObservables( * [observable1, observable2], * ([value1, value2]) => value1 + value2, * ); * * if observable1 has the value of 10 and observable2 has the value of 4, the mergedObservable will return the value of 14. * if one of them changes the mergedObservable will return the new value. */ export declare function mergeObservables>, SourceTypeArray = ArrayToObservableTypes>(sources: [...SourceTypes], mergeFunction: MappingFunction, memoizationFunction?: MemoizationFunction): Observable; export {};