typescript-rest icon indicating copy to clipboard operation
typescript-rest copied to clipboard

Why specify route method?

Open Evanlec opened this issue 6 years ago • 0 comments

The standard Express syntax already specifies the HTTP method... i.e. router.get('/foo', () => { ... })

Can't we introspect the HTTP method (in this case GET) from the code, rather than using this @GET annotation?

This way we're writing code that is closer to vanilla Express.

Evanlec avatar Jul 29 '19 17:07 Evanlec