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

fix(types): fix FilterPredicate type #123

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Sep 5, 2024

This changes the type of FilterPredicate so that it aligns with reality.


Background: the filter param to iterator(filter) was not being called with [Node, number, Node[]] as per the FilterPredicate type, but rather [{node: Node, parent?: Node, phase: TraversalPhase}, number, {node: Node, parent?: Node, phase: TraversalPhase}[]].

This changes the type to match what it's actually called with. Changing the function to match the type would be a breaking change (and probably kind of weird to implement).

This changes the type of `FilterPredicate` so that it aligns with reality.
@boneskull boneskull changed the title fix(iterator): fix FilterPredicate fix(types): fix FilterPredicate type Sep 5, 2024
Copy link
Collaborator

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@nzakas nzakas merged commit f082d92 into humanwhocodes:main Sep 6, 2024
14 checks passed
@github-actions github-actions bot mentioned this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants