Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

87
Vistas
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
Responde la pregunta
Encuentra empleos remotos