Skip to content

Restore navigator.connection DOM typings - #64334

Draft
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-navigator-connection-typings
Draft

Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-navigator-connection-typings

Conversation

Copilot AI commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

navigator.connection is exposed by Chromium-based browsers but was no longer present in the DOM declarations, causing valid DOM code to report TS2339.

const connection = navigator.connection;
  • DOM declarations

    • Restores the NavigatorNetworkInformation mixin on Navigator.
    • Adds NetworkInformation and ConnectionType.
  • Compiler coverage

    • Extends the DOM default-lib regression test to verify navigator.connection resolves as NetworkInformation.
    • Updates affected baselines for the new DOM global.

@typescript-automation typescript-automation Bot added For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 19, 2026
Copilot AI linked an issue Sep 19, 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 19, 2026
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix typings for navigator.connection in TypeScript Restore navigator.connection DOM typings Sep 19, 2026
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.

Typings for navigator.connection gone since TS 4.8

2 participants