memorio 5.1.3 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memorio",
3
3
  "codeName": "memorio",
4
- "version": "5.1.3",
4
+ "version": "5.1.4",
5
5
  "description": "Memorio, State + Observer, Store and iDB for an easy life - Cross-platform compatible",
6
6
  "main": "./index.cjs",
7
7
  "browser": {
package/types/state.d.ts CHANGED
@@ -54,13 +54,27 @@ interface _state {
54
54
  readonly list?: () => object
55
55
 
56
56
  /**
57
- * Generate a message for "memorio"
58
- * Note: FOR INTERNAL USE ONLY.
59
- * @since memorio 0.0.1
60
- */
57
+ * Generate a message for "memorio"
58
+ * Note: FOR INTERNAL USE ONLY.
59
+ * @since memorio 0.0.1
60
+ */
61
61
  readonly mex?: any
62
62
 
63
- }
63
+ /**
64
+ * Persist a state path to the store and keep it synced.
65
+ *
66
+ * @example
67
+ * const stop = state.persist('state.user')
68
+ * // ... mutations to state.user are mirrored to store automatically
69
+ * stop() // call to stop mirroring
70
+ *
71
+ * @param path A `state.`-prefixed path (e.g. `'state.user'`). A bare key
72
+ * like `'user'` is normalized.
73
+ * @return An unsubscribe function; call it to stop mirroring.
74
+ */
75
+ readonly persist: (path: string) => (() => void)
76
+
77
+ }
64
78
 
65
79
  declare var state: _state
66
80
  type state = _state
package/vsix/memorio.vsix CHANGED
Binary file