|
|
@@ -1,7 +1,7 @@
|
|
|
import { SWRResponse } from 'swr';
|
|
|
|
|
|
-export type SWRResponseWithUtils<R extends SWRResponse, U> = R & U;
|
|
|
+type SWRResponseWithUtils<U, D = any, E = any> = SWRResponse<D, E> & U;
|
|
|
|
|
|
-export const withUtils = <R extends SWRResponse, U>(response: R, utils: U): SWRResponseWithUtils<R, U> => {
|
|
|
+export const withUtils = <U, D = any, E = any>(response: SWRResponse<D, E>, utils: U): SWRResponseWithUtils<U, D, E> => {
|
|
|
return Object.assign(response, utils);
|
|
|
};
|