There could be several reasons why JSDoc does not work properly with *.js files generated from *.ts files:
Typing issues - TypeScript has a static type system that adds type annotations to the code. When the TypeScript is compiled to JavaScript, these type annotations are sometimes lost or transformed, making it difficult for JSDoc to infer types correctly.
Code transformations - TypeScript may perform a variety of code transformations such as changing the structure of classes, introducing interfaces, and converting arrow functions to traditional functions. JSDoc may not be able to pick up these transformations, causing issues with documentation generation.
Missing information - TypeScript also provides additional information beyond what JSDoc offers such as type guards, union types, mapped types, and more. JSDoc may not be able to understand these constructs, leading to incomplete or incorrect documentation.
Overall, the difference between TypeScript and JavaScript can make it difficult for JSDoc to accurately generate documentation. It's important to remember that TypeScript is a superset of JavaScript, so generating TypeScript code from JavaScript may not always be straightforward.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-09-01 11:00:00 +0000
Seen: 13 times
Last updated: Nov 13 '21
How to fix the issue of AngularJS form not being redirected?
Is it feasible to utilize a Toggle Button to switch among multiple classes exceeding 2?
What is the process for generating a dynamic subdomain/URL using vue.js?
How can I create a transition on click using CSS without the need for JavaScript?
How can the style of the loader be modified while the form submission is being processed?
I'm attempting to develop a Javascript-based comments section for my website.