Skip to content

Commit b89d255

Browse files
authored
Merge pull request #73 from Milly/deprecate-isObject-strict
👍 Add @deprecated to `isObjectOf()` that with `options.strict`
2 parents ec8f83e + 67e2be0 commit b89d255

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

is.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,9 +1130,21 @@ type IsMapOfMetadata = {
11301130
* const _: { a: number; b: string; c?: boolean | undefined } = a;
11311131
* }
11321132
* ```
1133-
*
1134-
* The `option.strict` is deprecated. Use `isStrictOf()` instead.
11351133
*/
1134+
export function isObjectOf<
1135+
T extends Record<PropertyKey, Predicate<unknown>>,
1136+
>(
1137+
predObj: T,
1138+
): Predicate<ObjectOf<T>> & WithMetadata<IsObjectOfMetadata>;
1139+
/**
1140+
* @deprecated The `option.strict` is deprecated. Use `isStrictOf()` instead.
1141+
*/
1142+
export function isObjectOf<
1143+
T extends Record<PropertyKey, Predicate<unknown>>,
1144+
>(
1145+
predObj: T,
1146+
options: { strict?: boolean },
1147+
): Predicate<ObjectOf<T>> & WithMetadata<IsObjectOfMetadata>;
11361148
export function isObjectOf<
11371149
T extends Record<PropertyKey, Predicate<unknown>>,
11381150
>(

0 commit comments

Comments
 (0)