11export type HTTP_METHODS =
2- | " GET"
3- | " DELETE"
4- | " HEAD"
5- | " OPTIONS"
6- | " POST"
7- | " PUT"
8- | " PATCH"
9- | " PURGE"
10- | " LINK"
11- | " UNLINK"
2+ | ' GET'
3+ | ' DELETE'
4+ | ' HEAD'
5+ | ' OPTIONS'
6+ | ' POST'
7+ | ' PUT'
8+ | ' PATCH'
9+ | ' PURGE'
10+ | ' LINK'
11+ | ' UNLINK'
1212
1313export type FetchContextType = {
1414 clientOnly ?: boolean
@@ -83,15 +83,15 @@ export type FetchContextType = {
8383 ctx : FetchContextType
8484 ) : void
8585 maxCacheAge ?: TimeSpan
86- } & Omit < RequestInit , " body" >
86+ } & Omit < RequestInit , ' body' >
8787
8888export type CacheStoreType = {
8989 get ( k ?: any ) : any
9090 set ( k ?: any , v ?: any ) : any
9191 remove ?( k ?: any ) : any
9292}
9393
94- export type CustomResponse < T > = Omit < Response , " json" > & {
94+ export type CustomResponse < T > = Omit < Response , ' json' > & {
9595 json ( ) : Promise < T >
9696}
9797
@@ -103,7 +103,7 @@ export type RequestWithBody = <R = any, BodyType = any>(
103103 /**
104104 * The request configuration
105105 */
106- reqConfig ?: Omit < RequestInit & FetchConfigType < R , BodyType > , " suspense" > & {
106+ reqConfig ?: Omit < RequestInit & FetchConfigType < R , BodyType > , ' suspense' > & {
107107 /**
108108 * Default value
109109 */
@@ -144,7 +144,7 @@ export type RequestWithBody = <R = any, BodyType = any>(
144144
145145export type TimeSpan =
146146 | number
147- | `${string } ${"ms" | " sec" | " min" | "h" | "d" | "we" | "mo" | "y" } `
147+ | `${string } ${'ms' | ' sec' | ' min' | 'h' | 'd' | 'we' | 'mo' | 'y' } `
148148
149149/**
150150 * An imperative version of the `useFetch` hook
@@ -165,7 +165,7 @@ export type ImperativeFetch = {
165165
166166export type FetchConfigType < FetchDataType = any , BodyType = any > = Omit <
167167 RequestInit ,
168- " body" | " headers"
168+ ' body' | ' headers'
169169> & {
170170 headers ?: any
171171 /**
@@ -219,7 +219,7 @@ export type FetchConfigType<FetchDataType = any, BodyType = any> = Omit<
219219 * @default true
220220 */
221221 memory ?: boolean
222- onSubmit ?: " reset" | ( ( form : HTMLFormElement , data : FormData ) => void )
222+ onSubmit ?: ' reset' | ( ( form : HTMLFormElement , data : FormData ) => void )
223223 /**
224224 * Function to run when request is resolved succesfuly
225225 */
@@ -337,11 +337,11 @@ export type FetchConfigType<FetchDataType = any, BodyType = any> = Omit<
337337 /**
338338 * Will run when the request is sent
339339 */
340- onFetchStart ?: FetchContextType [ " onFetchStart" ]
340+ onFetchStart ?: FetchContextType [ ' onFetchStart' ]
341341 /**
342342 * Will run when the response is received
343343 */
344- onFetchEnd ?: FetchContextType [ " onFetchEnd" ]
344+ onFetchEnd ?: FetchContextType [ ' onFetchEnd' ]
345345 /**
346346 * If `true`, the last resolved value be returned as `data` if the request fails. If `false`, the default value will be returned instead
347347 *
@@ -357,7 +357,7 @@ export type FetchConfigType<FetchDataType = any, BodyType = any> = Omit<
357357// If first argument is a string
358358export type FetchConfigTypeNoUrl < FetchDataType = any , BodyType = any > = Omit <
359359 FetchConfigType < FetchDataType , BodyType > ,
360- " url"
360+ ' url'
361361>
362362
363363/**
0 commit comments