-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite in Typescript 🔥 #166
Conversation
Based on @the-gear/ts-lib-starter at v6.3.0-24-geb20622 https://github.com/the-gear/ts-lib-starter/tree/eb2062200fa6e565983b1f45afb03e5009771665
Codecov Report
@@ Coverage Diff @@
## master #166 +/- ##
===========================================
- Coverage 100% 73.94% -26.06%
===========================================
Files 7 3 -4
Lines 181 357 +176
Branches 53 104 +51
===========================================
+ Hits 181 264 +83
- Misses 0 67 +67
- Partials 0 26 +26
Continue to review full report at Codecov.
|
Hi! Thank you for the PR. It looks like a lot of work has been done, impressive! Could you please explain your motivation regarding rewriting the library to TypeScript? So far I tend to decline this changes by the following reasons:
|
Personally I always welcome this kind of change 👍 TS is basically more maintainable than JS. Because that's why TS exists users will indirectly get benefits though continuous package maintenance. Also I feel general trend where more packages of |
Hi @frenzzy
I'm not sure. In fact i rewrite this into typescript to understand how code works! :-) |
Correct me if I am wrong but to add type annotations it is not required to rewrite the codebase to TS, for example you can reach the same effect with JSDoc only.
Let's just complete them? It should be even simpler than a complete rewriting.
But why, what the difference? |
Yeah, but adding annotations may be dangerous because they may become obsolete and useless and this is reason why I rewrite it in TS. Adding types to existing source and let typescript really validate code is safe way how to create type definitions. I did this only to get valid
Yes, this was original purpose, but when I did this, I created this PR, And sorry, I'm really out of time for next 14 days. ⌛ |
I’m gonna be busy for the next two weeks. |
I created a PR with improved typings based on yours: #167
Hopefully the source of the problem is eliminated and we no longer need this PR. |
I am going to rethink this PR after pillarjs/path-to-regexp#203 get released, JFYI. |
I have tried to continue this work in #183 but I see problems which worrying me:
|
|
Types of changes
Checklist:
This is complete rewrite in typescript
May still need some edits, but I think that we can create new branch and pre-release
(I already changed version in package to
9.0.0-rc1
)Build is working, tests too, but I used base from mine starter, ⚙️/ts-lib-starter
TODO:
.d.ts
) to 8.x versionI need help with review, testing and feedback!
/cc @frenzzy @koistya ref #101 @pradyuman @dangmai @gytisgreitai ref #159