define server function output type / validation?
How people doing that? Usually, when designing server side I prefer to decide id advance what types should be for what endpoints and then just implement the code according to that types.
Doing it with createServerFn for now is like:
it is little cumbersome. Is there any place in generics where I could insert the desired output type?
Or maybe like the input validation, validation of output?
1 Reply
plain-purple•3mo ago
I am new to TanStack and TypeScript ( late to the party ) but this is what I have been doing in a project I am building.