cordova-plugin-network-information icon indicating copy to clipboard operation
cordova-plugin-network-information copied to clipboard

Change Navigator.connection types

Open ajuanjojjj opened this issue 4 years ago • 1 comments

Platforms affected

All typescript projects

Motivation and Context

Fixes "Wrong typing for Connection" (#143)

Description

Adds dispatchEvent() to Navigator.connection Change Connection.type from string to ConnectionType

Testing

Compilating after the changes

Checklist

  • [ ] I've run the tests to see all new and existing tests pass
  • [x] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above
  • [x] I've updated the documentation if necessary

ajuanjojjj avatar Jan 18 '22 10:01 ajuanjojjj

I tried to run the tests with npm test, but seems like there's no .eslintrc file, so eslint fails.

However, given that this is a TypeScript only issue, I'm not sure it'd do anything, even if the fix introduces problems, unless said file included configuration for the eslint-typescript plugin. Nevertheless, i'd be happy to run further tests if needed

ajuanjojjj avatar Jan 18 '22 10:01 ajuanjojjj