Skip to content

Commit

Permalink
fix(Form): improve validate path type (#1370)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
  • Loading branch information
dalirnet and benjamincanac committed Feb 18, 2024
1 parent d4b6147 commit 5266591
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/types/form.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export interface FormErrorWithId extends FormError {
}

export interface Form<T> {
validate(path?: string, opts?: { silent?: true }): Promise<T | false>;
validate(path?: string, opts?: { silent?: false }): Promise<T>;
validate(path?: string | string[], opts?: { silent?: true }): Promise<T | false>;
validate(path?: string | string[], opts?: { silent?: false }): Promise<T>;
clear(path?: string): void
errors: Ref<FormError[]>
setErrors(errs: FormError[], path?: string): void
Expand Down

0 comments on commit 5266591

Please sign in to comment.