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 schema plugin option inference #12196

Merged
merged 1 commit into from Aug 3, 2022

Conversation

hasezoey
Copy link
Collaborator

@hasezoey hasezoey commented Aug 2, 2022

Summary

This PR adds types for plugin options to be automatically inferred, if defined, with possibility to overwrite.

This inferring is currently strict, because if it would not be then on the first definition it would just overwrite the inferred type and only intellisense suggestions would remain.

@hasezoey
Copy link
Collaborator Author

hasezoey commented Aug 2, 2022

force pushed to fix lints in one commit

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Works for me 👍 I took a look and it doesn't look like this causes any meaningful performance degradation.

@vkarpov15 vkarpov15 added this to the 6.5.1 milestone Aug 3, 2022
@vkarpov15 vkarpov15 merged commit 67c2e93 into Automattic:master Aug 3, 2022
@hasezoey hasezoey deleted the pluginOptions branch August 4, 2022 09:07
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