@azure-net/kit 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RequestErrors } from '../../delivery/schema/index.js';
|
|
2
2
|
import type { AsyncActionResponse } from '../../index.js';
|
|
3
|
-
export interface FormConfig
|
|
4
|
-
initialData?:
|
|
5
|
-
onSuccess?: (
|
|
3
|
+
export interface FormConfig {
|
|
4
|
+
initialData?: unknown;
|
|
5
|
+
onSuccess?: () => Promise<void> | void;
|
|
6
6
|
onError?: () => Promise<void> | void;
|
|
7
7
|
}
|
|
8
8
|
export interface ActiveForm<FormData, Response, Custom> {
|
|
@@ -13,4 +13,4 @@ export interface ActiveForm<FormData, Response, Custom> {
|
|
|
13
13
|
pending: boolean;
|
|
14
14
|
dirty: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare function createActiveForm<Response, FormData, Custom>(onSubmit: (formData: Partial<FormData>) => Promise<AsyncActionResponse<Response, FormData, Custom>>, config?: FormConfig
|
|
16
|
+
export declare function createActiveForm<Response, FormData, Custom>(onSubmit: (formData: Partial<FormData>) => Promise<AsyncActionResponse<Response, FormData, Custom>>, config?: FormConfig): ActiveForm<FormData, Response, Custom>;
|