Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ststeiger opened this issue Mar 30, 2020 · 3 comments
Closed

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

ststeiger opened this issue Mar 30, 2020 · 3 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@ststeiger
Copy link

ststeiger commented Mar 30, 2020

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

}

@MKRhere
Copy link

MKRhere commented Mar 30, 2020

Internet Exploder

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

@ststeiger
Copy link
Author

@MKRhere: It is, and thanks ;)

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Apr 1, 2020
@RyanCavanaugh RyanCavanaugh modified the milestones: Backlog, TypeScript 4.0 Apr 1, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Aug 31, 2020
@rbuckton
Copy link
Member

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.

@rbuckton rbuckton added the Fixed A PR has been merged for this issue label Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

No branches or pull requests

4 participants