@ceale/util 1.18.0 → 1.19.0

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.
@@ -13,7 +13,7 @@ type Failure<E> = {
13
13
  data: null,
14
14
  error: E
15
15
  ];
16
- type Result<T, E = any> = Success<T> | Failure<E>;
16
+ type Result<T, E extends unknown = Error> = Success<T> | Failure<E>;
17
17
  interface tryCatch {
18
18
  /** 捕获所有 */
19
19
  <T>(func: (() => T)): Result<T>;
@@ -10,15 +10,16 @@ export declare namespace uri {
10
10
  *
11
11
  * @example
12
12
  * // 基础拼接
13
- * uri.join('/a/', 'b', '/c') // -> "/a/b/c"
13
+ * uri.join('/a/', 'b', '/c')
14
+ * // "/a/b/c"
14
15
  *
15
- * @example
16
16
  * // 路径解析
17
- * uri.join('/a/b/../c') // -> "/a/c"
17
+ * uri.join('/a/b/../c')
18
+ * // "/a/c"
18
19
  *
19
- * @example
20
20
  * // 保留协议头
21
- * uri.join("http://example.com", "a") // -> "http://example.com/a"
21
+ * uri.join("http://example.com", "a")
22
+ * // "http://example.com/a"
22
23
  */
23
24
  const join: (...path: string[]) => string;
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceale/util",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "author": "Ceale",
5
5
  "description": "小工具集",
6
6
  "repository": {