diff --git a/package.json b/package.json index f7b44c6..e04bd17 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "access": "public" }, "dependencies": { - "@the-minimal/types": "0.4.0", + "@the-minimal/types": "0.5.0", "@the-minimal/error": "0.1.1" } } diff --git a/src/assertions/optional/index.ts b/src/assertions/optional/index.ts index c3806b9..ec43e84 100644 --- a/src/assertions/optional/index.ts +++ b/src/assertions/optional/index.ts @@ -1,4 +1,4 @@ -import type { Assertion, Optional } from "@the-minimal/types"; +import type { Assertion, Maybe } from "@the-minimal/types"; /** * Checks if the assertion passes or if the value is undefined. @@ -15,6 +15,6 @@ import type { Assertion, Optional } from "@the-minimal/types"; * ``` */ export const optional = - <$Value>(assertion: Assertion<$Value>): Assertion> => + <$Value>(assertion: Assertion<$Value>): Assertion> => (v: unknown) => v === undefined || (assertion as any)(v);