We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3650a64 commit 1849e78Copy full SHA for 1849e78
src/maybe/maybe.interface.ts
@@ -1,4 +1,5 @@
1
import { IMonad } from '../monad/monad.interface'
2
+import { IResult } from '../result/result.interface'
3
4
/**
5
* Define a contract to unwrap Maybe object
@@ -118,4 +119,6 @@ export interface IMaybe<T> extends IMonad<T> {
118
119
*/
120
// eslint-disable-next-line @typescript-eslint/no-explicit-any
121
apply(maybe: IMaybe<ReturnType<T extends (...args: any) => any ? T : any>>): IMaybe<T>
122
+
123
+ toResult<E>(error: E): IResult<T, E>
124
}
0 commit comments