Skip to content

NumberFormatOptions is missing currencySign option #40622

Closed

Description

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 TypeScript

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions