-
Hello 👋 Is there a way to type the input object without using validation? I'm trying to re-create the behaviour of this Blitz example: |
Beta Was this translation helpful? Give feedback.
Answered by
KATT
Sep 20, 2021
Replies: 1 comment 1 reply
-
Yes, but you should really, really not do this function passThroughAsNumber(input: unknown) {
return input as number;
}
const router = trpc.router().query('num', {
input: passThroughAsNumber,
resolve({ input }) {
return {
input,
};
},
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
KATT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, but you should really, really not do this