File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
packages/better-fetch/src Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export const betterFetch = async <
110
110
}
111
111
const responseType = detectResponseType ( response ) ;
112
112
const successContext = {
113
- data : null as any ,
113
+ data : "" as any ,
114
114
response,
115
115
request : context ,
116
116
} ;
@@ -122,6 +122,7 @@ export const betterFetch = async <
122
122
} else {
123
123
successContext . data = await response [ responseType ] ( ) ;
124
124
}
125
+ console . log ( { ctx : successContext . data , responseType } ) ;
125
126
126
127
/**
127
128
* Parse the data if the output schema is defined
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export type BetterFetchOption<
90
90
/**
91
91
* Custom JSON parser
92
92
*/
93
- jsonParser ?: < T > ( text : string ) => Promise < T | undefined > ;
93
+ jsonParser ?: ( text : string ) => Promise < any > | any ;
94
94
/**
95
95
* Retry count
96
96
*/
You can’t perform that action at this time.
0 commit comments