Skip to content

[@types/react] Fix error with forwardRef & children#48420

Closed
MrJmpl3 wants to merge 2 commits intomasterfrom
unknown repository
Closed

[@types/react] Fix error with forwardRef & children#48420
MrJmpl3 wants to merge 2 commits intomasterfrom
unknown repository

Conversation

@MrJmpl3
Copy link
Copy Markdown

@MrJmpl3 MrJmpl3 commented Oct 2, 2020

Try to fix: #48419

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • [] Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test YOUR_PACKAGE_NAME.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • Include tests for your changes
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Oct 2, 2020

@MrJmpl3 Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

This PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered adding tests to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.

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.

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": 48420,
  "author": "MrJmpl3",
  "owners": [
    "johnnyreilly",
    "bbenezech",
    "pzavolinsky",
    "digiguru",
    "ericanderson",
    "DovydasNavickas",
    "theruther4d",
    "guilhermehubner",
    "ferdaber",
    "jrakotoharisoa",
    "pascaloliv",
    "hotell",
    "franklixuefei",
    "Jessidhia",
    "saranshkataria",
    "lukyth",
    "eps1lon",
    "zieka",
    "dancerphil",
    "dimitropoulos",
    "disjukr",
    "vhfmag",
    "hellatan"
  ],
  "dangerLevel": "ScopedAndUntested",
  "headCommitAbbrOid": "1e6acbe",
  "headCommitOid": "1e6acbea5b5c559a3b710f043e0ef30be0adc638",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastPushDate": "2020-10-02T02:57:58.000Z",
  "lastCommentDate": "2020-10-02T09:31:47.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48420/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": true,
  "popularityLevel": "Critical",
  "newPackages": [],
  "packages": [
    "react"
  ],
  "files": [
    {
      "path": "types/react/index.d.ts",
      "kind": "definition",
      "package": "react"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-10-02T07:40:08.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": true
}

@typescript-bot
Copy link
Copy Markdown
Contributor

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Oct 2, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@MrJmpl3 The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Oct 2, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #48420 diff
Batch compilation
Memory usage (MiB) 118.3 120.7 +2.0%
Type count 34676 34698 0%
Assignability cache size 8145 8176 0%
Language service
Samples taken 2345 2345 0%
Identifiers in tests 2905 2905 0%
getCompletionsAtPosition
    Mean duration (ms) 308.6 309.4 +0.3%
    Mean CV 8.0% 7.8%
    Worst duration (ms) 1072.7 1091.0 +1.7%
    Worst identifier memoized4Ref props
getQuickInfoAtPosition
    Mean duration (ms) 304.9 305.9 +0.3%
    Mean CV 7.7% 7.7% +0.5%
    Worst duration (ms) 933.0 845.6 -9.4%
    Worst identifier ref props

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Oct 2, 2020
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

We plan to remove implicit children in a future major React release since they are problematic: #33006

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Oct 2, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@MrJmpl3 One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

@MrJmpl3
Copy link
Copy Markdown
Author

MrJmpl3 commented Oct 2, 2020

We plan to remove implicit children in a future major React release since they are problematic: #33006

Oh, the next version is coming soon? If the answer is not, Can be this PR a temporal solution?

@eps1lon
Copy link
Copy Markdown
Collaborator

eps1lon commented Oct 2, 2020

Oh, the next version is coming soon? If the answer is not, Can be this PR a temporal solution?

We want to remove implicit children. This would be a step in the wrong direction i.e. would lead to more breaking changes in the future. Implicit children was a mistake which we don't want to repeat.

@MrJmpl3
Copy link
Copy Markdown
Author

MrJmpl3 commented Oct 3, 2020

Oh, the next version is coming soon? If the answer is not, Can be this PR a temporal solution?

We want to remove implicit children. This would be a step in the wrong direction i.e. would lead to more breaking changes in the future. Implicit children was a mistake which we don't want to repeat.

Ok, I close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Revision needed This PR needs code changes before it can be merged. Untested Change This PR does not touch tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[@types/react] Error with forwardRef & children

3 participants