Skip to content

Commit 8138275

Browse files
committed
Change XOR to be <success,error>
1 parent 3705eb7 commit 8138275

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shared/core/Result.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const right = <L, A>(a?: A): Either<L, A> => {
110110
return new Right<L, A>(a);
111111
};
112112

113-
export type XOR<L, A> = Oops<L, A> | Yay<L, A>;
113+
export type XOR<A, L> = Oops<L, A> | Yay<L, A>;
114114

115115
export class Oops<L, A> {
116116
readonly value: L;
@@ -144,10 +144,10 @@ export class Yay<L, A> {
144144
}
145145
}
146146

147-
export const oops = <L, A>(l: L): XOR<L, A> => {
147+
export const oops = <A, L>(l: L): XOR<A, L> => {
148148
return new Oops(l);
149149
};
150150

151-
export const yay = <L, A>(a: A): XOR<L, A> => {
151+
export const yay = <A, L>(a: A): XOR<A, L> => {
152152
return new Yay<L, A>(a);
153153
};

0 commit comments

Comments
 (0)