Skip to content

Commit 2e93156

Browse files
authored
Fix types in Svelte adapter (#2005)
* Export ResolvedComponent type * Make setup callback optional for when in SSR mode
1 parent 39f6877 commit 2e93156

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/svelte/src/createInertiaApp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type AppComponent = ComponentType<App> & { render: () => SvelteRenderResult }
1212
interface CreateInertiaAppProps {
1313
id?: string
1414
resolve: ComponentResolver
15-
setup: (props: {
15+
setup?: (props: {
1616
el: Element
1717
App: ComponentType<App>
1818
props: {

packages/svelte/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export { default as createInertiaApp } from './createInertiaApp'
44
export { default as inertia } from './link'
55
export { default as page } from './page'
66
export { default as remember } from './remember'
7+
export { type ResolvedComponent } from './types'
78
export { default as useForm, type InertiaForm, type InertiaFormProps } from './useForm'

0 commit comments

Comments
 (0)