[jsdom] Remove DOMWindow Infinity/NaN properties that conflict with numeric index signature#74969
[jsdom] Remove DOMWindow Infinity/NaN properties that conflict with numeric index signature#74969tomquist wants to merge 3 commits into
Conversation
…umeric index signature
|
@tomquist 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 that 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": 74969,
"author": "tomquist",
"headCommitOid": "cb1f46689061e73b62aa694df0b1d5c798a2e9a1",
"mergeBaseOid": "1dfa9e254d666bcd50572ec7d110882a881c3861",
"lastPushDate": "2026-05-08T14:51:29.000Z",
"lastActivityDate": "2026-05-11T21:02:47.000Z",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "jsdom",
"kind": "edit",
"files": [
{
"path": "types/jsdom/index.d.ts",
"kind": "definition"
},
{
"path": "types/jsdom/jsdom-tests.ts",
"kind": "test"
}
],
"owners": [
"leonard-thieu",
"palmfjord",
"ExE-Boss"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "ExE-Boss",
"date": "2026-05-11T21:02:47.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 4407383554,
"ciResult": "pass"
} |
|
🔔 @leonard-thieu @palmfjord @ExE-Boss — please review this PR in the next few days. Be sure to explicitly select |
|
The correct fix would be to change the signature in |
…f removing properties
|
@ExE-Boss 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? |
ExE-Boss
left a comment
There was a problem hiding this comment.
LGTM conditional on updating the title of this PR
Remove
readonly ["Infinity"]: numberandreadonly ["NaN"]: numberfromDOMWindow.These numeric-string literal property names conflict with the
[index: number]: Windownumeric index signature inherited fromWindow(vialib.dom.d.ts), producing TS2411:This has been reported since TypeScript 4.4 (#57467, #57466) and affects anyone using
skipLibCheck: false. TypeScript 7 (tsgo / Corsa) now reports this error consistently — the previous tsc behavior of silently suppressing it was confirmed as a bug by @ahejlsberg, and the tsgo team closed microsoft/typescript-go#3490 as wontfix.Removing the properties is safe:
DOMWindowalready declares[key: string]: any, sowindow["Infinity"]andwindow["NaN"]still resolve toanythrough the string index signature. No type information is lost.Fixes #57467.