UNPKG

use-sync-react

Version:

A package for keep updating the states with more features

30 lines (29 loc) 839 B
export type order = { key: string; action: (arg: any) => any; transformResponse?: (response: any) => any; refetchOnFocus?: boolean; refetchOnline?: boolean; initialSync?: boolean; backgroundSync?: boolean; includedPaths?: string[]; triggerEvents?: (keyof WindowEventMap)[]; options?: fetchOptions; priority?: number; }; export interface fetchOptions { method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; path?: string; params?: Record<string, any>; headers?: HeadersInit; body?: string | FormData | URLSearchParams; mode?: RequestMode; credentials?: RequestCredentials; cache?: RequestCache; redirect?: RequestRedirect; referrer?: string; referrerPolicy?: ReferrerPolicy; integrity?: string; keepalive?: boolean; signal?: AbortSignal; }