OptimisticMatchType
Selects the list items a helper changes.
-
A predicate:
(todo) => todo.id === todoId -
A plain value compared with the item's
keyfield (idby default). Numbers and strings match each other, so a route param"1"matches the id1.
Import
import { OptimisticMatchType } from "@hyper-fetch/core"
Source
Package
Preview
type OptimisticMatchType<Item,Key> = (item: Item) => boolean | ([Key] extends [never] ? never : (Item[Key] extends ParamType ? ParamType : Item[Key]));

