Skip to content

Commit 5c53c44

Browse files
author
Elias Mulhall
committed
Remove type annotations from combinators
This commit will get dropped once the general cleanups PR is merged with this change.
1 parent 0b6fc1c commit 5c53c44

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/combinators.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Decoder, DecoderObject} from './decoder';
1+
import {Decoder} from './decoder';
22

33
/** See `Decoder.string` */
44
export function string(): Decoder<string> {
@@ -27,9 +27,7 @@ export function constant(value: any): Decoder<any> {
2727
}
2828

2929
/** See `Decoder.object` */
30-
export function object<A>(decoders: DecoderObject<A>): Decoder<A> {
31-
return Decoder.object(decoders);
32-
}
30+
export const object = Decoder.object;
3331

3432
/** See `Decoder.array` */
3533
export const array: <A>(decoder: Decoder<A>) => Decoder<A[]> = Decoder.array;
@@ -38,7 +36,7 @@ export const array: <A>(decoder: Decoder<A>) => Decoder<A[]> = Decoder.array;
3836
export const dict: <A>(decoder: Decoder<A>) => Decoder<{[name: string]: A}> = Decoder.dict;
3937

4038
/** See `Decoder.optional` */
41-
export const optional: <A>(decoder: Decoder<A>) => Decoder<A | undefined> = Decoder.optional;
39+
export const optional = Decoder.optional;
4240

4341
/** See `Decoder.oneOf` */
4442
export const oneOf: <A>(...decoders: Decoder<A>[]) => Decoder<A> = Decoder.oneOf;

0 commit comments

Comments
 (0)