import { SignalUpdate } from "@dathra/reactivity"; //#region src/atom/implementation.d.ts type Getter = (atom: ReadableAtom) => T; type NonFunction = T extends ((...args: never[]) => unknown) ? never : T; interface PrimitiveAtom { readonly key: string; readonly kind: "primitive"; readonly init: T; } interface DerivedAtom { readonly key: string; readonly kind: "derived"; readonly read: (get: Getter) => T; } type ReadableAtom = PrimitiveAtom | DerivedAtom; type WritableAtom = PrimitiveAtom; declare function atom(key: string, read: (get: Getter) => T): DerivedAtom; declare function atom(key: string, initialValue: NonFunction): PrimitiveAtom; //#endregion //#region src/createAtomStore/implementation.d.ts type AppId = string; type AtomUpdate = SignalUpdate; interface ReadableAtomRef { readonly value: T; peek(): T; } interface WritableAtomRef extends ReadableAtomRef { set(update: AtomUpdate): void; } interface AtomStore { readonly appId: AppId; ref(atom: DerivedAtom): ReadableAtomRef; ref(atom: PrimitiveAtom): WritableAtomRef; get(atom: ReadableAtom): T; peek(atom: ReadableAtom): T; set(atom: PrimitiveAtom, update: AtomUpdate): void; fork(options?: { values?: Iterable, unknown]>; }): AtomStore; dispose(): void; } declare function createAtomStore(options: { appId: AppId; values?: Iterable, unknown]>; }): AtomStore; //#endregion export { WritableAtomRef as a, Getter as c, WritableAtom as d, atom as f, ReadableAtomRef as i, PrimitiveAtom as l, AtomStore as n, createAtomStore as o, AtomUpdate as r, DerivedAtom as s, AppId as t, ReadableAtom as u }; //# sourceMappingURL=implementation-BtFRKZGC.d.cts.map