is it possible to create a type-safe utility for beforeLoad? - TanStack