Skip to content

Commit e893985

Browse files
committed
Fix makeValidator returning required: boolean
1 parent eb692f8 commit e893985

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/json/index.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,11 @@ function defaultCheck(
6262
return (arg) => ({ unknownKeys: [], invalidKeys: [], valid: validate(arg) });
6363
}
6464

65-
function makeValidator<T>(
66-
validate: (arg: unknown) => arg is T,
67-
required: boolean = true,
68-
) {
65+
function makeValidator<T>(validate: (arg: unknown) => arg is T) {
6966
return {
7067
validate,
7168
check: defaultCheck(validate),
72-
required,
69+
required: true,
7370
} as const satisfies Validator<T>;
7471
}
7572

0 commit comments

Comments
 (0)