Skip to content

[react-form] Correctly extend FieldProps in RadioGroup#58293

Merged
sandersn merged 1 commit into
DefinitelyTyped:masterfrom
eps1lon:fix/react-fragment/react-form
Jan 20, 2022
Merged

[react-form] Correctly extend FieldProps in RadioGroup#58293
sandersn merged 1 commit into
DefinitelyTyped:masterfrom
eps1lon:fix/react-fragment/react-form

Conversation

@eps1lon
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon commented Jan 18, 2022

We plan to remove {} from ReactFragment since 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

export class RadioGroup
extends React.Component<
FieldProps & { children?: ((props: FieldApi) => RenderReturn) | RenderReturn | undefined }
Omit<FieldProps, 'children'> & { children?: ((props: FieldApi) => RenderReturn) | RenderReturn | undefined }
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Previous intersection only worked because we intersected {} & (props) => RenderReturn.

@eps1lon eps1lon marked this pull request as ready for review January 18, 2022 19:46
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jan 18, 2022

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Only a DT maintainer can approve changes without tests

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": 58293,
  "author": "eps1lon",
  "headCommitOid": "547cdeafe9331adec1a027fcea5fcadbc4c3b5b0",
  "mergeBaseOid": "c609479376c92be2991c6d072a70201f7e225047",
  "lastPushDate": "2022-01-18T19:29:27.000Z",
  "lastActivityDate": "2022-01-18T22:04:00.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "react-form",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-form/v2/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "cameron-mcateer",
        "TiuSh",
        "Toliak"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "Toliak",
      "date": "2022-01-18T22:04:00.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1015777409,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Untested Change This PR does not touch tests label Jan 18, 2022
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @cameron-mcateer @TiuSh @Toliak — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Jan 18, 2022
@sandersn sandersn merged commit 2ddec28 into DefinitelyTyped:master Jan 20, 2022
@eps1lon eps1lon deleted the fix/react-fragment/react-form branch January 20, 2022 06:15
martin-badin pushed a commit to martin-badin/DefinitelyTyped that referenced this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Untested Change This PR does not touch tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants