Skip to content

Cannot find name 'Iterable' when including ES2015.Promise #37680

Closed
@ststeiger

Description

@ststeiger

I've been using Promises (and async) in ES5 with TypeScript.
It used to work fine in TypeScript 3.1
However, after upgrading to TypeScript 3.8.3, I consistently get this error:

Cannot find name 'Iterable'

this sucks.
I can include "ES2015.Iterable", but that doesn't solve the problem.
Some stackoverflow post suggest adding "ES2015.Symbol", but that doesn't help either.
I can also just create an empty test.ts file, and i still get this error, although there is no code at all.
This seems to be a TypeScript issue.
Apparently, I cannot add ES2015.Proxy without adding ES2016.

As soon as I add ES2016, the error goes away.

Problem is, I still need to support Internet Exploder, so I cannot just add ES2016 there, since IE doesn't support it. ES2015.Promise is really all I want, so that I can change the code to async already.

Please fix this annoying bug.

{
  "compileOnSave": true,

  "compilerOptions": {
    "target": "ES5",
    "module": "None", // IE11...
    "lib": [
      "DOM",
      "ES5",
      // "ES2015.Proxy",
      // "ES2015.Iterable",
      "ES2015.Promise"
    ],

    "noImplicitAny": true,
    "noEmitOnError": true,
    "removeComments": true,
    "sourceMap": false,
    "outDir": "../../wwwroot/ts/Leaflet",
    "rootDir": "./",
    "allowUnreachableCode": true
  },
  "exclude": [
    "node_modules",
    "wwwroot"
  ],

  "include": [
    "**/*"
  ]

}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions