aidbox-react 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.3.3
2
+
3
+ - Adjust the code for new ts
4
+
1
5
  ## 1.3.2
2
6
 
3
7
  - Fix build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidbox-react",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "coverage": "jest --config=./jest.config.json --coverage --coverageReporters=text-lcov | coveralls",
@@ -22,7 +22,7 @@ export function useService<S = any, F = any>(
22
22
  try {
23
23
  const response: RemoteDataResult<S, F> = await asyncFunction();
24
24
  setRemoteData(response);
25
- } catch (err) {
25
+ } catch (err: any) {
26
26
  setRemoteData(failure(err.response ? err.response.data : err.message));
27
27
  }
28
28
  })();
@@ -20,7 +20,7 @@ export async function service<S = any, F = any>(config: AxiosRequestConfig): Pro
20
20
  const response = await axiosInstance(config);
21
21
 
22
22
  return success(response.data);
23
- } catch (err) {
23
+ } catch (err: any) {
24
24
  return failure(err.response ? err.response.data : err.message);
25
25
  }
26
26
  }