Guibi1 / SvelteKit-TypeSafe-API

Adding type safety to SvelteKit's server endpoints.
https://npmjs.com/sveltekit-typesafe-api
MIT License
7 stars 0 forks source link

Typesafe responses #3

Open jinbe opened 8 months ago

jinbe commented 8 months ago

Do you think we can get typesafe responses as well?

Maybe something similar to validate, that returns either json or Response but be able to handle both success and error responses.

Perhaps any error responses could be thrown as an exception?