import { c as PersistStorage, d as StorageCodec, t as CreateStorageOptions, u as StateStorage } from "./persist-core-DUCh-1pn.mjs";

//#region src/persist-seroval.d.ts
/** Same options as `createStorage` (`clearCorruptOnFailure`). */
type SerovalStorageOptions = CreateStorageOptions;
/**
 * Seroval codec — round-trips `Set` / `Map` / `Date`. The `toJSON` /
 * `fromJSON` envelope keeps the payload JSON-serializable.
 */
declare const serovalCodec: <S>() => StorageCodec<S>;
/**
 * Build a seroval-encoded `PersistStorage` (round-trips `Set`/`Map`/`Date`).
 *
 * @example
 * ```ts
 * // any string-keyed Storage works: localStorage, sessionStorage, custom
 * const storage = createSerovalStorage<Prefs>(() => localStorage, {
 *   clearCorruptOnFailure: true,
 * });
 * ```
 */
declare function createSerovalStorage<S>(getStorage: () => StateStorage, options?: SerovalStorageOptions): PersistStorage<S> | undefined;
//#endregion
export { SerovalStorageOptions, createSerovalStorage, serovalCodec };