Adds missing DOM.Iterable (#115218)

## Summary

It was brought to our attention from security solutions that developers found we are missing the iterators and entries and others from TypeScript that are available when you include within `lib` `DOM.iterable`.

For example without it you cannot use `entries` like this:

<img width="985" alt="Screen Shot 2021-10-15 at 9 10 17 AM" src="https://user-images.githubusercontent.com/1151048/137512234-d14dc43c-129a-49d4-bc6c-410baf2d46f7.png">

Until you add it within he base config. Developers are indicating they noticed that workarounds such as lodash or casting is possible but I think this is the wrong direction to go and it's just an oversight that we missed adding the `DOM.iterable` unless someone tells us otherwise. If it is intentional to omit I would like to add docs to the `tsconfig.base.json` about why we omit it for programmers to understand the intention and why we should discourage use or recommend a library such as lodash instead.
This commit is contained in:
Frank Hassanabad 2021-10-18 11:22:49 -06:00 committed by GitHub
parent 2f27ccffbf
commit fcf86628a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,8 @@
"lib": [
"esnext",
// includes support for browser APIs
"dom"
"dom",
"DOM.Iterable"
],
// Node 8 should support everything output by esnext, we override this
// in webpack with loader-level compiler options