useQuery
with typed inputs?
#5692
Unanswered
ishaangandhi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am using
useQuery
fromcreateTRPCReact
and I notice I'm not being typechecked.My Home.tsx:
The problem
The type of useQuery is:
I want
input
to be required, notvoid
. I defined that route to haveinput(z.string())
, notinput(z.string().optional())
Context
For reference,
api
is defined as:and this is my api package:
What am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions