dsherret / ts-morph

TypeScript Compiler API wrapper for static analysis and programmatic code changes.

Home Page:https://ts-morph.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is There a ts-morph API Function to Retrieve the Next Property in a Sequence?

jon9090 opened this issue · comments

commented

Apologies, it's not a bug; rather, I have an inquiry.

Is there an API function in ts-morph for retrieving the next property in the sequence foo.bar.baz? Specifically, I am positioned at bar, and I would like to obtain the subsequent property, which in this example is baz but could also be ['baz'].

Currently, I examine the AST tree by checking the parent and child relationships to determine the next property, but I'm curious if ts-morph offers a built-in solution for this.