@@ -20,3 +20,4 @@ export * from './service/localstorage-manager';
export * from './utils/basic-interceptor';
export * from './utils/browser-utils';
export * from './utils/mongoose-utils';
+export * from '../../../node_modules/swr';
@@ -0,0 +1,7 @@
+import { SWRResponse } from '../index';
+
+export type SWRResponseWithUtils<R extends SWRResponse, Utils> = R & Utils;
+export const withUtils = <R extends SWRResponse, U>(response: R, utils: U): SWRResponseWithUtils<R, U> => {
+ return Object.assign(response, utils);
+};