UNPKG

@jiuyue-/pinia-persisted-state

Version:
20 lines (19 loc) 600 B
import { PiniaPluginContext } from 'pinia'; type PersistStorage = Storage; type PersistConfig = { name?: string; storage?: PersistStorage; }; type PersistOptions = { key?: string; storage?: PersistStorage; paths?: string[]; }; declare module 'pinia' { interface DefineStoreOptionsBase<S, Store> { persist?: boolean | PersistOptions; } } declare function createPersistedState(context: PiniaPluginContext): void; declare function createPersistedState(context: PiniaPluginContext, config: PersistConfig): void; export default createPersistedState;