whyboris/TypeScript-Call-Graph

Seems not to be detecting any functions at all?

jteneycke opened this issue · 3 comments

image
image
I've tried this on a few repos passing various argument combos to it ranging from directories and individual files, but it always generates the same graph.

Did you install globally npm install -g typescript-call-graph and then ran tcg * in the directory where you have at least one .ts file?

note this CLI does not handle classes - only functions.

One example you can test is to clone this repository, navigate to it via the terminal, and run tcg * there to see an example. It works because the file has function definitions (see example).

Please let me know if you have any trouble - and if you figure out what was going wrong previously 🤝

@jteneycke - please share an update if you have a response. I'm considering closing this issue 🤔

Hi @whyboris, I'm running into a similar problem.
I tried your suggested test running tcg * and I only get the following prompt:
image

Running tcg **/* results in the same.
Running tcg .\index.ts actually works, but it's not following the imports.
Running tcg .\index.ts .\arc.ts .\cascade.ts .\graphviz.ts .\mermaid.ts .\helper.ts .\extract.ts actually outputs properly.

In my own repo (temporal.io workflows and activities) however no functions are recognized. The idea was to visualize the execution logic of temporal workflows.