File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import createServer from '@inertiajs/vue3/server';
3
3
import { renderToString } from '@vue/server-renderer' ;
4
4
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers' ;
5
5
import { createSSRApp , DefineComponent , h } from 'vue' ;
6
- import { route , Router } from 'ziggy-js' ;
6
+ import { route , RouteParams , Router } from 'ziggy-js' ;
7
7
8
8
const appName = import . meta. env . VITE_APP_NAME || 'Laravel' ;
9
9
@@ -24,8 +24,8 @@ createServer((page) =>
24
24
25
25
// bind config to ziggyRoute function
26
26
function appRoute ( ) : Router ;
27
- function appRoute ( name : string , params ?: any , absolute ?: boolean ) : string ;
28
- function appRoute ( name ?: string , params ?: any , absolute ?: boolean ) : Router | string {
27
+ function appRoute ( name : string , params ?: RouteParams < typeof name > , absolute ?: boolean ) : string ;
28
+ function appRoute ( name ?: string , params ?: RouteParams < string > , absolute ?: boolean ) : Router | string {
29
29
if ( name === undefined ) {
30
30
return route ( ) ;
31
31
}
Original file line number Diff line number Diff line change 1
- import { Router as ZiggyRouter } from 'ziggy-js' ;
1
+ import { Router as ZiggyRouter , RouteParams } from 'ziggy-js' ;
2
2
3
3
type AppRouter = {
4
4
( ) : ZiggyRouter ;
5
- ( name : string , params ?: any , absolute ?: boolean ) : string ;
5
+ ( name : string , params ?: RouteParams < typeof name > | undefined , absolute ?: boolean ) : string ;
6
6
} ;
7
7
8
8
declare global {
You can’t perform that action at this time.
0 commit comments