mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(Form): improve validate path type (#1370)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
4
src/runtime/types/form.d.ts
vendored
4
src/runtime/types/form.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user