Skip to content

Commit

Permalink
fix: improve the global.d.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
irsyadadl committed Oct 17, 2024
1 parent da423bd commit 626f55c
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions resources/js/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
import type { FormDataConvertible, Method, PreserveStateOption, Progress } from '@inertiajs/core';
import { AxiosInstance } from 'axios';
import { route as ziggyRoute } from 'ziggy-js';
import { VisitOptions } from '@inertiajs/core'
import { type AxiosInstance } from 'axios'
import { type route as routeFn } from 'ziggy-js'

declare global {
interface Window {
axios: AxiosInstance;
axios: AxiosInstance
}

var route: typeof ziggyRoute;
let route: typeof routeFn
}

declare module 'react-aria-components' {
interface RouterConfig {
routerOptions: {
method?: Method;
data?: Record<string, FormDataConvertible>;
replace?: boolean;
preserveState?: PreserveStateOption;
preserveScroll?: PreserveStateOption;
forceFormData?: boolean;
only?: string[];
onBefore?: () => void;
onStart?: () => void;
onProgress?: (progress: Progress) => void;
onCancel?: () => void;
onSuccess?: () => void;
onError?: () => void;
onFinish?: () => void;
};
routerOptions: VisitOptions
}
}

0 comments on commit 626f55c

Please sign in to comment.