dsherret / dsherret/ts-morph

How to get arguments info from CallExpression?

Open
#1,377 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

I have a bit of code like:
```
Example({
test(ctx) {
function abc(){}
abc()
return ctx.request;
}
});
```
I want to get this call expression's detail, for example, whether it has arguments, number of arguments and arguments type.

How can I get these info?

Contributor guide

Open the contributing guide

Research direction

Start at the CallExpression entry point and read the ts-morph API documentation for inspecting calls and their arguments. Determine how the example call can expose whether arguments exist, their count, and their types; done means providing a clear, supported usage example or documenting any missing API.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.