Skip to content

Type window.opener as nullable WindowProxy - #64212

Closed
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-window-opener-type
Closed

Type window.opener as nullable WindowProxy#64212
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-window-opener-type

Conversation

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

window.opener was declared as any, losing both the opener proxy type and its nullability.

Change

  • Declare Window.opener and global opener as WindowProxy | null.
  • Add a compiler regression test asserting both exact types.
window.opener; // WindowProxy | null

@typescript-automation typescript-automation Bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Sep 9, 2026
Copilot AI linked an issue Sep 9, 2026 that may be closed by this pull request
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 9, 2026
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix window.opener type from any to correct type Type window.opener as nullable WindowProxy Sep 9, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot just remove the test, we don't add tests for trivial DOM changes

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) marked this pull request as ready for review September 9, 2026 17:54
Copilot AI balanced review requested due to automatic review settings September 9, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Copilot just remove the test, we don't add tests for trivial DOM changes

Removed the test and generated baselines in f2801e0c.

@jakebailey

Copy link
Copy Markdown
Member

This is a generated file so I assume this goes to the other repo?

@RyanCavanaugh

Copy link
Copy Markdown
Member

🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

window.opener should not be typed as any

4 participants