Skip to content

Commit bb270bb

Browse files
authored
Add globals.d.ts file to Playgrounds (#2637)
* Add `globals.d.ts` file to Playgrounds * Update Layout.tsx
1 parent 5fe7eb1 commit bb270bb

File tree

6 files changed

+38
-2
lines changed

6 files changed

+38
-2
lines changed

playgrounds/react/resources/js/Components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Link, usePage } from '@inertiajs/react'
22

33
export default function Layout({ children, padding = true }: { children: React.ReactNode; padding?: boolean }) {
4-
const { appName } = usePage<{ appName: string }>().props
4+
const { appName } = usePage().props
55

66
return (
77
<>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '@inertiajs/core'
2+
3+
declare module '@inertiajs/core' {
4+
export interface InertiaConfig {
5+
sharedPageProps: {
6+
appName: string
7+
}
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '@inertiajs/core'
2+
3+
declare module '@inertiajs/core' {
4+
export interface InertiaConfig {
5+
sharedPageProps: {
6+
appName: string
7+
}
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '@inertiajs/core'
2+
3+
declare module '@inertiajs/core' {
4+
export interface InertiaConfig {
5+
sharedPageProps: {
6+
appName: string
7+
}
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '@inertiajs/core'
2+
3+
declare module '@inertiajs/core' {
4+
export interface InertiaConfig {
5+
sharedPageProps: {
6+
appName: string
7+
}
8+
}
9+
}

playgrounds/vue3/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"noEmit": true,
1212
"skipLibCheck": true
1313
},
14-
"include": ["resources/js/**/*.ts", "resources/js/**/*.d.ts", "src/**/*.vue"]
14+
"include": ["resources/js/**/*.ts", "resources/js/**/*.d.ts", "resources/js/**/*.vue"]
1515
}

0 commit comments

Comments
 (0)