fix(Form): extend Form<...> type with HTMLFormElement

This commit is contained in:
Romain Hamel
2024-04-07 13:09:55 +02:00
parent 07a4d13c0f
commit 75a0ac84c9

View File

@@ -9,7 +9,7 @@ export interface FormErrorWithId extends FormError {
id: string
}
export interface Form<T> {
export interface Form<T> extends HTMLFormElement {
validate(path?: string | string[], opts?: { silent?: true }): Promise<T | false>;
validate(path?: string | string[], opts?: { silent?: false }): Promise<T>;
clear(path?: string): void