Skip to content

NumberFormatOptions is missing currencySign option #40622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericregnier opened this issue Sep 17, 2020 · 1 comment · Fixed by #40709
Closed

NumberFormatOptions is missing currencySign option #40622

ericregnier opened this issue Sep 17, 2020 · 1 comment · Fixed by #40709
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19
Milestone

Comments

@ericregnier
Copy link

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

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19 Help Wanted You can do this labels Sep 21, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this PursuitFellowship Help wanted from Pursuit fellowship; others please avoid until Dec 19
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants