mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
lodash: signatures of the method _.parseInt have been changed
This commit is contained in:
+18
-4
@@ -3879,10 +3879,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 {
|
||||
|
||||
Vendored
+13
-1
@@ -9392,12 +9392,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> {
|
||||
@@ -9407,6 +9412,13 @@ declare module _ {
|
||||
parseInt(radix?: number): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.parseInt
|
||||
*/
|
||||
parseInt(radix?: number): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.repeat
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user