My types are not narrowing down correctly - TanStack