interface PersistedStateWriterOptions { /** The entry this state is saved under; `undefined` means nothing is saved. */ storageKey: string | undefined; /** The table's current value, controlled state included. */ state: T; /** The app's default, taken from props on every render (never from `table.initialState`). */ defaultValue: T; /** The current key's validated saved value; `undefined` when nothing valid is saved. */ saved: T | undefined; /** `false` while the value is still being changed by a drag; nothing is written until it ends. */ settled?: boolean; /** The app owns this state: a key change blocks writes but does not set the state itself. */ controlled?: boolean; toSignature: (value: T) => string; toStorage: (value: T) => string; applyState: (value: T) => void; } /** * The storage rule for one saved table setting (ASMA-8597, REQ-004 and REQ-005). * * - A value equal to the default removes the entry; any other value writes it. * - Mounting, and loading a key, never write: only a change after that does. * - When `storageKey` changes, the new key's values are loaded into the table state in a layout effect, and * nothing is written or removed under the new key until the state equals what was loaded. The old key's * entry is never touched, so the old value can't be copied over the new key. * - When the key goes away (`undefined`), the table goes back to the app's defaults and writes nothing, so * one user's values are not left on screen for whoever is shown next. * * It costs a table that does not save the setting nothing per render (ASMA-8698): the value's signature is computed only * while there is a key (the render that loses the key reads it in the layout effect), and the default's only when a write * or a reset needs it. */ export declare const usePersistedStateWriter: (options: PersistedStateWriterOptions) => void; export {};