{"version":3,"file":"types.cjs","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type { PersistError, RehydrateError, MigrateError } from './errors.ts';\n\nexport type SerializeFunction = (data: any, key: string) => any;\nexport type UnserializeFunction = (data: any, key: string) => any;\nexport type MigrateFunction = (state: any) => any;\n\nexport type Driver = {\n  getItem: (key: string) => any;\n  setItem: (key: string, value: any) => any;\n};\n\nexport type Options = {\n  prefix: string,\n  serialize: SerializeFunction,\n  unserialize: UnserializeFunction,\n  migrate: MigrateFunction,\n  persistThrottle: number,\n  persistDebounce?: number,\n  persistWholeStore: boolean,\n  errorHandler: (error: PersistError | RehydrateError | MigrateError) => void;\n  initActionType?: string\n};\n\nexport type ExtendedOptions = Options & {\n  driver: Driver\n};\n"],"mappings":"","ignoreList":[]}