Skip to content

Commit 2f944dc

Browse files
author
Elias Mulhall
committed
Fix type inference error in union combinator
1 parent a22acdd commit 2f944dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/combinators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function union <A, B, C, D, E, F>(ad: Decoder<A>, bd: Decoder<B>, cd: Dec
5656
export function union <A, B, C, D, E, F, G>(ad: Decoder<A>, bd: Decoder<B>, cd: Decoder<C>, dd: Decoder<D>, ed: Decoder<E>, fd: Decoder<F>, gd: Decoder<G>): Decoder<A | B | C | D | E | F | G>; // prettier-ignore
5757
export function union <A, B, C, D, E, F, G, H>(ad: Decoder<A>, bd: Decoder<B>, cd: Decoder<C>, dd: Decoder<D>, ed: Decoder<E>, fd: Decoder<F>, gd: Decoder<G>, hd: Decoder<H>): Decoder<A | B | C | D | E | F | G | H>; // prettier-ignore
5858
export function union(ad: Decoder<any>, bd: Decoder<any>, ...ds: Decoder<any>[]): Decoder<any> {
59-
return Decoder.union(ad, bd, ...ds);
59+
return Decoder.oneOf(ad, bd, ...ds);
6060
}
6161

6262
/** See `Decoder.withDefault` */

0 commit comments

Comments
 (0)