Skip to content

Commit 9478bd3

Browse files
refactor(guardObjectKey): set Obj type default value to object
1 parent 847356a commit 9478bd3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/type/src/guard/lib/guard-object-key.func.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ import { ResultCallback } from '../../type/result-callback.type';
1111
* @returns A `boolean` indicating whether or not the `value` is an `object` of a generic `Obj` containing the `key`.
1212
*/
1313
export const guardObjectKey: GuardObjectKey =
14-
<Obj extends object>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
14+
<Obj = object>(value: Obj, key: keyof Obj | (keyof Obj)[], callback?: ResultCallback): value is Obj =>
1515
isObjectKey<Obj>(value, key, callback);

0 commit comments

Comments
 (0)