pinia-plugin-store
Version:
pinia plugin store
18 lines (15 loc) • 493 B
TypeScript
import { PiniaPlugin } from 'pinia';
interface StoreOptions {
name: string;
storage?: Storage;
ciphertext?: boolean;
}
type Stores = Array<StoreOptions | string>;
interface PiniaPersistOptions {
stores?: Stores;
storage?: Storage;
encrypt?: (value: string) => string;
decrypt?: (value: string) => string;
}
declare function storePlugin(options?: PiniaPersistOptions): PiniaPlugin;
export { type PiniaPersistOptions, type StoreOptions, type Stores, storePlugin };