- Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 3.7.x-dev.201xxxxx
Search Terms:
bigint
bigint format
bigint numberformat
Code
console.log((2000n).toLocaleString("fr"));console.log(newIntl.NumberFormat("fr").format(3000n));Expected behavior:
The code runs without errors, and "2 000" and "3 000" is logged to the console.
Actual behavior:
The code fails to compile, with the errors
Expected 0 arguments, but got 1. ts(2554) Argument of type '3000n' is not assignable to parameter of type 'number'. ts(2345) It shouldn't fail. Reference
ECMA Specification
Playground Link:Link
Related Issues:
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this