Skip to content

NumberFormatOptions is missing currencySign option #40622

Closed
@ericregnier

Description

@ericregnier

currencySign is missing from NumberFormatOptions

TypeScript Version: 4.1.0-dev.20200916

Search Terms: NumberFormatOptions notation

Code

const str = new Intl.NumberFormat('en-NZ', { style: 'currency', currency: 'NZD', currencySign: 'accounting' }).format(999999);

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:
Argument of type '{ style: string; currency: string; currencySign: string; }' is not assignable to parameter of type 'NumberFormatOptions'.
Object literal may only specify known properties, and 'currencySign' does not exist in type 'NumberFormatOptions'

Playground Link: None

Related Issues: #36533

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 thisPursuitFellowshipHelp wanted from Pursuit fellowship; others please avoid until Dec 19

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions