( mutationCache: MutationCache, options: MutationStateOptions<TResult, TMutation>, )
| 64 | } |
| 65 | |
| 66 | function getResult< |
| 67 | TResult = MutationState, |
| 68 | TMutation extends Mutation<any, any, any, any> = |
| 69 | MutationTypeFromResult<TResult>, |
| 70 | >( |
| 71 | mutationCache: MutationCache, |
| 72 | options: MutationStateOptions<TResult, TMutation>, |
| 73 | ): Array<TResult> { |
| 74 | return mutationCache |
| 75 | .findAll(options.filters) |
| 76 | .map( |
| 77 | (mutation): TResult => |
| 78 | (options.select |
| 79 | ? options.select(mutation as TMutation) |
| 80 | : mutation.state) as TResult, |
| 81 | ) |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * `useMutationState` is a hook that gives you access to all mutations in the `MutationCache`. You can pass |
no test coverage detected