Skip to content

Commit 355abf3

Browse files
committed
fix: revert type instance or null to Result #194
1 parent 78b5424 commit 355abf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/core/result.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class Result<T = void, D = string, M = {}> implements _Result<T, D, M> {
6161
*
6262
* @returns A `Result` instance representing failure.
6363
*/
64-
public static fail<D = string, M = {}>(error?: D, metaData?: M): Result<null, D, M>;
64+
public static fail<D = string, M = {}, P = void>(error?: D, metaData?: M): Result<P, D, M>;
6565
public static fail<D = string, M = {}, T = void>(error?: D, metaData?: M): _Result<T, D, M> {
6666
const _error = (typeof error !== 'undefined' && error !== null) ? error : 'void error. no message!';
6767
const fail = new Result(false, null, _error, metaData) as unknown as _Result<T, D, M>;

0 commit comments

Comments
 (0)