@whitesev/utils 2.2.7 → 2.2.8

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.
@@ -1358,7 +1358,7 @@ declare class Utils {
1358
1358
  * Utils.toJSON("{123:123}")
1359
1359
  * > {123:123}
1360
1360
  */
1361
- toJSON<T extends any>(data: string | null, errorCallBack?: (error: Error) => void): T;
1361
+ toJSON<T = any>(data: string | null, errorCallBack?: (error: Error) => void): T;
1362
1362
  /**
1363
1363
  * 对象转为UrlSearchParams格式的字符串
1364
1364
  * @param obj 目标对象,可以是对象组成的数组
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/utils",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "一个常用的工具库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/Utils.ts CHANGED
@@ -3812,11 +3812,11 @@ class Utils {
3812
3812
  * Utils.toJSON("{123:123}")
3813
3813
  * > {123:123}
3814
3814
  */
3815
- toJSON<T extends any>(
3815
+ toJSON<T = any>(
3816
3816
  data: string | null,
3817
3817
  errorCallBack?: (error: Error) => void
3818
3818
  ): T;
3819
- toJSON<T extends any>(
3819
+ toJSON<T = any>(
3820
3820
  data: string | null,
3821
3821
  errorCallBack?: (error: Error) => void
3822
3822
  ): T {