es-toolkit 1.51.0-dev.2081 → 1.51.0-dev.2082

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.
@@ -38,6 +38,6 @@
38
38
  * });
39
39
  * ```
40
40
  */
41
- declare function attempt<T, E>(func: () => T): [null, T] | [E, null];
41
+ declare function attempt<T, E = unknown>(func: () => T): [null, T] | [E, null];
42
42
  //#endregion
43
43
  export { attempt };
@@ -38,6 +38,6 @@
38
38
  * });
39
39
  * ```
40
40
  */
41
- declare function attempt<T, E>(func: () => T): [null, T] | [E, null];
41
+ declare function attempt<T, E = unknown>(func: () => T): [null, T] | [E, null];
42
42
  //#endregion
43
43
  export { attempt };
@@ -31,6 +31,6 @@
31
31
  * });
32
32
  * // users is typed as User[]
33
33
  */
34
- declare function attemptAsync<T, E>(func: () => Promise<T>): Promise<[null, T] | [E, null]>;
34
+ declare function attemptAsync<T, E = unknown>(func: () => Promise<T>): Promise<[null, T] | [E, null]>;
35
35
  //#endregion
36
36
  export { attemptAsync };
@@ -31,6 +31,6 @@
31
31
  * });
32
32
  * // users is typed as User[]
33
33
  */
34
- declare function attemptAsync<T, E>(func: () => Promise<T>): Promise<[null, T] | [E, null]>;
34
+ declare function attemptAsync<T, E = unknown>(func: () => Promise<T>): Promise<[null, T] | [E, null]>;
35
35
  //#endregion
36
36
  export { attemptAsync };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
- "version": "1.51.0-dev.2081+27143630",
3
+ "version": "1.51.0-dev.2082+0949c8b5",
4
4
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
5
5
  "homepage": "https://es-toolkit.dev",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",