Ask Your Question
1

Is it possible to obtain a type dependency tree using the Typescript compiler?

asked 2022-08-30 11:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-11-21 05:00:00 +0000

ladyg gravatar image

Yes, the TypeScript compiler can generate an Abstract Syntax Tree (AST) for a TypeScript program, which includes information on the type dependencies in the program. However, obtaining a type dependency tree may require additional analysis and processing of the AST. Tools like tsquery and ts-morph can be used to traverse the AST and extract type information such as dependencies between classes and interfaces.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2022-08-30 11:00:00 +0000

Seen: 10 times

Last updated: Nov 21 '21