Skip to content

fix(es5): fix parseInt and parseFloat input type #50829

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

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions lib/lib.es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ declare function eval(x: string): any;

/**
* Converts a string to an integer.
* @param string A string to convert into a number.
* @param value A string or number to convert into an integer.
* @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(string: string, radix?: number): number;
declare function parseInt(value: string | String | number | Number, radix?: number): number;

/**
* Converts a string to a floating-point number.
* @param string A string that contains a floating-point number.
* Converts a string or number into a floating-point number.
* @param value A string or number that contains a number.
*/
declare function parseFloat(string: string): number;
declare function parseFloat(value: string | String | number | Number): number;

/**
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
Expand Down