Skip to content

Commit 626f55c

Browse files
committed
fix: improve the global.d.ts file
1 parent da423bd commit 626f55c

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

resources/js/types/global.d.ts

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
1-
import type { FormDataConvertible, Method, PreserveStateOption, Progress } from '@inertiajs/core';
2-
import { AxiosInstance } from 'axios';
3-
import { route as ziggyRoute } from 'ziggy-js';
1+
import { VisitOptions } from '@inertiajs/core'
2+
import { type AxiosInstance } from 'axios'
3+
import { type route as routeFn } from 'ziggy-js'
44

55
declare global {
66
interface Window {
7-
axios: AxiosInstance;
7+
axios: AxiosInstance
88
}
99

10-
var route: typeof ziggyRoute;
10+
let route: typeof routeFn
1111
}
1212

1313
declare module 'react-aria-components' {
1414
interface RouterConfig {
15-
routerOptions: {
16-
method?: Method;
17-
data?: Record<string, FormDataConvertible>;
18-
replace?: boolean;
19-
preserveState?: PreserveStateOption;
20-
preserveScroll?: PreserveStateOption;
21-
forceFormData?: boolean;
22-
only?: string[];
23-
onBefore?: () => void;
24-
onStart?: () => void;
25-
onProgress?: (progress: Progress) => void;
26-
onCancel?: () => void;
27-
onSuccess?: () => void;
28-
onError?: () => void;
29-
onFinish?: () => void;
30-
};
15+
routerOptions: VisitOptions
3116
}
3217
}

0 commit comments

Comments
 (0)