interface Either < L , R > { alt ( other : functional . Either < L , R > ) : functional . Either < L , R > ; altLazy ( other : () => functional . Either < L , R > ) : functional . Either < L , R > ; ap < L2 , R2 > ( other : functional . Either < L2 , ( value : R ) => R2 > , ) : functional . Either < L | L2 , R2 > ; bimap < L2 , R2 > ( f : ( value : L ) => L2 , g : ( value : R ) => R2 , ) : functional . Either < L2 , R2 > ; caseOf < T > ( patterns : functional . EitherPatterns < L , R , T > ) : T ; chain < L2 , R2 > ( f : ( value : R ) => functional . Either < L2 , R2 > , ) : functional . Either < L | L2 , R2 > ; chainLeft < L2 , R2 > ( f : ( value : L ) => functional . Either < L2 , R2 > , ) : functional . Either < L2 , R | R2 > ; equals ( other : functional . Either < L , R > ) : boolean ; extend < R2 > ( f : ( value : functional . Either < L , R > ) => R2 , ) : functional . Either < L , R2 > ; extract () : L | R ; "fantasy-land/alt" ( other : functional . Either < L , R > ) : functional . Either < L , R > ; "fantasy-land/ap" < R2 > ( other : functional . Either < L , ( value : R ) => R2 > , ) : functional . Either < L , R2 > ; "fantasy-land/bimap" < L2 , R2 > ( f : ( value : L ) => L2 , g : ( value : R ) => R2 , ) : functional . Either < L2 , R2 > ; "fantasy-land/chain" < L2 , R2 > ( f : ( value : R ) => functional . Either < L2 , R2 > , ) : functional . Either < L | L2 , R2 > ; "fantasy-land/equals" ( other : functional . Either < L , R > ) : boolean ; "fantasy-land/extend" < R2 > ( f : ( value : functional . Either < L , R > ) => R2 , ) : functional . Either < L , R2 > ; "fantasy-land/map" < R2 > ( f : ( value : R ) => R2 ) : functional . Either < L , R2 > ; "fantasy-land/reduce" < T > ( reducer : ( accumulator : T , value : R ) => T , initialValue : T , ) : T ; ifLeft ( effect : ( value : L ) => any ) : this ; ifRight ( effect : ( value : R ) => any ) : this ; inspect () : string ; isLeft () : this is functional . Either < L , never > ; isRight () : this is functional . Either < never , R > ; join < L2 , R2 > ( this : functional . Either < L , functional . Either < L2 , R2 > > , ) : functional . Either < L | L2 , R2 > ; leftOrDefault ( defaultValue : L ) : L ; leftOrDefaultLazy ( getDefaultValue : () => L ) : L ; leftToMaybe () : functional . Maybe < L > ; map < R2 > ( f : ( value : R ) => R2 ) : functional . Either < L , R2 > ; mapLeft < L2 > ( f : ( value : L ) => L2 ) : functional . Either < L2 , R > ; orDefault ( defaultValue : R ) : R ; orDefaultLazy ( getDefaultValue : () => R ) : R ; reduce < T > ( reducer : ( accumulator : T , value : R ) => T , initialValue : T ) : T ; swap () : functional . Either < R , L > ; toJSON () : L | R ; toMaybe () : functional . Maybe < R > ; toString () : string ; unsafeCoerce () : R ; } Defined in node_modules/purify-ts/Either.d.ts:8 Defined in node_modules/purify-ts/Either.d.ts:89 Methodsbimap bimap < L2 , R2 > ( f : ( value : L ) => L2 , g : ( value : R ) => R2 , ) : functional . Either < L2 , R2 > Parameters f : ( value : L ) => L2 g : ( value : R ) => R2 Defined in node_modules/purify-ts/Either.d.ts:19 equals equals ( other : functional . Either < L , R > ) : boolean Returns boolean Defined in node_modules/purify-ts/Either.d.ts:27 extract extract () : L | R Returns L | R Defined in node_modules/purify-ts/Either.d.ts:63 fantasy- land/bimap "fantasy-land/bimap" < L2 , R2 > ( f : ( value : L ) => L2 , g : ( value : R ) => R2 , ) : functional . Either < L2 , R2 > Parameters f : ( value : L ) => L2 g : ( value : R ) => R2 Defined in node_modules/purify-ts/Either.d.ts:66 fantasy- land/equals "fantasy-land/equals" ( other : functional . Either < L , R > ) : boolean Returns boolean Defined in node_modules/purify-ts/Either.d.ts:69 fantasy- land/reduce "fantasy-land/reduce" < T > ( reducer : ( accumulator : T , value : R ) => T , initialValue : T , ) : T Parameters reducer : ( accumulator : T , value : R ) => T initialValue : T Returns T Defined in node_modules/purify-ts/Either.d.ts:72 if Left ifLeft ( effect : ( value : L ) => any ) : this Parameters effect : ( value : L ) => any Returns this Defined in node_modules/purify-ts/Either.d.ts:55 if Right ifRight ( effect : ( value : R ) => any ) : this Parameters effect : ( value : R ) => any Returns this Defined in node_modules/purify-ts/Either.d.ts:57 inspect inspect () : string Returns string Defined in node_modules/purify-ts/Either.d.ts:14 is Left isLeft () : this is functional . Either < L , never > Defined in node_modules/purify-ts/Either.d.ts:10 is Right isRight () : this is functional . Either < never , R > Defined in node_modules/purify-ts/Either.d.ts:12 left Or Default leftOrDefault ( defaultValue : L ) : L Returns L Defined in node_modules/purify-ts/Either.d.ts:47 left Or Default Lazy leftOrDefaultLazy ( getDefaultValue : () => L ) : L Returns L Defined in node_modules/purify-ts/Either.d.ts:53 left To Maybe leftToMaybe () : functional . Maybe < L > Defined in node_modules/purify-ts/Either.d.ts:61 or Default orDefault ( defaultValue : R ) : R Returns R Defined in node_modules/purify-ts/Either.d.ts:49 or Default Lazy orDefaultLazy ( getDefaultValue : () => R ) : R Returns R Defined in node_modules/purify-ts/Either.d.ts:51 reduce reduce < T > ( reducer : ( accumulator : T , value : R ) => T , initialValue : T ) : T Parameters reducer : ( accumulator : T , value : R ) => T initialValue : T Returns T Defined in node_modules/purify-ts/Either.d.ts:39 toJSON toJSON () : L | R Returns L | R Defined in node_modules/purify-ts/Either.d.ts:13 to String toString () : string Returns string Defined in node_modules/purify-ts/Either.d.ts:15 unsafe Coerce unsafeCoerce () : R Returns R Defined in node_modules/purify-ts/Either.d.ts:43
Returns the first
Right
betweenthis
and anotherEither
or theLeft
in the argument if boththis
and the argument areLeft