Are there any tools that can generate a UML class diagram from a project in TypeScript or a similar language?
-
You should really ask 2 questions, one for each language... I doubt the syntax is so similar that one tool would work for both. – MasterScrat Sep 20 '16 at 16:19
-
Please check my answer. – Mouneer Jun 04 '17 at 14:44
2 Answers
For TypeScript:
The ALM TypeScript editor includes this feature: https://github.com/alm-tools/alm/issues/84
However it looks like it only creates diagram for a single class, not a full hierarchical view of the project with inheritance relationships.
Tsviz is another promising project: https://github.com/joaompneves/tsviz
It generates full project diagram. However it looks outdated and doesn't work with recent TypeScript versions. I'm working on an updated fork.

- 7,090
- 14
- 48
- 80
Using UML Diagram feature introduced by IntelliJ Editor by Jetbrains and it works very well with typescript.
Open the Diagram Popup
Go to Settings >>> Search for uml and find the keyboard shortcut for it.
OR
Right Click on a class name >>> Diagrams >>> Show Diagram Popup
Show class properties and methods:
Righ Click on the diagram popup >>> Show Categories >>> Methods or
Properties
Tips

- 12,827
- 2
- 35
- 45
-
-
1@PaulJohnLeonard Please don't be quick to judge. I have just checked the history https://stackoverflow.com/posts/17931892/revisions and you can see that the question title has been updated 2 years after the answer. – Mouneer Mar 14 '23 at 14:49