useQuery() Typescript says only data is returned, not | undefined?
The docs state that the data type should be T | undefined. In our codebase however, data is not optional (see image), it is just T.
Does anyone know why this is the case?
Does anyone know why this is the case?

React Query is now written in TypeScript to make sure the library and your projects are type-safe! Things to keep in mind: Types currently require using TypeScript v4.1 or greater Changes to types in...
