Skip to content

Commit 68f8b62

Browse files
[0.7.x] Export the Form type (#121)
* Exports the Form type as PrecognitionForm. * Export form across all packages --------- Co-authored-by: Tim MacDonald <[email protected]>
1 parent 37069f8 commit 68f8b62

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/alpine/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { client, Config, createValidator, RequestMethod, resolveName, toSimpleVa
33
import { cloneDeep, get, set } from 'lodash-es'
44
import { Form } from './types.js'
55

6-
export { client }
6+
export { client, Form }
77

88
export default function (Alpine: TAlpine) {
99
Alpine.magic('form', (el) => <Data extends Record<string, unknown>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), inputs: Data, config: ValidationConfig = {}): Data & Form<Data> => {

packages/react-inertia/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { VisitOptions } from '@inertiajs/core'
55
import { useRef } from 'react'
66
import { Form, FormDataConvertible } from './types'
77

8-
export { client }
8+
export { client, Form }
99

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

packages/react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cloneDeep, get, set } from 'lodash-es'
33
import { useRef, useState } from 'react'
44
import { Form } from './types.js'
55

6-
export { client }
6+
export { client, Form }
77

88
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), input: Data, config: ValidationConfig = {}): Form<Data> => {
99
/**

packages/vue-inertia/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { VisitOptions } from '@inertiajs/core'
55
import { watchEffect } from 'vue'
66
import { Form, FormDataConvertible } from './types'
77

8-
export { client }
8+
export { client, Form }
99

1010
export const useForm = <Data extends Record<string, FormDataConvertible>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), inputs: Data | (() => Data), config: ValidationConfig = {}): Form<Data> => {
1111
/**

packages/vue/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Form } from './types.js'
33
import { reactive, ref, toRaw } from 'vue'
44
import { cloneDeep, get, set } from 'lodash-es'
55

6-
export { client }
6+
export { client, Form }
77

88
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod | (() => RequestMethod), url: string | (() => string), inputs: Data | (() => Data), config: ValidationConfig = {}): Data & Form<Data> => {
99
/**

0 commit comments

Comments
 (0)