Update parseInt parameter name and jsdoc (#42756)

* feat(lib): improve parseInt type definition and docstring

* Accepted baselines

* update tests
This commit is contained in:
Sang
2021-03-06 06:23:08 +11:00
committed by GitHub
parent 25375a2213
commit 612a96e161
10 changed files with 78 additions and 78 deletions

View File

@@ -248,8 +248,8 @@ interface NumberConstructor {
/**
* Converts A string to an integer.
* @param s A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* @param string A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/

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

@@ -13,12 +13,12 @@ declare function eval(x: string): any;
/**
* Converts a string to an integer.
* @param s A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
* @param string A string to convert into a number.
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/
declare function parseInt(s: string, radix?: number): number;
declare function parseInt(string: string, radix?: number): number;
/**
* Converts a string to a floating-point number.