Skip to content

Commit

Permalink
docs(transloco-locale): add sign display number format option (#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccosmincc authored Aug 1, 2023
1 parent 781a6d3 commit 8270080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/docs/plugins/locale.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Note the format option of the global, locale's format and the one's being passed
- `maximumFractionDigits`- The maximum number of fraction digits to use. Possible values are from 0 to 20 (default is 3).
- `minimumSignificantDigits`- The minimum number of significant digits to use. Possible values are from 1 to 21 (default is 1).
- `maximumSignificantDigits`- The maximum number of significant digits to use. Possible values are from 1 to 21 (default is 21).
- `signDisplay`- When to display the sign for the number. Possible values are "auto", "always", "exceptZero", "negative", "never" (default is "auto").

## Date Format Options

Expand Down
6 changes: 5 additions & 1 deletion libs/transloco-locale/src/lib/transloco-locale.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export interface NumberFormatOptions {
/**
* The maximum number of significant digits to use. Possible values are from 1 to 21
*/
maximumSignificantDigits?: number;
maximumSignificantDigits?: Intl.NumberFormatOptions['maximumSignificantDigits'];
/**
* When to display the sign for the number. Possible values are "auto", "always", "exceptZero", "negative", "never"; the default is "auto".
*/
signDisplay?: Intl.NumberFormatOptions['signDisplay'];
}

/**
Expand Down

0 comments on commit 8270080

Please sign in to comment.