* Register a callback to provide the value for a key when `toJson` is called.
(key: StateKey<T>, callback: () => T)
| 130 | * Register a callback to provide the value for a key when `toJson` is called. |
| 131 | */ |
| 132 | onSerialize<T>(key: StateKey<T>, callback: () => T): void { |
| 133 | this.onSerializeCallbacks[key] = callback; |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Serialize the current state of the store to JSON. |
no outgoing calls
no test coverage detected