Skip to content

Commit 2b9787b

Browse files
committed
Refactor global route type
1 parent cea7a0a commit 2b9787b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

resources/js/types/ziggy.d.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import { Router as ZiggyRouter, RouteParams } from 'ziggy-js';
2-
3-
type AppRouter = {
4-
(): ZiggyRouter;
5-
(name: string, params?: RouteParams<typeof name> | undefined, absolute?: boolean): string;
6-
};
1+
import { RouteParams, Router } from 'ziggy-js';
72

83
declare global {
9-
// eslint-disable-next-line no-var
10-
var route: AppRouter;
4+
function route(): Router;
5+
function route(name: string, params?: RouteParams<typeof name> | undefined, absolute?: boolean): string;
116
}

0 commit comments

Comments
 (0)