File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " effect " : minor
3+ ---
4+
5+ Add missing ` Either.void ` constructor.
Original file line number Diff line number Diff line change @@ -118,6 +118,15 @@ export declare namespace Either {
118118 */
119119export const right : < R > ( right : R ) => Either < R > = either . right
120120
121+ const void_ : Either < void > = right ( void 0 )
122+ export {
123+ /**
124+ * @category constructors
125+ * @since 3.13.0
126+ */
127+ void_ as void
128+ }
129+
121130/**
122131 * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this
123132 * structure.
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ import {
1313} from "effect/test/util"
1414
1515describe ( "Either" , ( ) => {
16+ it ( "void" , ( ) => {
17+ deepStrictEqual ( Either . void , Either . right ( undefined ) )
18+ } )
19+
1620 it ( "gen" , ( ) => {
1721 const a = Either . gen ( function * ( ) {
1822 const x = yield * Either . right ( 1 )
You can’t perform that action at this time.
0 commit comments