mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
lodash: signatures of the method _.random changed
This commit is contained in:
+24
-12
@@ -3157,20 +3157,32 @@ module TestInRange {
|
||||
|
||||
// _.random
|
||||
module TestRandom {
|
||||
let result: number;
|
||||
{
|
||||
let result: number;
|
||||
|
||||
result = _.random();
|
||||
result = _.random(1);
|
||||
result = _.random(1, 2);
|
||||
result = _.random(1, 2, true);
|
||||
result = _.random(1, true);
|
||||
result = _.random(true);
|
||||
result = _.random();
|
||||
result = _.random(1);
|
||||
result = _.random(1, 2);
|
||||
result = _.random(1, 2, true);
|
||||
result = _.random(1, true);
|
||||
result = _.random(true);
|
||||
|
||||
result = _(1).random();
|
||||
result = _(1).random(2);
|
||||
result = _(1).random(2, true);
|
||||
result = _(1).random(true);
|
||||
result = _(true).random();
|
||||
result = _(1).random();
|
||||
result = _(1).random(2);
|
||||
result = _(1).random(2, true);
|
||||
result = _(1).random(true);
|
||||
result = _(true).random();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<number>;
|
||||
|
||||
result = _(1).chain().random();
|
||||
result = _(1).chain().random(2);
|
||||
result = _(1).chain().random(2, true);
|
||||
result = _(1).chain().random(true);
|
||||
result = _(true).chain().random();
|
||||
}
|
||||
}
|
||||
|
||||
/*********
|
||||
|
||||
Vendored
+15
@@ -7835,6 +7835,21 @@ declare module _ {
|
||||
random(floating?: boolean): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(
|
||||
max?: number,
|
||||
floating?: boolean
|
||||
): LoDashExplicitWrapper<number>;
|
||||
|
||||
/**
|
||||
* @see _.random
|
||||
*/
|
||||
random(floating?: boolean): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
/**********
|
||||
* Object *
|
||||
**********/
|
||||
|
||||
Reference in New Issue
Block a user