Comparing version 1.2.0 to 1.2.1
@@ -11,4 +11,5 @@ import type { Result } from "./result"; | ||
*/ | ||
declare function try$<TResult, TError>(promise: Promise<TResult>): Promise<Result<TResult, TError>> & Dwaitable<Result<TResult, TError>>; | ||
declare function try$<TResult, TError = any>(// eslint-disable-line @typescript-eslint/no-explicit-any | ||
promise: Promise<TResult>): Promise<Result<TResult, TError>> & Dwaitable<Result<TResult, TError>>; | ||
export default try$; | ||
//# sourceMappingURL=try.d.ts.map |
@@ -16,3 +16,4 @@ "use strict"; | ||
*/ | ||
function try$(promise) { | ||
function try$(// eslint-disable-line @typescript-eslint/no-explicit-any | ||
promise) { | ||
const task = Promise.resolve(promise) | ||
@@ -19,0 +20,0 @@ .then((result) => (0, result_1.Ok)(result)) |
@@ -14,4 +14,5 @@ import type { Result } from "./result"; | ||
*/ | ||
declare function tryFn$<TError, TFunc extends AnyFunction>(fn: TFunc, ...args: Parameters<TFunc>): Result<ReturnType<TFunc>, TError>; | ||
declare function tryFn$<TFunc extends AnyFunction, TError = any>(// eslint-disable-line @typescript-eslint/no-explicit-any | ||
fn: TFunc, ...args: Parameters<TFunc>): Result<ReturnType<TFunc>, TError>; | ||
export default tryFn$; | ||
//# sourceMappingURL=tryFn.d.ts.map |
@@ -12,3 +12,4 @@ "use strict"; | ||
*/ | ||
function tryFn$(fn, ...args) { | ||
function tryFn$(// eslint-disable-line @typescript-eslint/no-explicit-any | ||
fn, ...args) { | ||
try { | ||
@@ -15,0 +16,0 @@ const result = fn(...args); |
{ | ||
"name": "tryumph", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Bring the \"Umph\" to the javascript's async error handling", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39523
666