Skip to content

Wrong typing for Connection #143

@ajuanjojjj

Description

@ajuanjojjj

Bug Report

Problem

Interface 'Navigator' incorrectly extends interface 'NavigatorNetworkInformation'.
Types of property 'connection' are incompatible.
Property 'dispatchEvent' is missing in type 'Connection' but required in type 'NetworkInformation'.ts(2430)
Also
The types of 'connection.type' are incompatible between these types.
Type 'string' is not assignable to type 'ConnectionType'.

What is expected to happen?

Typescript compilation completes without errors

What does actually happen?

Typescript compilation errors out

Information

None that seemed relevant

Command or Code

tsc

Environment, Platform, Device

Typescript Compilation

Version information

Typescript Version 4.5.4
cordova-plugin-network-information Version 3.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions