Skip to content

Commit

Permalink
[1.x] Export InertiaFormProps in Vue and Svelte Adapters (#1734)
Browse files Browse the repository at this point in the history
* Export Vue's InertiaFormProps

* Export Svelte InertiaFormProps

* Export types from index.ts

---------

Co-authored-by: Pedro Borges <oi@pedroborg.es>
  • Loading branch information
Spice-King and pedroborges authored Sep 26, 2024
1 parent 700f369 commit 46a74a5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/svelte/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export { default as createInertiaApp } from './createInertiaApp'
export { default as inertia } from './link'
export { default as page } from './page'
export { default as remember } from './remember'
export { default as useForm, type InertiaForm } from './useForm'
export { type InertiaFormProps, type InertiaForm, default as useForm } from './useForm'
2 changes: 1 addition & 1 deletion packages/svelte/src/lib/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { writable, type Writable } from 'svelte/store'

type FormDataType = Record<string, FormDataConvertible>

interface InertiaFormProps<TForm extends FormDataType> {
export interface InertiaFormProps<TForm extends FormDataType> {
isDirty: boolean
errors: Partial<Record<keyof TForm, string>>
hasErrors: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/vue2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export { default as createInertiaApp } from './createInertiaApp'
export { default as Head } from './head'
export { InertiaLinkProps, default as Link } from './link'
export * from './types'
export { InertiaForm, default as useForm } from './useForm'
export { InertiaFormProps, InertiaForm, default as useForm } from './useForm'
2 changes: 1 addition & 1 deletion packages/vue2/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { reactive, watch } from 'vue'

type FormDataType = object

interface InertiaFormProps<TForm extends FormDataType> {
export interface InertiaFormProps<TForm extends FormDataType> {
isDirty: boolean
errors: Record<keyof TForm, string>
hasErrors: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/vue3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export { default as createInertiaApp } from './createInertiaApp'
export { default as Head } from './head'
export { InertiaLinkProps, default as Link } from './link'
export * from './types'
export { InertiaForm, default as useForm } from './useForm'
export { InertiaFormProps, InertiaForm, default as useForm } from './useForm'
export { default as useRemember } from './useRemember'
2 changes: 1 addition & 1 deletion packages/vue3/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { reactive, watch } from 'vue'

type FormDataType = object

interface InertiaFormProps<TForm extends FormDataType> {
export interface InertiaFormProps<TForm extends FormDataType> {
isDirty: boolean
errors: Partial<Record<keyof TForm, string>>
hasErrors: boolean
Expand Down

0 comments on commit 46a74a5

Please sign in to comment.