TypeScript: Prevent query from returning undefined #5707
BrendanC23
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a query procedure returns
undefined
, react query logs this message:Is there a way to update the type of
query()
so thatundefined
is not a valid return type? This way, the error could be caught at compile time instead of at runtime.trpc/packages/server/src/unstable-core-do-not-import/procedureBuilder.ts
Lines 293 to 309 in 237dbb3
Beta Was this translation helpful? Give feedback.
All reactions