Generated using TypeDoc
284 |Generated using TypeDoc
180 |Generated using TypeDoc
387 |Method to filter which mutations will trigger state saving
152 | Be default returns true for all mutations.
153 | Check mutations using mutation.type
Key to use to save the state into the storage
174 |Names of modules that you want to persist. 189 | If you create your custom PersistOptions.reducer function, 190 | then that will override filter behaviour, not this argument
191 |Function to reduce state to the object you want to save. 206 | Be default, we save the entire state. 207 | You can use this if you want to save only a portion of it.
208 |Method to retrieve state from persistence
227 |Method to save state into persistence
248 |Window.Storage type object. Default is localStorage
271 |Set this to true to support 286 | Vuex Strict Mode
287 |Support serializing circular json objects
307 |308 | let x = {a: 10} 309 | x.b = x 310 | console.log(x.a) // 10 311 | console.log(x.b.a) // 10 312 | console.log(x.b.b.a) // 10 313 |314 |
Generated using TypeDoc
458 |Generated using TypeDoc
181 |Generated using TypeDoc
203 |Created by championswimmer on 22/07/17.
96 |Generated using TypeDoc
199 |Generated using TypeDoc
181 |Generated using TypeDoc
181 |Generated using TypeDoc
210 |mutation.type
46 | * @param mutation object of type {@link MutationPayload}
47 | */
48 | filter?: (mutation: MutationPayload) => boolean
49 |
50 | /**
51 | * Names of modules that you want to persist.
52 | * If you create your custom {@link PersistOptions.reducer} function,
53 | * then that will override filter behaviour, not this argument
54 | */
55 | modules?: string[]
56 |
57 | /**
58 | * Set this to true to support
59 | * Vuex Strict Mode
60 | * @default false
61 | */
62 | strictMode?: boolean
63 |
64 | /**
65 | * If your storage is async
66 | * i.e., if setItem(), getItem() etc return Promises
67 | * (Must be used for asynchronous storages like LocalForage)
68 | * @default false
69 | */
70 | asyncStorage?: boolean
71 |
72 | /**
73 | * Support serializing circular json objects
74 | * 75 | * let x = {a: 10} 76 | * x.b = x 77 | * console.log(x.a) // 10 78 | * console.log(x.b.a) // 10 79 | * console.log(x.b.b.a) // 10 80 | *81 | * @default false 82 | * 83 | */ 84 | supportCircular?: boolean 85 | 86 | /** 87 | * Whether to replace or concat arrays when merging 88 | * saved state with restored state 89 | * defaults to replacing arrays 90 | */ 91 | mergeOption?: MergeOptionType 92 | } 93 | -------------------------------------------------------------------------------- /src/SimplePromiseQueue.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable: variable-name 2 | export default class SimplePromiseQueue { 3 | private readonly _queue: Array
plugin
function of this class as a
47 | * Vuex plugin.
48 | * @param {PersistOptions} options
49 | */
50 | public constructor(options?: PersistOptions
If your storage is async 130 | i.e., if setItem(), getItem() etc return Promises 131 | (Must be used for asynchronous storages like LocalForage)
132 |134 |- default
135 |
137 |
138 |false
136 |