Skip to content

Array.copyWithin() signature is incorrect - Part II #54967

@tchetwin

Description

@tchetwin

Bug Report

In #53334 TypeScript's lib was updated to allow Array#copyWithins 2nd argument start to be optional, to match the MDN documentation at that time.

The MDN documentation has since been updated to match the spec, meaning TypeScript 5.1's types are incorrect.

To remediate: a reversion of #53340 is needed. This might be a slightly breaking change for anyone that adopted TypeScript 5.1 and started (incorrectly) relying on the parameter being optional.

🔎 Search Terms

copyWithin

🕗 Version & Regression Information

  • This changed between versions 5.0 and 5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions