Update toFixed/toExponential/toPrecision digit range in docs to match the spec (#63516)

This commit is contained in:
Ievgen Bondarenko
2026-06-04 13:43:55 -07:00
committed by GitHub
parent 2cf042088f
commit 6fbce89821

6
src/lib/es5.d.ts vendored
View File

@@ -547,19 +547,19 @@ interface Number {
/**
* Returns a string representing a number in fixed-point notation.
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive.
*/
toFixed(fractionDigits?: number): string;
/**
* Returns a string containing a number represented in exponential notation.
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive.
*/
toExponential(fractionDigits?: number): string;
/**
* Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
* @param precision Number of significant digits. Must be in the range 1 - 100, inclusive.
*/
toPrecision(precision?: number): string;