Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VuexPersistence<S>

A class that implements the vuex persistence.

type

S type of the 'state' inside the store (default: any)

Type parameters

  • S

Hierarchy

  • VuexPersistence

Implements

Index

Constructors

constructor

Properties

RESTORE_MUTATION

RESTORE_MUTATION: Mutation<S>

A mutation that can be used to restore state Helpful if we are running in strict mode

Private _mutex

_mutex: SimplePromiseQueue = new SimplePromiseQueue()

asyncStorage

asyncStorage: boolean

filter

filter: function

Type declaration

    • (mutation: Payload): boolean
    • Parameters

      • mutation: Payload

      Returns boolean

key

key: string

modules

modules: string[]

plugin

plugin: Plugin<S>

The plugin function that can be used inside a vuex store.

reducer

reducer: function

Type declaration

    • (state: S): Partial<S>
    • Parameters

      • state: S

      Returns Partial<S>

restoreState

restoreState: function

Type declaration

    • (key: string, storage?: AsyncStorage | Storage): Promise<S> | S
    • Parameters

      Returns Promise<S> | S

saveState

saveState: function

Type declaration

    • (key: string, state: __type, storage?: AsyncStorage | Storage): Promise<void> | void
    • Parameters

      • key: string
      • state: __type
      • Optional storage: AsyncStorage | Storage

      Returns Promise<void> | void

storage

storage: Storage | AsyncStorage | undefined

strictMode

strictMode: boolean

subscribed

subscribed: boolean

supportCircular

supportCircular: boolean

Methods

Private subscriber

  • subscriber(store: Store<S>): (Anonymous function)
  • Creates a subscriber on the store. automatically is used when this is used a vuex plugin. Not for manual usage.

    Parameters

    • store: Store<S>

    Returns (Anonymous function)

Generated using TypeDoc