* Detaches the observer from the mutation it is currently observing (if * any) and resets the observed result back to its default, `idle` state. * * This does not cancel an in-flight mutation; the mutation itself keeps * running to completion and its own callbacks still fire, but this
()
| 186 | * ``` |
| 187 | */ |
| 188 | reset(): void { |
| 189 | // reset needs to remove the observer from the mutation because there is no way to "get it back" |
| 190 | // another mutate call will yield a new mutation! |
| 191 | this.#currentMutation?.removeObserver(this) |
| 192 | this.#currentMutation = undefined |
| 193 | this.#updateResult() |
| 194 | this.#notify() |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Builds a new `Mutation` in the `MutationCache` using the observer's |
no test coverage detected