Skip to content

--downlevelIteration errors should mention using later targets #28086

@DanielRosenwasser

Description

@DanielRosenwasser
// @ts-check
class Foo {
  constructor(...args) {}
}
function makeFoo() {
  return new Foo(...arguments)
}

Actual

Type 'IArguments' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.

Expected

Type 'IArguments' is not an array type. Either use the '--downlevelIteration' compiler option to allow iterating on iterators, or set the '--target' option to 'es2015' or above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Error MessagesThe issue relates to error messagingExperience EnhancementNoncontroversial enhancementsFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions