@sweet-monads/maybe
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -1,2 +0,2 @@ | ||
import { Monad } from "@sweet-monads/interfaces"; | ||
import { Monad, Alternative } from "@sweet-monads/interfaces"; | ||
declare const enum MaybeState { | ||
@@ -6,3 +6,3 @@ Just = "Just", | ||
} | ||
export default class MaybeConstructor<T, S extends MaybeState = MaybeState> implements Monad<T> { | ||
export default class MaybeConstructor<T, S extends MaybeState = MaybeState> implements Monad<T>, Alternative<T> { | ||
private readonly type; | ||
@@ -36,2 +36,3 @@ readonly value: S extends MaybeState.Just ? T : undefined; | ||
asyncChain<V>(f: (r: T) => Promise<Maybe<V>>): Promise<Maybe<V>>; | ||
or(x: Maybe<T>): Maybe<T>; | ||
} | ||
@@ -38,0 +39,0 @@ export declare type Maybe<T> = MaybeConstructor<T, MaybeState.Just> | MaybeConstructor<T, MaybeState.None>; |
{ | ||
"name": "@sweet-monads/maybe", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22442
6
307
0