Skip to content

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

@alexander-akait alexander-akait merged commit 962d75e into postcss:master Mar 13, 2024
@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.

2 participants