import { ObservableProperty } from './ObservableProperty.js'; import { PropertySetHandler } from './types.js'; import { AsyncStorage } from './types/AsyncStorage.js'; import { SyncStorage } from './types/SyncStorage.js'; /** * Property wrapper that can be observed for changes. */ export declare class StatefulProperty extends ObservableProperty { /** * The storage mechanism to save the value in. */ private _storage; /** * The key to save the value under. */ private _key; /** * Initializes the property. * * @param args - The property arguments. */ constructor({ storage, key }: { storage: SyncStorage | AsyncStorage; key: string; }); /** * Sets the property value, and then persists the property value into the configured storage mechanism. * * The value may either be: * 1) a direct value matching the property type, or * 2) a function that will be called with a template of the current property value, that may be modified and will replace the property value when complete * * @param valueOrFunction - The value to set, or the function to call. * * @returns Nothing. */ set(valueOrFunction: T | PropertySetHandler): void; /** * Initializes the property value from storage, if available. */ _initFromStorage(): void; } //# sourceMappingURL=StatefulProperty.d.ts.map