Typescript and JSDoc
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 511
- Forks
- 83
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 55
Description
Is your feature request related to a problem? Please describe.
UI5 cli offers a built-in task for generating JSDoc: ui5 build jsdoc
While this works for JS based UI5 projects, this task won't work for a TypeScript project. Here, the TS coding is transformed by babel to JavaScript and the comments are removed. Using now the jsdoc task will result in no JSDoc being generated, as the JS source files in webapp do not contain the needed JSDoc comments. Even when the TS sources contain valid JSDoc comments, no JSDoc artifacts are generated using ui5 tooling.
Describe the solution you'd like
Maybe ui5 tooling can include support for JSDoc in TS files? So that ui5 build jsdoc is able to generate the JSDoc artifacts from the TS source? Or maybe include the usage of typedoc in the docs? In that case, maybe it is better to completely remove support for JSDoc from the ui5 tooling and inform the user to generate it manually in a seperate build step?
Describe alternatives you've considered
Include the JSDoc comments in the TS to JS transformation so the jsdoc works on the generated JS sources. This should not be considered as the doc is for the TS source and might inlcude TS specific information. Also, the documentation should be created for what the developer writes, and not on generated JS files. An alternative is to remove JSDoc from ui5 tooling and let the user generate the docs in a seperate build step (manually or via a build pipeline). Not using JSdoc at all is not an option, as the documentation is an important asset.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the built-in ui5 build jsdoc task and the Babel transformation from TypeScript to JavaScript. Compare the available approaches—processing TypeScript sources, preserving comments, or documenting a separate workflow—and define which supported behavior should produce JSDoc artifacts before implementing or documenting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript, typescript
- Domain
- build-system, documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100