UNPKG
@hexadrop/either
Version:
beta (2.0.0-beta.3)
latest (2.0.1)
2.0.1
2.0.0
2.0.0-beta.3
2.0.0-beta.2
2.0.0-beta.1
2.0.0-beta.0
1.0.1
1.0.0
1.0.0-beta.2
1.0.0-beta.1
1.0.0-beta.0
Hexagonal architecture utils library
github.com/hexadrop/hexadrop
hexadrop/hexadrop
@hexadrop/either
/
src
/
either.types.ts
17 lines
(13 loc)
•
264 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
interface
Left
<
L
> { kind:
'left'
; leftValue: L; }
interface
Right
<
R
> { kind:
'right'
; rightValue: R; } type EitherValue<L, R> = Left<L> | Right<R>;
interface
EitherInterface
<
L
,
R
> {
value
: EitherValue<L, R>; } export type { EitherInterface, EitherValue };