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): add missing index argument to each/walk callback #289

Merged

Conversation

ybiquitous
Copy link
Contributor

@ybiquitous ybiquitous commented Mar 12, 2024

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:

Closes #249

`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
Copy link
Contributor Author

@ybiquitous ybiquitous Mar 12, 2024

Choose a reason for hiding this comment

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

[note] I added this file to test the .d.ts file, but I can remove the file if unnecessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am fine with it

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can add more tests in future when we need it

ybiquitous added a commit to FloEdelmann/stylelint that referenced this pull request Mar 13, 2024
@alexander-akait alexander-akait merged commit 962d75e into postcss:master Mar 13, 2024
4 checks passed
@ybiquitous ybiquitous deleted the fix-types-for-each-and-walk branch March 13, 2024 13:56
@ybiquitous
Copy link
Contributor Author

Thank you for the quick release! https://github.com/postcss/postcss-selector-parser/releases/tag/v6.0.16

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.

None yet

2 participants