dsherret / dsherret/ts-morph

[Question] query nested nodes

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

Description

Thanks for this great library.

I'm wondering if there is any way to query nested children. If we take the following code:

```ts
someObject.someKey.someMethod()
```

And I want to get a reference to the `someMethod` Identifier. Currently, I need to perform many `for` loops to get this node.

Is there any easy way to do it with your library?

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.