microsoft / TypeScript-DOM-lib-generator

Tool for generating dom related TypeScript and JavaScript library files
Apache License 2.0
600 stars 417 forks source link

Why is `window.opener` still typed as any? #1418

Open nyonson opened 1 year ago

nyonson commented 1 year ago

I see that https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/975 was merged quite a while back, but I can't for the life of me figure out why window.opener still has type any.

saschanaz commented 1 year ago

Looking at https://github.com/microsoft/TypeScript-DOM-lib-generator/commits/main/inputfiles/overridingTypes.json, it seems that the commit was lost while merging. Now git blame does not even show that commit.

This could be fixed in the spec level though: https://github.com/whatwg/html/issues/8263

saschanaz commented 1 year ago

Actually all browsers allows custom objects in window.opener. https://github.com/whatwg/html/issues/8263#issuecomment-1288155236

Not sure what to do, keeping it is probably the safest option I guess.