mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of _.isArguments have been changed
This commit is contained in:
+28
-15
@@ -5736,21 +5736,34 @@ module TestGte {
|
||||
}
|
||||
|
||||
// _.isArguments
|
||||
result = <boolean>_.isArguments(any);
|
||||
result = <boolean>_(1).isArguments();
|
||||
result = <boolean>_<any>([]).isArguments();
|
||||
result = <boolean>_({}).isArguments();
|
||||
{
|
||||
let value: IArguments|number = 42;
|
||||
if (_.isArguments(value)) {
|
||||
let length: number = value.length;
|
||||
// compile error
|
||||
// let i: number = value + 1;
|
||||
} else {
|
||||
let i: number = value + 1;
|
||||
// compile error
|
||||
// let length: number = value.length;
|
||||
}
|
||||
module TestisArguments {
|
||||
{
|
||||
let value: number|IArguments;
|
||||
|
||||
if (_.isArguments(value)) {
|
||||
let result: IArguments = value;
|
||||
}
|
||||
else {
|
||||
let result: number = value;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
result = _.isArguments(any);
|
||||
result = _(1).isArguments();
|
||||
result = _<any>([]).isArguments();
|
||||
result = _({}).isArguments();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<boolean>;
|
||||
|
||||
result = _(1).chain().isArguments();
|
||||
result = _<any>([]).chain().isArguments();
|
||||
result = _({}).chain().isArguments();
|
||||
}
|
||||
}
|
||||
|
||||
// _.isArray
|
||||
|
||||
Vendored
+8
@@ -9721,6 +9721,7 @@ declare module _ {
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Checks if value is classified as an arguments object.
|
||||
*
|
||||
* @param value The value to check.
|
||||
* @return Returns true if value is correctly classified, else false.
|
||||
*/
|
||||
@@ -9734,6 +9735,13 @@ declare module _ {
|
||||
isArguments(): boolean;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.isArguments
|
||||
*/
|
||||
isArguments(): LoDashExplicitWrapper<boolean>;
|
||||
}
|
||||
|
||||
//_.isArray
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user