Interface NumberFormat
interface NumberFormat {
format(value: number | bigint | StringNumericLiteral): string;
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
resolvedOptions(): ResolvedNumberFormatOptions;
}
format(value: number | bigint | StringNumericLiteral): string;
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
resolvedOptions(): ResolvedNumberFormatOptions;
}
Index
Methods
format
- format(value): string
Parameters
- value: number | bigint | StringNumericLiteral
Returns string
formatRange
- format
Range (start, end): string Parameters
- start: number | bigint | StringNumericLiteral
- end: number | bigint | StringNumericLiteral
Returns string
formatRangeToParts
- format
Range (start, end): NumberRangeFormatPart[]To Parts Parameters
- start: number | bigint | StringNumericLiteral
- end: number | bigint | StringNumericLiteral
Returns NumberRangeFormatPart[]
formatToParts
- format
To (value): NumberFormatPart[]Parts Parameters
- value: number | bigint | StringNumericLiteral
Returns NumberFormatPart[]
resolvedOptions
- resolved
Options (): ResolvedNumberFormatOptions Returns ResolvedNumberFormatOptions