BackendStack21 / 0http

Zero friction HTTP requests router. The need for speed!
https://0http.21no.de
MIT License
158 stars 11 forks source link

Feature: typescript support #31

Closed BronyDust closed 1 year ago

jkyberneees commented 1 year ago

Hi @BronyDust , many thanks for pushing TypeScript types support on this project.

I went through your initial proposal, but it is missing some core definitions like use methods or proper request handler params. A good guidance here would be the restana types https://github.com/BackendStack21/restana/blob/master/index.d.ts, as it uses 0http as base.

Looking forward to your feedback and updates Regards

BronyDust commented 1 year ago

Hi @jkyberneees thank you for review Is it close enough? I declare default router as a class that extends Trouter and implements IRouter interface

BronyDust commented 1 year ago

@jkyberneees Are you started to rewrite whole project to TS?

jkyberneees commented 1 year ago

Hi @BronyDust, just renamed the branch to avoid confusion. Please see: https://github.com/BackendStack21/0http/tree/adding-ts-types to keep up to date, I have refactor it a bit. Still working on full compatibility, trying not to break the current API.

Unfortunately rewriting it completely in TypeScript will decrease performance and it not the goal, more updates soon. Thanks for your support so far.