* Register a callback to provide the value for a key when `toJson` is called.
(key: StateKey<T>, callback: () => T)
| 122 | * Register a callback to provide the value for a key when `toJson` is called. |
| 123 | */ |
| 124 | onSerialize<T>(key: StateKey<T>, callback: () => T): void { |
| 125 | this.onSerializeCallbacks[key] = callback; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Serialize the current state of the store to JSON. |
no outgoing calls
no test coverage detected