镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[3.5.1] Iterable is missing in lib.es2015.promise.d.ts #31722

Description

@Rouden

TypeScript Version:

  • 3.5.1
  • 3.6.0-dev.20190601

Search Terms: async, await, polyfill, csproj, TypeScriptLib

Code

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "none",
    "lib": ["dom", "es5", "es2015.promise"],
    "strict": true,
  }
}

a.ts

// empty

Expected behavior:

> npx typescript@3.4.5
// ok

Actual behavior:

> npx typescript@3.5.1
../path/typescript/lib/lib.es2015.promise.d.ts:129:21 - error TS2304: Cannot find name 'Iterable'.

129     race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
                        ~~~~~~~~


Found 1 error.

Playground Link: None

Related Issues: Not found.

Workaround:
Add "es2015.iterable" to lib

Activity

  1. SpurYang commented on Jun 4, 2019

    @SpurYang

    Me too, miss
    /// <
    reference lib="es2015.symbol"

  2. simonua commented on Jul 10, 2019

    @simonua

    Does this relate to #31676?

  3. SergioMorchon commented on Aug 1, 2019

    @SergioMorchon

    Any news on this?

  4. simonua commented on Aug 1, 2019

    @simonua

    3.5.3 exhibited the same problem for me. I have our TypeScript dependencies locked at 3.4.5 and cannot go higher at this time.

  5. SergioMorchon commented on Aug 2, 2019

    @SergioMorchon

    pushkin- nope, with 3.5.3 shows the same error:

    node_modules/typescript/lib/lib.es2015.promise.d.ts:129:21 - error TS2304: Cannot find name 'Iterable'

  6. SergioMorchon commented on Aug 19, 2019

    @SergioMorchon

    Ron Buckton (@rbuckton) any news on this? What do you recommend to bypass this issue to start using newer TypeScript versions?

  7. CervEdin commented on Mar 12, 2020

    @CervEdin

    This workaround appears to work

    Workaround is to add es2015.iterable to lib

    headintheclouddev/typings-suitescript-2.0#121 (comment)

    Unfortunately this ads typings for additional ES2015 iterable features

  8. rbuckton commented on Mar 21, 2020

    @rbuckton
    Contributor

    Fixed by #35998.

  9. rbuckton commented on Mar 25, 2020

    @rbuckton
    Contributor

    We are pushing awaited until after TS3.9 while we continue to assess the impact of the change. While this means we are essentially reverting #35998 with #37610, #37610 leaves in place the change that addressed this issue.

  10. 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 TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions