How to ignore `input` validation and just pass in an object with interfaces?

Llukutis3/15/2023
For my input I just want to pass in an interface rather than using a Zod schema. Either that or if somebody can let me know how to pass in an external interface as a z.object() param
Nnlucas3/15/2023
Could you make a GitHub issue for this? It’s an interesting idea and one I don’t believe is possible without weird hacks for now
Nnlucas3/15/2023
undefined as any as ZodType<YourType>
Nnlucas3/15/2023
^ this might work but I doubt it
Llukutis3/16/2023
Sure thing!
UUUnknown User3/16/2023
Message Not Public
Sign In & Join Server To View
Nnlucas3/16/2023
Good idea, can turn that into a simple util too, something like: const t<T> = v => v as T
Nnlucas3/16/2023
It’s not particularly type-safe but tRPC could definitely offer a 1st class approach