You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is of course subjective, but it feels pretty unintuitive putting the schema for a route after the handler itself. When looking at a route, seeing its inputs and outputs first just makes for really smooth DX. Being subjective though, I might be in the minority and most people might prefer having their schema following the handler.
A really nice way to allow for either format though would be to use a syntax similar to Fastify's route method which takes an object for the argument, and lets you organize it however you want. I think having something similar in Elysia would make the already great DX even greater.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is of course subjective, but it feels pretty unintuitive putting the schema for a route after the handler itself. When looking at a route, seeing its inputs and outputs first just makes for really smooth DX. Being subjective though, I might be in the minority and most people might prefer having their schema following the handler.
A really nice way to allow for either format though would be to use a syntax similar to Fastify's route method which takes an object for the argument, and lets you organize it however you want. I think having something similar in Elysia would make the already great DX even greater.
Something like this:
Beta Was this translation helpful? Give feedback.
All reactions