diff --git a/types/lodash/fp.d.ts b/types/lodash/fp.d.ts index 68084f1c8d..c2c983ca6e 100644 --- a/types/lodash/fp.d.ts +++ b/types/lodash/fp.d.ts @@ -1984,7 +1984,7 @@ declare namespace _ { type LodashIsNil = (value: any) => value is null | undefined; type LodashIsNull = (value: any) => value is null; type LodashIsNumber = (value: any) => value is number; - type LodashIsObject = (value: any) => boolean; + type LodashIsObject = (value: any) => value is object; type LodashIsObjectLike = (value: any) => boolean; type LodashIsPlainObject = (value: any) => boolean; type LodashIsRegExp = (value: any) => value is RegExp; diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 64d445c65a..b3b5910401 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -4291,6 +4291,10 @@ fp.now(); // $ExpectType number _(42).isObject(); // $ExpectType boolean _.chain([]).isObject(); // $ExpectType LoDashExplicitWrapper fp.isObject(anything); // $ExpectType boolean + if (fp.isObject(anything)) { + // $ExpectType object + anything + }; } // _.isObjectLike