Uh oh!
There was an error while loading. Please reload this page.
Update Button props to ensure they correctly type check - #2445
Conversation
🦋 Changeset detectedLatest commit: cc79c6c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
Button props to ensure they correctly type checkUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mattcosta7
commented
Oct 17, 2022
Not sure why canary release seems to fail |
mattcosta7
commented
Oct 19, 2022
I tested the canary build on memex - https://github.com/github/memex/pull/12803 button now properly catches a bunch of type errors that were introduced in that codebase, without any false positives. Feeling pretty confident here |
Uh oh!
There was an error while loading. Please reload this page.
Describe your changes here.
Discussed separately in slack
types for Button were being broadened signficantly because the generic interface exposed by the polymorphic component could not be adequately described by the base
forwardRefimplementation. Using the PolymorphicForwardRefComponent helper, allows the type fidelity to be maintained.I've added a type test to validate a few simple cases, and updated places where the types were incorrect in the codebase (now easily noted as failures to build)
One thing to consider - this might be a breaking change for consumers, even though the api should have been this way already
fixes#1956
Screenshots
Please provide before/after screenshots for any visual changes
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.