this has helped me.
in tsconfig, add this :
{
"compilerOptions": {
"lib": [
"es5", "es6", "dom", "dom.iterable"
]
}
}
This is required for tsconfig to know which interfaces to import while transpiling your code.
dom.iterable includes all the interfaces mentioned here : https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.iterable.d.ts
Also thanks to @domlas for mentioning this. I already upvoted his comment so that it is treated as default reason.