BackendStack21 / restana

Restana is a lightweight and fast Node.js framework for building RESTful APIs.
MIT License
467 stars 27 forks source link

TypeScript definitions #33

Closed tomc974 closed 5 years ago

tomc974 commented 5 years ago

This PR adds TypeScript definitions to the package.

It's not perfect but I think it covers most cases. The only thing really missing is the type for the value returned by routerFactory. I have no clue what it should be. Also, I am unsure how to add body and params to the request. I guess they are only present under certain conditions, right? for example, by using a specific middleware?

jkyberneees commented 5 years ago

Hi @tomc974, you are awesome! Thanks for taking time and effort on this contribution. I will review your work today and provide proper feedback.

Regarding the request params, those will be always present. Could you improve this one?

Best Regards, Rolando

tomc974 commented 5 years ago

@jkyberneees As asked, I've added params to the request