fix(types): add missing index argument to each/walk callback#289
Merged
alexander-akait merged 1 commit intopostcss:masterfrom Mar 13, 2024
Merged
Conversation
`container.each(callback)` and `container.walk(callback)` support the second argument `index` in the `callback` function, but the argument is not reflected on the type definitions. See the API document: - `each`: https://github.com/postcss/postcss-selector-parser/blob/3c072b84259b1966fda4823ee7f7228cabe2a164/API.md?plain=1#L462-L463 - `walk`: https://github.com/postcss/postcss-selector-parser/blob/3c072b84259b1966fda4823ee7f7228cabe2a164/API.md?plain=1#L478-L479
ybiquitous
commented
Mar 12, 2024
Contributor
Author
There was a problem hiding this comment.
[note] I added this file to test the .d.ts file, but I can remove the file if unnecessary.
Collaborator
There was a problem hiding this comment.
I am fine with it
Collaborator
There was a problem hiding this comment.
We can add more tests in future when we need it
alexander-akait
approved these changes
Mar 13, 2024
Contributor
Author
|
Thank you for the quick release! https://github.com/postcss/postcss-selector-parser/releases/tag/v6.0.16 |
This was referenced Sep 7, 2024
This was referenced Sep 12, 2024
This was referenced Sep 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
container.each(callback)andcontainer.walk(callback)support the second argumentindexin thecallbackfunction, but the argument is not reflected on the type definitions.See the API document:
each:postcss-selector-parser/API.md
Lines 462 to 463 in 3c072b8
walk:postcss-selector-parser/API.md
Lines 478 to 479 in 3c072b8
Closes #249