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
[react-dom] Update types for latest state of Float #66896
[react-dom] Update types for latest state of Float #66896
Conversation
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. react-dom (unpkg)was missing the following properties:
|
@eps1lon 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": 66896,
"author": "eps1lon",
"headCommitOid": "20aff78030b143e9bf74a3768b2e71044f1118ed",
"mergeBaseOid": "98e68ce4add1e1fc4aad17402ae8eaab9ca15088",
"lastPushDate": "2023-10-02T12:59:44.000Z",
"lastActivityDate": "2023-10-04T18:42:34.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react-dom",
"kind": "edit",
"files": [
{
"path": "types/react-dom/canary.d.ts",
"kind": "definition"
},
{
"path": "types/react-dom/test/canary-tests.tsx",
"kind": "test"
}
],
"owners": [
"MartynasZilinskas",
"theruther4d",
"Jessidhia",
"eps1lon"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "gnoff",
"date": "2023-10-04T18:42:34.000Z",
"isMaintainer": false
},
{
"type": "stale",
"reviewer": "rbuckton",
"date": "2023-10-03T20:02:55.000Z",
"abbrOid": "fd29081"
}
],
"mainBotCommentID": 1743031004,
"ciResult": "pass"
} |
🔔 @MartynasZilinskas @theruther4d @Jessidhia — please review this PR in the next few days. Be sure to explicitly select |
types/react-dom/canary.d.ts
Outdated
} | ||
function preconnect(href: string, options?: PreconnectOptions): void; | ||
|
||
type PreloadAs = "font" | "image" | "script" | "style"; |
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.
Internally we just treat this as a string argument now however what probably make sense in TS is to enumerate all of the known valid as types for preloads
// from: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload#what_types_of_content_can_be_preloaded
audio
document
embed
fetch
object
script
style
track
worker
video
*/ | ||
as: PreloadModuleAs; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
integrity?: string | undefined; |
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.
integrity?: string | undefined; | |
integrity?: string | undefined; | |
nonce?: string | undefined; |
*/ | ||
as?: PreinitModuleAs; | ||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; | ||
integrity?: string | undefined; |
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.
integrity?: string | undefined; | |
integrity?: string | undefined; | |
nonce?: string | undefined; |
@eps1lon 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: Josh Story <josh.c.story@gmail.com>
@rbuckton 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? |
preloadModule
andpreinitModule
facebook/react#27220ReactDOM.preload()
andReactDOM.preinit()
facebook/react#26880ReactDOM.preload()
facebook/react#26940referrerPolicy
option toReactDOM.preload()
facebook/react#27096crossOrigin
@gnoff Could you review this one?