-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[@types/react-dom] fix: react-dom flushSync types #69241
[@types/react-dom] fix: react-dom flushSync types #69241
Conversation
@2239559319 Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause 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
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": 69241,
"author": "2239559319",
"headCommitOid": "c07523fcd2b090f65dd2e15dc8ec10dafae22510",
"mergeBaseOid": "e5d07ac1d28e211291ff804adcf0d18e0002e72d",
"lastPushDate": "2024-04-02T06:08:16.000Z",
"lastActivityDate": "2024-04-02T09:13:47.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react-dom",
"kind": "edit",
"files": [
{
"path": "types/react-dom/index.d.ts",
"kind": "definition"
},
{
"path": "types/react-dom/test/react-dom-tests.tsx",
"kind": "test"
}
],
"owners": [
"MartynasZilinskas",
"theruther4d",
"Jessidhia",
"eps1lon"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "stale",
"reviewer": "eps1lon",
"date": "2024-04-02T09:13:47.000Z",
"abbrOid": "f62cc2d"
}
],
"mainBotCommentID": 2031147484,
"ciResult": "pass"
} |
🔔 @MartynasZilinskas @theruther4d @Jessidhia @eps1lon — please review this PR in the next few days. Be sure to explicitly select |
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.
Thanks! The original types were motivated the typings of the reconciler instead of the intended usage: #51512
Flow types were updated in facebook/react#21887 which matches the proposed types.
Let's focus on the incorrect second param and then discuss separately if we really need typings for flushSync(): void
@2239559319 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. Thank you! |
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
@eps1lon Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
Thank you! |
Please fill in this template.
pnpm test <package to test>
.Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.If changing an existing definition:
package.json
.If removing a declaration:
notNeededPackages.json
.see ReactDOM.js
ReactFiberWorkLoop.js
Doc has been updated reactjs/react.dev#6730