Skip to content

wordcount: fix count function signature to make userSettings parameter optional #71106

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

Merged

Conversation

Adi-ty
Copy link
Contributor

@Adi-ty Adi-ty commented Aug 7, 2025

What?

Part of #67691
Makes the userSettings parameter optional in the count function to maintain backward compatibility after TypeScript migration.

Why?

After the TypeScript migration in #70501 , the userSettings parameter was incorrectly marked as required, breaking backward compatibility. This parameter was historically optional and should remain so.

How?

Made userSettings parameter optional

Copy link

github-actions bot commented Aug 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Adi-ty <iamadisingh@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Adi-ty Adi-ty changed the title fix: make wordcount count function userSettings parameter to be optional Make wordcount count function userSettings parameter to be optional Aug 7, 2025
@Mamaduka Mamaduka added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 7, 2025
Copy link
Member

@manzoorwanijk manzoorwanijk left a comment

Choose a reason for hiding this comment

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

Thanks

@manzoorwanijk manzoorwanijk changed the title Make wordcount count function userSettings parameter to be optional wordcount: fix count function signature to make userSettings parameter optional Aug 7, 2025
@manzoorwanijk manzoorwanijk enabled auto-merge (squash) August 7, 2025 07:44
@manzoorwanijk manzoorwanijk self-assigned this Aug 7, 2025
@manzoorwanijk manzoorwanijk merged commit 95fa665 into WordPress:trunk Aug 7, 2025
71 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.4 milestone Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants