index.d.ts 532 B

1234567891011121314151617181920
  1. import { PiniaPluginContext } from 'pinia';
  2. export interface PersistStrategy {
  3. key?: string;
  4. storage?: Storage;
  5. paths?: string[];
  6. }
  7. export interface PersistOptions {
  8. enabled: true;
  9. detached?: true;
  10. enforceCustomStorage?: boolean;
  11. H5Storage?: Storage;
  12. strategies?: PersistStrategy[];
  13. }
  14. declare module 'pinia' {
  15. interface DefineStoreOptionsBase<S, Store> {
  16. persist?: PersistOptions;
  17. }
  18. }
  19. declare const _default: ({ options, store }: PiniaPluginContext) => void;
  20. export default _default;