[react-simple-maps] Stricter type for children renderProps#58288
Conversation
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. react-simple-maps (unpkg)was missing the following properties:
|
| } | ||
|
|
||
| export interface GeographiesProps extends React.SVGAttributes<SVGGElement> { | ||
| export interface GeographiesProps extends Omit<React.SVGAttributes<SVGGElement>, 'children'> { |
There was a problem hiding this comment.
Previously we would intersect the renderprops with ReactNode. But there isn't actually a valid intersection unless ReactNode includes {}. Docs only mention renderprops as well:
children | Function
|
@eps1lon Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsThis PR can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 58288,
"author": "eps1lon",
"headCommitOid": "3932958116dce33cfbab86462d955f2ef2e3e43f",
"mergeBaseOid": "c609479376c92be2991c6d072a70201f7e225047",
"lastPushDate": "2022-01-18T19:23:55.000Z",
"lastActivityDate": "2022-01-18T19:37:49.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "react-simple-maps",
"kind": "edit",
"files": [
{
"path": "types/react-simple-maps/index.d.ts",
"kind": "definition"
}
],
"owners": [
"thepocp",
"pronebird",
"komenank"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 1015770403,
"ciResult": "pass"
} |
|
🔔 @thepocp @pronebird @komenank — please review this PR in the next few days. Be sure to explicitly select |
We plan to remove
{}fromReactFragmentsince it's not actually an allowed type for children of host components (e.g.<div>{{}}</div>would throw at runtime) (see #56026 for previous attempts).This change is required to pass #56210