Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get variable statement by a declaration's name #506

Closed
dsherret opened this issue Dec 2, 2018 · 0 comments
Closed

Get variable statement by a declaration's name #506

dsherret opened this issue Dec 2, 2018 · 0 comments

Comments

@dsherret
Copy link
Owner

dsherret commented Dec 2, 2018

Right now I'm having to do this:

const statement = apiModule.getVariableStatementOrThrow(s => s.getDeclarations().some(d => d.getName() === "api"));

But it would be nice if I could just do:

const statement = apiModule.getVariableStatementOrThrow("api");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant