-
-
Notifications
You must be signed in to change notification settings - Fork 118
types: Widen util component types to accept all child node content #795
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
Conversation
🦋 Changeset detectedLatest commit: 4cd3d4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
✅ Deploy Preview for preact-signals-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
12b6c65 to
91a2c2d
Compare
|
Size Change: 0 B Total Size: 106 kB ℹ️ View Unchanged
|
| const value = | ||
| typeof props.when === "function" ? props.when() : props.when.value; | ||
| if (!value) return props.fallback || null; | ||
| if (!value) return (props.fallback as JSX.Element) || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the correct approach for React's types? Weird: microsoft/TypeScript#14729
If there's a better way lmk
|
Glad we stumbled upon this. Nice fix! |
16280ee to
4cd3d4a
Compare
Ran into this at work, it'd be nice if you could pass in any
ComponentChild-compatible content for our util components as both their fallbacks & children. At the moment it's a type error:cc @bluetidepro