Skip to content

Missing arguments in "toLocaleString" method of ArrayΒ #57603

Closed
@Xing97

Description

@Xing97

πŸ”Ž Search Terms

array toLocaleString arguments locale

πŸ•— Version & Regression Information

  • This is a crash

⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.3.3#code/MYewdgzgLgBAhgJwXAnjAvDA2gIgBICmANkSDAOogJEAmOANDDgISs4C6AUKJCEQQDpSAcwAUiZCgFQQAGRDA4-AMpQEASzBiA5AQjaAlAaA

πŸ’» Code

const array = ["Hello World", "!!!"]
console.log(array.toLocaleString('es'))

πŸ™ Actual behavior

Expected 0 arguments, but got 1.

πŸ™‚ Expected behavior

No error

Additional information about the issue

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString#syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions