@internal
(mutation: Mutation<any, any, any, any>)
| 211 | |
| 212 | /** @internal */ |
| 213 | runNext(mutation: Mutation<any, any, any, any>): Promise<unknown> { |
| 214 | const scope = scopeFor(mutation) |
| 215 | if (typeof scope === 'string') { |
| 216 | const foundMutation = this.#scopes |
| 217 | .get(scope) |
| 218 | ?.find((m) => m !== mutation && m.state.isPaused) |
| 219 | |
| 220 | return foundMutation?.continue() ?? Promise.resolve() |
| 221 | } else { |
| 222 | return Promise.resolve() |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Removes all mutations from the cache. |