Skip to content

Commit

Permalink
feat: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
yamiteru committed May 12, 2024
1 parent 1185692 commit dbcc80e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions src/assertions/optional/index.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,6 +15,6 @@ import type { Assertion, Optional } from "@the-minimal/types";
* ```
*/
export const optional =
<$Value>(assertion: Assertion<$Value>): Assertion<Optional<$Value>> =>
<$Value>(assertion: Assertion<$Value>): Assertion<Maybe<$Value>> =>
(v: unknown) =>
v === undefined || (assertion as any)(v);

0 comments on commit dbcc80e

Please sign in to comment.