import type { Data, DataKey } from "../util/data.js"; import type { AnyCaller } from "../util/function.js"; import type { Updates } from "../util/update.js"; import { Store } from "./Store.js"; /** Store a data object. */ export declare class DataStore extends Store { /** Get the data of this store. */ get data(): T; /** Set the data of this store. */ set data(data: T); /** Update several props in this data. */ update(updates: Updates): void; /** Update a single named prop in this data. */ get>(name: K): T[K]; /** Update a single named prop in this data. */ set>(name: K, value: T[K]): void; } /** Store an optional data object. */ export declare class OptionalDataStore extends Store { /** Get current data value of this store (or throw `Promise` that resolves to the next required value). */ get data(): T; /** Set the data of this store. */ set data(data: T); /** Does the data exist or not? */ get exists(): boolean; /** Require the data for this data store, or throw `RequiredError` if it is not set. */ require(caller?: AnyCaller): T; /** Update several props in this data. */ update(updates: Updates): void; /** Update a single named prop in this data. */ get>(name: K): T[K]; /** Update a single named prop in this data. */ set>(name: K, value: T[K]): void; /** Set the data to `undefined`. */ delete(): void; }