dredd icon indicating copy to clipboard operation
dredd copied to clipboard

Adopt TypeScript

Open artem-zakharchenko opened this issue 6 years ago • 3 comments

Motivation:

The current state of the repository is not contributor-friendly. It takes intense amount of time to figure out certain parts of the logic, and the absence of strong types makes the learning curve, as well as the refactoring process, much steeper.

I propose to integrate TypeScript into the build pipeline to move forward predictable and self-documented code base.

Benefits:

  1. TypeScript provides build-time verification that your code operates as intended.
  2. TypeScript makes code self-documented, which is much more reliable than any kind of on-demand generated documentation.
  3. We can emit TypeScript definitions we use in Dredd to allow TypeScript users to use Dredd more reliably.
  4. Code base is easier to understand with types and cross-references.
  5. Tests are easier to write since you also write them with TypeScript.
  6. Vastly improved refactoring, due to all the points above.

Roadmap:

The first attempts to introduce this change were done in #1497, but due to the size of the changes it was decided to split it into several smaller pull requests.

artem-zakharchenko avatar Sep 30 '19 08:09 artem-zakharchenko

Build setup and tests are adopted, it's left to rewrite a few basic modules in TypeScript.

artem-zakharchenko avatar Oct 03 '19 12:10 artem-zakharchenko

@artem-zakharchenko do you want to close this one as done or do you want to turn it into a

  • [ ] check
  • [ ] list

tracking progress file by file? Or is there a "minimal viable adoption" we could define and when it is reached, it closes this issue?

honzajavorek avatar Oct 14 '19 15:10 honzajavorek

Any updates on this issue?

rrhodes avatar Aug 13 '21 14:08 rrhodes