Skip to content

Commit 2a939e7

Browse files
committed
Update object validator to accept any type
Using `unknown` meant that the validated object would not be indexable because its type would devolve to `{}`
1 parent 9939a54 commit 2a939e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/json/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export const number = {
6868

6969
/** A validator for object fields in schemas. */
7070
export const object = {
71-
validate: isObject,
71+
validate: isObject<any>,
7272
required: true,
73-
} as const satisfies Validator<UnvalidatedObject<unknown>>;
73+
} as const satisfies Validator<UnvalidatedObject<any>>;
7474

7575
/**
7676
* Transforms a validator to be optional, accepting `undefined` or `null` for an

0 commit comments

Comments
 (0)