Skip to content

Commit 69bda95

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent c2ae3b0 commit 69bda95

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

types/form.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { AxiosInstance, AxiosResponse } from 'axios'
22

3-
export type FormData = {
3+
export type FormDataPayload = {
44
[key: string]: any;
55
}
66

@@ -12,7 +12,7 @@ type FormOptions = {
1212
}
1313

1414
export declare type Form = {
15-
create: (data?: FormData) => Form;
15+
create: (data?: FormDataPayload) => Form;
1616

1717
processing: boolean;
1818
successful: boolean;
@@ -33,16 +33,16 @@ export declare type Form = {
3333
hasFilesDeep: (object: any | any[]) => boolean;
3434

3535
clear: () => void;
36-
data: () => FormData;
37-
only: (fields: any[]) => FormData;
38-
populate: (data: FormData) => Form;
36+
data: () => FormDataPayload;
37+
only: (fields: any[]) => FormDataPayload;
38+
populate: (data: FormDataPayload) => Form;
3939
reset: () => void;
40-
setInitialValues: (values: FormData) => void;
40+
setInitialValues: (values: FormDataPayload) => void;
4141

4242
onFail: (error: AxiosResponse) => void;
4343
onSuccess: (data: any) => void;
4444

45-
withData: (data: FormData) => Form;
45+
withData: (data: FormDataPayload) => Form;
4646
withErrors: (errors: ErrorCollection) => Form;
4747
withOptions: (options: FormOptions) => Form;
4848

@@ -63,4 +63,4 @@ export declare type Errors = {
6363
get: (field: string) => string[];
6464
has: (field: string) => boolean;
6565
record: (errors?: ErrorCollection) => void;
66-
}
66+
}

0 commit comments

Comments
 (0)