/** * @since 4.0.0 */ import * as Equal from "../../Equal.ts"; /** * @since 4.0.0 * @category type ids */ export type TypeId = "~effect/reactivity/AtomRef"; /** * @since 4.0.0 * @category type ids */ export declare const TypeId: TypeId; /** * @since 4.0.0 * @category models */ export interface ReadonlyRef extends Equal.Equal { readonly [TypeId]: TypeId; readonly key: string; readonly value: A; readonly subscribe: (f: (a: A) => void) => () => void; readonly map: (f: (a: A) => B) => ReadonlyRef; } /** * @since 4.0.0 * @category models */ export interface AtomRef extends ReadonlyRef { readonly prop: (prop: K) => AtomRef; readonly set: (value: A) => AtomRef; readonly update: (f: (value: A) => A) => AtomRef; } /** * @since 4.0.0 * @category models */ export interface Collection extends ReadonlyRef>> { readonly push: (item: A) => Collection; readonly insertAt: (index: number, item: A) => Collection; readonly remove: (ref: AtomRef) => Collection; readonly toArray: () => Array; } /** * @since 4.0.0 * @category constructors */ export declare const make: (value: A) => AtomRef; /** * @since 4.0.0 * @category constructors */ export declare const collection: (items: Iterable) => Collection; //# sourceMappingURL=AtomRef.d.ts.map