Typescript: Typings for Network Information API

Created on 18 Sep 2018  路  3Comments  路  Source: microsoft/TypeScript

Search Terms

  • Network
  • Network Information
  • Network API
  • netinfo

Suggestion

There are no types for the current draft Network Information API yet. Since it already landed in some browsers, I'd like to change that.

Use Cases

For use cases please take a look at MDNs example here.

Checklist

My suggestion meets these guidelines:

  • [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
  • [x] This wouldn't change the runtime behavior of existing JavaScript code
  • [ ] This could be implemented without emitting different JS based on the types of the expressions
  • [ ] This isn't a runtime feature (e.g. new expression-level syntax)

Are you open for a PR?

Cheers

Question

Most helpful comment

@aneeven As a temporary solution, I've created a type definition package. If you still want the types, it may help you. Thanks

https://github.com/lacolaco/network-information-types

All 3 comments

Any news on my proposal? :)

APIs have to leave experimental state before we add them to lib.d.ts.

@aneeven As a temporary solution, I've created a type definition package. If you still want the types, it may help you. Thanks

https://github.com/lacolaco/network-information-types

Was this page helpful?
0 / 5 - 0 ratings