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

iAPI: Make storePart argument optional in overloads #1

Merged

Conversation

luisherranz
Copy link
Collaborator

@luisherranz luisherranz commented Feb 18, 2025

What?

When I made the improvements to the types in pull request #64577, I forgot to consider the possibility of typing the store, but not passing a store part.

Required when some WooCommerce blocks need to get the state of the woocommerce store, like this one.

Why?

Because sometimes you want to use store to get the state and actions of an external store. And in that case, you don't want to pass any store part.

const otherStore = store<OtherStoreTypes>( 'other-store' );

How?

Simply making storePart optional when passing the full types.

@luisherranz luisherranz self-assigned this Feb 18, 2025
@luisherranz luisherranz changed the base branch from trunk to interactivity-api February 18, 2025 09:59
Copy link

github-actions bot commented Feb 18, 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: luisherranz <[email protected]>
Co-authored-by: SantosGuillamot <[email protected]>
Co-authored-by: DAreRodz <[email protected]>

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

Copy link
Collaborator

@SantosGuillamot SantosGuillamot left a comment

Choose a reason for hiding this comment

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

Looks good to me 🙂

Copy link
Collaborator

@DAreRodz DAreRodz left a comment

Choose a reason for hiding this comment

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

LGTM!

@luisherranz luisherranz merged commit 116aad9 into interactivity-api Feb 18, 2025
65 checks passed
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.

3 participants