import { type CleanupFn } from './cleanup.ts'; /** * Return type for processes that support cancellable subscriptions. * The handler object implements the observable events. * @deprecated */ export interface ObservableValue { value?: Value; setValue(value: Value): void; subscribe(handler: Events): CleanupFn; } /** * Provider that manages a set of subscriptions. * @deprecated */ export declare class ObservableProvider implements ObservableValue { protected readonly _handlers: Set; private readonly _proxy; private _value?; /** * Proxy used to dispatch callbacks to each subscription. */ get callback(): Events; get value(): Value | undefined; setValue(value: Value): void; subscribe(handler: Events): CleanupFn; } /** * @deprecated */ export interface CancellableObservableEvents { onCancelled?(): void; } /** * @deprecated */ export interface CancellableObservable extends ObservableValue { cancel(): Promise; } /** * Implements subscriptions with ability to be cancelled. * @deprecated */ export declare class CancellableObservableProvider extends ObservableProvider { private readonly _handleCancel?; private _cancelled; constructor(_handleCancel?: (() => Promise) | undefined); get cancelled(): boolean; cancel(): Promise; } //# sourceMappingURL=observable-value.d.ts.map