Skip to content

Update parseInt parameter name and jsdoc #42756

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

Merged
merged 6 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/es2015.core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class AbstractClass {
>this : this
>method : (num: number) => void
>parseInt(str) : number
>parseInt : (s: string, radix?: number) => number
>parseInt : (string: string, radix?: number) => number
>str : string

let val = this.prop.toLowerCase();
Expand Down
6 changes: 3 additions & 3 deletions tests/baselines/reference/completionsCommentsClass.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -191,11 +191,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down
48 changes: 24 additions & 24 deletions tests/baselines/reference/completionsCommentsClassMembers.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -9061,7 +9061,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -9130,11 +9130,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -14051,7 +14051,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -14120,11 +14120,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -22449,7 +22449,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -22518,11 +22518,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -26299,7 +26299,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -26368,11 +26368,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -30149,7 +30149,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -30218,11 +30218,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -33999,7 +33999,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -34068,11 +34068,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -37849,7 +37849,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -37918,11 +37918,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down Expand Up @@ -41699,7 +41699,7 @@
"kind": "punctuation"
},
{
"text": "s",
"text": "string",
"kind": "parameterName"
},
{
Expand Down Expand Up @@ -41768,11 +41768,11 @@
"tags": [
{
"name": "param",
"text": "s A string to convert into a number."
"text": "string A string to convert into a number."
},
{
"name": "param",
"text": "radix A value between 2 and 36 that specifies the base of the number in numString.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
"text": "radix A value between 2 and 36 that specifies the base of the number in `string`.\r\nIf this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\nAll other strings are considered decimal."
}
]
},
Expand Down
Loading