Update "Either" type generic order
This commit is contained in:
parent
e897ca7848
commit
773fcc7ef3
@ -1,6 +1,6 @@
|
|||||||
export type Left<E> = {readonly _tag: 'Left', readonly left: E}
|
export type Left<E> = {readonly _tag: 'Left', readonly left: E}
|
||||||
export type Right<A> = {readonly _tag: 'Right', readonly right: A}
|
export type Right<A> = {readonly _tag: 'Right', readonly right: A}
|
||||||
export type Either<E, A> = Left<E> | Right<A>
|
export type Either<A, E> = Right<A> | Left<E>
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
export const left = <E>(e: E): Either<E, never> => ({
|
export const left = <E>(e: E): Either<E, never> => ({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user