Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

193
Vistas
Why is dom and dom.iterable seperate?

In tsconfig.json you can define additional libs, that give you typings for HTML or DOM "libraries"(? I don't know the correct terminology).

I don't understand why dom and dom.iterable are separate. Were they defined in different ecma modules/versions? Can I use them safely?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I suspect it's because iteration (iterables and iterators) weren't added to JavaScript until ES2015, long after TypeScript was well-established. When ES2015 was released, the JavaScript engines in many browsers didn't support iteration (yet),¹ and of course at the time Internet Explorer was still a...thing...that was never going to get new features. So some projects had to target environments that didn't have iteration, so the libs are separate.

Even here in 2022, IE survives in corporate and government installations (although thankfully that's finally changing), and some folks have to target their apps and pages to those environments, so they wouldn't want to use dom.iterable.


¹ ES2015 was the last version of the specification to include significant features that didn't already have implementations in the field. These days, the process that TC39 follows generally doesn't land features in the spec until there are (ideally) a couple of implementations of the feature shipping in the field. Instead, the proposal stays at Stage 3 until that happens, before being moved to Stage 4 by consensus at a TC39 meeting, being added to the editor's draft, and thus being in the next snapshot specification the following June.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda