Skip to content

Commit

Permalink
Update useForm return type.
Browse files Browse the repository at this point in the history
  • Loading branch information
joelstein authored Dec 11, 2024
1 parent c587c73 commit 6bcec1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-inertia/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { Config, NamedInputEvent, RequestMethod, SimpleValidationErrors, toSimpl
import { useForm as usePrecognitiveForm, client } from 'laravel-precognition-react'
import { useForm as useInertiaForm } from '@inertiajs/react'
import { useRef } from 'react'
import { Form } from './types'

export { client }

export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), inputs: Data, config: ValidationConfig = {}): any => {
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), inputs: Data, config: ValidationConfig = {}): Form<Data> => {
const booted = useRef<boolean>(false)

/**
Expand Down

0 comments on commit 6bcec1a

Please sign in to comment.