-
Notifications
You must be signed in to change notification settings - Fork 108
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
Suggestion: Convert to Typescript #520
Comments
Many projects opt for TypeScript types generated by JSDoc these days. I use it this way extensively and I'm not missing anything. The benefits of that approach:
Some popular projects using this approach: This is how I would do it. However, given that I currently can't afford the luxury of working much on open source, it's not my call and I'm not standing in the way of whatever changes you want to make to the project. |
We already tried the JSDoc -> TS approach in 2021 with version 7 and we had to revert that work after some months (gone by version 8) as the results were much poorer than what they already had through DT. This is the conclusion I wrote in #386 about that effort and why we had to revert:
|
This might have been true in 2021, but it's definitely not anymore. There is really nothing you cannot do with JSDoc, because you can use "TypeScript" mode which allows you to use arbitrary TypeScript expressions. |
Throwing this out here. Looking at the commit log since 2016, the maintainers that have been adding code to fake timers seem to be me, @benjamingr and @SimenB . All of us have either expressed a desire to add Typescript or at least a lack of antipathy (as in "it works either way"). For me, Typescript shines for libraries as it gives our users great developer experience out of the box: intellisense and types that are always up to date for consumers. There are types available in DTS today: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/sinonjs__fake-timers/index.d.ts
These could be integrated with minimal effort. It also helps when working with the internals of the project. We would not need to rewrite tests, these could stay JS (for now) - it is mostly tooling.
Thoughts?
The text was updated successfully, but these errors were encountered: