Skip to content

Commit

Permalink
Merge pull request #73 from Milly/deprecate-isObject-strict
Browse files Browse the repository at this point in the history
👍 Add @deprecated to `isObjectOf()` that with `options.strict`
  • Loading branch information
lambdalisue authored Apr 13, 2024
2 parents ec8f83e + 67e2be0 commit b89d255
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,21 @@ type IsMapOfMetadata = {
* const _: { a: number; b: string; c?: boolean | undefined } = a;
* }
* ```
*
* The `option.strict` is deprecated. Use `isStrictOf()` instead.
*/
export function isObjectOf<
T extends Record<PropertyKey, Predicate<unknown>>,
>(
predObj: T,
): Predicate<ObjectOf<T>> & WithMetadata<IsObjectOfMetadata>;
/**
* @deprecated The `option.strict` is deprecated. Use `isStrictOf()` instead.
*/
export function isObjectOf<
T extends Record<PropertyKey, Predicate<unknown>>,
>(
predObj: T,
options: { strict?: boolean },
): Predicate<ObjectOf<T>> & WithMetadata<IsObjectOfMetadata>;
export function isObjectOf<
T extends Record<PropertyKey, Predicate<unknown>>,
>(
Expand Down

0 comments on commit b89d255

Please sign in to comment.