Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typings for Network Information API #27186

Closed
2 of 4 tasks
aneeven opened this issue Sep 18, 2018 · 6 comments
Closed
2 of 4 tasks

Typings for Network Information API #27186

aneeven opened this issue Sep 18, 2018 · 6 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@aneeven
Copy link

aneeven commented Sep 18, 2018

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:

  • This wouldn't be a breaking change in existing TypeScript / JavaScript code
  • 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

@aneeven
Copy link
Author

aneeven commented Sep 27, 2018

Any news on my proposal? :)

@RyanCavanaugh RyanCavanaugh added the Question An issue which isn't directly actionable in code label Oct 1, 2018
@RyanCavanaugh
Copy link
Member

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

@lacolaco
Copy link

@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

@eliasm307
Copy link

@RyanCavanaugh are these APIs still classed as experimental? MDN has put a "living standard" status on these now

@TeoAvignon
Copy link

It would be really nice to have an official solution !

@blixt
Copy link

blixt commented Jun 4, 2024

It looks like navigator.connection and NetworkInterface was introduced to TypeScript (in 9ebe11c/v4.4, after which the repo mentioned above was deprecated) but removed again a year later in 6004b35/v4.8.

The value is available to more than 75% of web users according to Can I use, so I expected it to stick around. Will it make a comeback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

6 participants