Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

88
Views
typescript access experimental features in the Navigator type

I wish to access the Effective connection type in the navigator.

const effectiveConnectionType = navigator.connection?.effectiveType ?? 'n/a'

But typescript tells me that Property 'effectiveType' does not exist on type 'NetworkInformation',

I'm guessing that it is because effectiveType is not fully supported. I would hope that it would have been optional declared (effectiveType?: 'slow-2g' | '2g' | '3g' | '4g') by typescript, but it has not.

I'm seeking good recommendation(s) on how to deal with this?

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs