unstorage-pinia-plugin
Version:
Pinia store persistence and hydration using Unstorage
16 lines (13 loc) • 501 B
TypeScript
import { PiniaPluginContext } from 'pinia';
import { Driver, Storage } from 'unstorage';
export interface UnstorageStoreOptions {
driver: Driver;
filter?: Array<string>;
storage?: Storage;
}
export declare const persistStore: (store: any, unstorageOptions: UnstorageStoreOptions) => any;
export interface UnstoragePluginOptions {
driver?: Driver;
}
export declare const createUnstoragePlugin: ({ driver }?: UnstoragePluginOptions) => ({ options, store }: PiniaPluginContext) => void;
export {};