-
Hi I'm new to express-zod and was wanting to make use of the
When I make a fetch, I want to set the type of the variable holding the result to one of the types above. I'm kinda new to TypeScript so it's not very clear to me how I would go around doing this. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I've figured it out thanks. |
Beta Was this translation helpful? Give feedback.
-
Hello @egithinji . There is a client class in that file, that you need to instantiate with your implementation of the actual fetching. The example implementation using standard The client just performs the fetching operation using your implementation and assigns a type to the response according to the It's the same as using In case you found out something I forget to mention or can describe it better, feel free to share your knowledge with others. |
Beta Was this translation helpful? Give feedback.
I've figured it out thanks.