mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-29 09:55:50 +08:00
Merge pull request #5546 from chrootsu/lodash-isObject
lodash: changed _.isObject() method
This commit is contained in:
@@ -1284,6 +1284,12 @@ result = <boolean>_(1).isNumber();
|
||||
result = <boolean>_<any>([]).isNumber();
|
||||
result = <boolean>_({}).isNumber();
|
||||
|
||||
// _.isObject
|
||||
result = <boolean>_.isObject(any);
|
||||
result = <boolean>_(1).isObject();
|
||||
result = <boolean>_<any>([]).isObject();
|
||||
result = <boolean>_({}).isObject();
|
||||
|
||||
// _.isPlainObject
|
||||
result = <boolean>_.isPlainObject(any);
|
||||
result = <boolean>_(1).isPlainObject();
|
||||
@@ -1522,10 +1528,6 @@ result = <boolean>_(testEqArray).isEqual(testEqOtherArray, testEqCustomizerFn);
|
||||
result = <boolean>_.eq(testEqArray, testEqOtherArray, testEqCustomizerFn);
|
||||
result = <boolean>_(testEqArray).eq(testEqOtherArray, testEqCustomizerFn);
|
||||
|
||||
result = <boolean>_.isObject({});
|
||||
result = <boolean>_.isObject([1, 2, 3]);
|
||||
result = <boolean>_.isObject(1);
|
||||
|
||||
class Stooge {
|
||||
constructor(
|
||||
public name: string,
|
||||
|
||||
29
lodash/lodash.d.ts
vendored
29
lodash/lodash.d.ts
vendored
@@ -6415,6 +6415,24 @@ declare module _ {
|
||||
isNumber(): boolean;
|
||||
}
|
||||
|
||||
//_.isObject
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
interface LoDashWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* see _.isObject
|
||||
*/
|
||||
isObject(): boolean;
|
||||
}
|
||||
|
||||
//_.isPlainObject
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -7215,17 +7233,6 @@ declare module _ {
|
||||
thisArg?: any): boolean;
|
||||
}
|
||||
|
||||
//_.isObject
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* 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 True if the value is an object, else false.
|
||||
**/
|
||||
isObject(value?: any): boolean;
|
||||
}
|
||||
|
||||
//_.keys
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user