File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ async function getFact() {
9
9
next : {
10
10
revalidate : 10 ,
11
11
tags : [ "cat" ] ,
12
- }
12
+ } ,
13
13
} ) ;
14
14
}
15
15
Original file line number Diff line number Diff line change @@ -108,10 +108,12 @@ export type RequestBodyOption<T> =
108
108
: { body : OperationRequestBodyContent < T > } ;
109
109
110
110
export type FetchOptions < T > = RequestOptions < T > &
111
- Omit < RequestInit , "body" | "headers" > & NextJsFetchOptions ;
111
+ Omit < RequestInit , "body" | "headers" > &
112
+ NextJsFetchOptions ;
112
113
113
- export type NextJsFetchOptions =
114
- { next ?: { revalidate ?: false | 0 | number , tags ?: string [ ] } } ;
114
+ export type NextJsFetchOptions = {
115
+ next ?: { revalidate ?: false | 0 | number ; tags ?: string [ ] } ;
116
+ } ;
115
117
116
118
/** This type helper makes the 2nd function param required if params/requestBody are required; otherwise, optional */
117
119
export type MaybeOptionalInit < P extends { } , M extends keyof P > =
Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ export default function createClient(clientOptions) {
98
98
}
99
99
100
100
// fetch!
101
- let response = await fetch ( request , init . next ? { next : init . next } : undefined ) ;
101
+ let response = await fetch (
102
+ request ,
103
+ init . next ? { next : init . next } : undefined ,
104
+ ) ;
102
105
103
106
// middleware (response)
104
107
// execute in reverse-array order (first priority gets last transform)
You can’t perform that action at this time.
0 commit comments