-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Closed
Copy link
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.8.3 and Nightly
Search Terms: NumberFormatOptions unit unitDisplay
Code
console.log(new Intl.NumberFormat('en', {
style: 'unit',
unit: 'kilobyte',
unitDisplay: 'short',
}).format(1.5));Expected behavior:
unit and unitDisplay should be usable for NumberFormatOptions.
Actual behavior:
Argument of type '{ style: string; unit: string; }' is not assignable to parameter of type 'NumberFormatOptions'.
Object literal may only specify known properties, and 'unit' does not exist in type 'NumberFormatOptions'.
Related Issues:
BPScott, JonathanWbn and rmsy
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