-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Adding JSDoc to ts.d files #199
Comments
Sure @kberg I will probably merge such PR if it does not replicate all the JSDoc from the javascript files. I am wondering whether there could exist a way to do so automatically by the way (probably not, which is sad, I keep the files in native javascript to avoid any transpilation step that has the nasty habit of befuddling the code sometimes and ruining performance in some scenarios that are required to remain as performant as possible). |
When Typescript is targeting modern JS, Typescript compilation basically just strips out the type definitions without adding any compatibility helpers. Typescript only does tricky stuff in compilation when you both use new JS features and set old JS engines as the compilation target. (Well, Typescript also does some minor syntax transforms to make objects out of As a test, I converted static-interval-tree.js to Typescript in the most minimal way (adding (Well it is true though that writing directly in Typescript would provide strong encouragement to use the ES6 |
It's not so much TS I am afraid of but rather ES5 transpilation (by Babel typically). I have encountered many ES6->ES5 shims that would alter performance in a significant way (spread operator thingy and class polyfills typically). But keep in mind this was the case some years ago. I am sure it has improved now, but I did not check again lately. In any case, rewriting the whole codebase in modern TS/JS would be quite costly to do and I currently have zero incentive to do so personally. |
I'd like to add some jsdoc to the ts.d files to improve the experience using vscode. I am happy to submit a pull request with your permission.
The text was updated successfully, but these errors were encountered: