Skip to content

Commit fcf8662

Browse files
Adds missing DOM.Iterable (elastic#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.
1 parent 2f27ccf commit fcf8662

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tsconfig.base.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"lib": [
3232
"esnext",
3333
// includes support for browser APIs
34-
"dom"
34+
"dom",
35+
"DOM.Iterable"
3536
],
3637
// Node 8 should support everything output by esnext, we override this
3738
// in webpack with loader-level compiler options

0 commit comments

Comments
 (0)