Skip to content

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

Description

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": [
    "**/*"
  ]

}

Activity

  1. MKRhere commented on Mar 30, 2020

    @MKRhere

    Internet Exploder

    I hope that's intentional, and here's your upvote. You also have my sympathy.

  2. ststeiger commented on Mar 30, 2020

    @ststeiger
    Author

    Muthu Kumar (@MKRhere): It is, and thanks ;)

  3. rbuckton commented on Dec 16, 2020

    @rbuckton
    Contributor

    This was fixed in #35998 (when we introduced awaited), and was kept in #37610 (when we reverted awaited), and has been fixed since 3.9.

  4. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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