Merge pull request #6567 from chrootsu/lodash-parseInt

lodash: signatures of the method _.parseInt have been changed
This commit is contained in:
Masahiro Wakame
2015-11-02 23:41:21 +09:00
2 changed files with 31 additions and 5 deletions
+18 -4
View File
@@ -4424,10 +4424,24 @@ module TestPadRight {
// _.parseInt
result = <number>_.parseInt('08');
result = <number>_.parseInt('08', 10);
result = <number>_('08').parseInt();
result = <number>_('08').parseInt(10);
module TestParseInt {
{
let result: number;
result = _.parseInt('08');
result = _.parseInt('08', 10);
result = _('08').parseInt();
result = _('08').parseInt(10);
}
{
let result: _.LoDashExplicitWrapper<number>;
result = _('08').chain().parseInt();
result = _('08').chain().parseInt(10);
}
}
// _.repeat
module TestRepeat {
+13 -1
View File
@@ -9902,12 +9902,17 @@ declare module _ {
/**
* Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used
* unless value is a hexadecimal, in which case a radix of 16 is used.
*
* Note: This method aligns with the ES5 implementation of parseInt.
*
* @param string The string to convert.
* @param radix The radix to interpret value by.
* @return Returns the converted integer.
*/
parseInt(string: string, radix?: number): number;
parseInt(
string: string,
radix?: number
): number;
}
interface LoDashImplicitWrapper<T> {
@@ -9917,6 +9922,13 @@ declare module _ {
parseInt(radix?: number): number;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.parseInt
*/
parseInt(radix?: number): LoDashExplicitWrapper<number>;
}
//_.repeat
interface LoDashStatic {
/**