Skip to content

Commit

Permalink
fix: typehinting react useForm with interface (inertiajs#2188)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasweiss committed Feb 24, 2025
1 parent fc8e1d4 commit c45606a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useRemember from './useRemember'
type setDataByObject<TForm> = (data: TForm) => void
type setDataByMethod<TForm> = (data: (previousData: TForm) => TForm) => void
type setDataByKeyValuePair<TForm> = <K extends keyof TForm>(key: K, value: TForm[K]) => void
type FormDataType = Record<string, FormDataConvertible>
type FormDataType = Partial<Record<string, FormDataConvertible>>
type FormOptions = Omit<VisitOptions, 'data'>

export interface InertiaFormProps<TForm extends FormDataType> {
Expand Down

0 comments on commit c45606a

Please sign in to comment.