Defining and using an abstract collection type - TanStack