TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

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

Open nyonson opened this issue 2 years ago • 2 comments

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.

nyonson avatar Oct 21 '22 16:10 nyonson

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 avatar Oct 23 '22 16:10 saschanaz

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.

saschanaz avatar Oct 23 '22 17:10 saschanaz