Closed
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: