import { MemoryStream } from "xstream"; import { DefaultValueProducer } from "./defaultvalueproducer"; export type SearchFunction = (value: T) => boolean; /** * A read only wrapper around DefaultValueProducer that allows * to synchronously get the current value using the .value property * and listen to updates by subscribing to the .updates stream */ export declare class ValueAndUpdates { readonly updates: MemoryStream; get value(): T; private readonly producer; constructor(producer: DefaultValueProducer); /** * Resolves as soon as search value is found. * * @param search either a value or a function that must return true when found * @returns the value of the update that caused the search match */ waitFor(search: SearchFunction | T): Promise; }