import { BehaviorSubject } from 'rxjs'; /** * A type that represents a value that can be updated over time: * * 1) It can be a static value of type `TValue` * 2) Or a `BehaviorSubject` that emits values of type `TValue` * 3) Or pair of `[getValue, setValue]` functions for getting and setting the value */ export type Updatable = TValue | BehaviorSubject | [TValue, (value: TValue) => void]; /** * Restricts an Updatable to a (2) BehaviorSubject variant * * @see Updatable * * @private internal utility <- TODO: [🧠] Maybe export from `@promptbook/types` */ export declare function asUpdatableSubject(value: Updatable): BehaviorSubject;