Skip to content

Commit

Permalink
fix: Modify the function of the schema argument of parseWithValibot t…
Browse files Browse the repository at this point in the history
…o the correct type (#48)
  • Loading branch information
chimame authored Dec 27, 2024
1 parent 663d2f1 commit 60c2952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { enableTypeCoercion } from "./coercion";
export function parseWithValibot<Schema extends GenericSchema>(
payload: FormData | URLSearchParams,
config: {
schema: Schema | ((intent: string) => Schema);
schema: Schema | ((intent: Intent | null) => Schema);
info?: Pick<
Config<BaseIssue<unknown>>,
"abortEarly" | "abortPipeEarly" | "lang"
Expand All @@ -29,7 +29,7 @@ export function parseWithValibot<Schema extends GenericSchema>(
export function parseWithValibot<Schema extends GenericSchemaAsync>(
payload: FormData | URLSearchParams,
config: {
schema: Schema | ((intent: string) => Schema);
schema: Schema | ((intent: Intent | null) => Schema);
info?: Pick<
Config<BaseIssue<unknown>>,
"abortEarly" | "abortPipeEarly" | "lang"
Expand Down

0 comments on commit 60c2952

Please sign in to comment.