diff --git a/playgrounds/react/resources/js/Components/Layout.tsx b/playgrounds/react/resources/js/Components/Layout.tsx index 69d7cb70b..ab6363618 100644 --- a/playgrounds/react/resources/js/Components/Layout.tsx +++ b/playgrounds/react/resources/js/Components/Layout.tsx @@ -1,7 +1,7 @@ import { Link, usePage } from '@inertiajs/react' export default function Layout({ children, padding = true }: { children: React.ReactNode; padding?: boolean }) { - const { appName } = usePage<{ appName: string }>().props + const { appName } = usePage().props return ( <> diff --git a/playgrounds/react/resources/js/types/globals.d.ts b/playgrounds/react/resources/js/types/globals.d.ts new file mode 100644 index 000000000..6fbfc877d --- /dev/null +++ b/playgrounds/react/resources/js/types/globals.d.ts @@ -0,0 +1,9 @@ +import '@inertiajs/core' + +declare module '@inertiajs/core' { + export interface InertiaConfig { + sharedPageProps: { + appName: string + } + } +} diff --git a/playgrounds/svelte4/resources/js/types/globals.d.ts b/playgrounds/svelte4/resources/js/types/globals.d.ts new file mode 100644 index 000000000..6fbfc877d --- /dev/null +++ b/playgrounds/svelte4/resources/js/types/globals.d.ts @@ -0,0 +1,9 @@ +import '@inertiajs/core' + +declare module '@inertiajs/core' { + export interface InertiaConfig { + sharedPageProps: { + appName: string + } + } +} diff --git a/playgrounds/svelte5/resources/js/types/globals.d.ts b/playgrounds/svelte5/resources/js/types/globals.d.ts new file mode 100644 index 000000000..6fbfc877d --- /dev/null +++ b/playgrounds/svelte5/resources/js/types/globals.d.ts @@ -0,0 +1,9 @@ +import '@inertiajs/core' + +declare module '@inertiajs/core' { + export interface InertiaConfig { + sharedPageProps: { + appName: string + } + } +} diff --git a/playgrounds/vue3/resources/js/types/globals.d.ts b/playgrounds/vue3/resources/js/types/globals.d.ts new file mode 100644 index 000000000..6fbfc877d --- /dev/null +++ b/playgrounds/vue3/resources/js/types/globals.d.ts @@ -0,0 +1,9 @@ +import '@inertiajs/core' + +declare module '@inertiajs/core' { + export interface InertiaConfig { + sharedPageProps: { + appName: string + } + } +} diff --git a/playgrounds/vue3/tsconfig.json b/playgrounds/vue3/tsconfig.json index 44588fb93..c230de857 100644 --- a/playgrounds/vue3/tsconfig.json +++ b/playgrounds/vue3/tsconfig.json @@ -11,5 +11,5 @@ "noEmit": true, "skipLibCheck": true }, - "include": ["resources/js/**/*.ts", "resources/js/**/*.d.ts", "src/**/*.vue"] + "include": ["resources/js/**/*.ts", "resources/js/**/*.d.ts", "resources/js/**/*.vue"] }