Skip to content

NumberFormatOptions is missing several options including notation #36533

Closed
@benmccann

Description

@benmccann

notation is missing from NumberFormatOptions

interface NumberFormatOptions {

TypeScript Version: 3.7.5

Search Terms: NumberFormatOptions notation

Code

const str = new Intl.NumberFormat(undefined, {notation: 'scientific'}).format(100000);

https://github.com/chartjs/Chart.js/blob/5f24b97bbfff52975c801b0a0b8880b2aa3b0a6a/src/core/core.ticks.js#L57

Expected behavior:

I should be able to use NumberFormat's notation option. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat

Actual behavior:

src/core/core.ticks.js(57,43): error TS2345: Argument of type '{ notation: string; minimumFractionDigits: number; maximumFractionDigits: number; }' is not assignable to parameter of type 'NumberFormatOptions'.

Playground Link: None

Related Issues: None

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