lodash: signatures of _.isObject have been changed

This commit is contained in:
Ilya Mochalov
2015-12-18 19:30:50 +05:00
parent 78ba6e4154
commit b0170d9876
2 changed files with 27 additions and 5 deletions
+18 -4
View File
@@ -5657,10 +5657,24 @@ result = <boolean>_({}).isNumber();
}
// _.isObject
result = <boolean>_.isObject(any);
result = <boolean>_(1).isObject();
result = <boolean>_<any>([]).isObject();
result = <boolean>_({}).isObject();
module TestIsObject {
{
let result: boolean;
result = _.isObject(any);
result = _(1).isObject();
result = _<any>([]).isObject();
result = _({}).isObject();
}
{
let result: _.LoDashExplicitWrapper<boolean>;
result = _(1).chain().isObject();
result = _<any>([]).chain().isObject();
result = _({}).chain().isObject();
}
}
// _.isPlainObject
result = <boolean>_.isPlainObject(any);
+9 -1
View File
@@ -9582,9 +9582,10 @@ declare module _ {
/**
* Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0),
* and new String(''))
*
* @param value The value to check.
* @return Returns true if value is an object, else false.
**/
*/
isObject(value?: any): boolean;
}
@@ -9595,6 +9596,13 @@ declare module _ {
isObject(): boolean;
}
interface LoDashExplicitWrapperBase<T, TWrapper> {
/**
* see _.isObject
*/
isObject(): LoDashExplicitWrapper<boolean>;
}
//_.isPlainObject
interface LoDashStatic {
/**