Skip to content

[react] Add support for legacy context in JSXElementConstructor #65566

Merged
eps1lon merged 4 commits into
DefinitelyTyped:masterfrom
eps1lon:fix/react/jsx-element-constructor-legacy-context
May 24, 2023
Merged

[react] Add support for legacy context in JSXElementConstructor #65566
eps1lon merged 4 commits into
DefinitelyTyped:masterfrom
eps1lon:fix/react/jsx-element-constructor-legacy-context

Conversation

@eps1lon

@eps1lon eps1lon commented May 22, 2023

Copy link
Copy Markdown
Collaborator

This matches how we type FunctionComponent today.
We need support for legacy context in JSX.ElementType anyway (see #65135 (comment))
and React.JSXElementConstructor is the designated type for `JSX.ElementType

eps1lon added 3 commits May 22, 2023 19:12
This matches how we type `FunctionComponent` today.
We need support for legacy context in `JSX.ElementType` anyway
and `React.JSXElementConstructor` is the designated type for `JSX.ElementType`
@DangerBotOSS

Copy link
Copy Markdown

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

react (unpkg)

was missing the following properties:

  1. unstable_act

Generated by 🚫 dangerJS against 4383120

@eps1lon eps1lon marked this pull request as ready for review May 22, 2023 19:32
@typescript-bot

typescript-bot commented May 22, 2023

Copy link
Copy Markdown
Contributor

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

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": 65566,
  "author": "eps1lon",
  "headCommitOid": "438312001b593580679db550e0eb48fb860c8e6e",
  "mergeBaseOid": "1c53adb42babc2cc331e3198135c2dc09f9508e5",
  "lastPushDate": "2023-05-22T19:06:21.000Z",
  "lastActivityDate": "2023-05-22T19:32:20.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/test/index.ts",
          "kind": "test"
        },
        {
          "path": "types/react/test/tsx.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/ts5.0/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/ts5.0/test/index.ts",
          "kind": "test"
        },
        {
          "path": "types/react/ts5.0/test/tsx.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan",
        "priyanshurav",
        "Semigradsky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 1557829084,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. labels May 22, 2023
@typescript-bot

Copy link
Copy Markdown
Contributor

@eps1lon

eps1lon commented May 24, 2023

Copy link
Copy Markdown
Collaborator Author

Integrates cleanly and works fine on internal repos. Merging to unblock #65135

@eps1lon eps1lon merged commit 983e3d3 into DefinitelyTyped:master May 24, 2023
@eps1lon eps1lon deleted the fix/react/jsx-element-constructor-legacy-context branch May 24, 2023 14:23
Desplandis pushed a commit to Desplandis/DefinitelyTyped that referenced this pull request Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Critical package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants