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

add childNodesOFType to JSX traversalMethods #415

Merged
merged 1 commit into from Jul 20, 2022

Conversation

j13huang
Copy link
Contributor

I wanted a function to get react children nodes that also works well with typing so that the collection returned will be of a specific JSXElement type (e.g. JSXExpressionContainer)

type defintion would look something like this:

childElements<T>(jsxChildElementType: types.Type<T>): Collection.Collection<T>;

@Daniel15 Daniel15 merged commit 514f8c3 into facebook:main Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants