Skip to content

Commit 0b6fc1c

Browse files
authored
Merge pull request #19 from mojotech/em/ts-29-upgrade
Upgrade to TypeScript 2.9
2 parents 9f9eccd + 053d5bb commit 0b6fc1c

File tree

13 files changed

+1974
-2466
lines changed

13 files changed

+1974
-2466
lines changed

docs/README.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11

2-
# Documentation
2+
Documentation
3+
=============
34

45
[Documentation](https://github.com/mojotech/json-type-validation/tree/master/docs).
56

6-
The best places to start are with the examples in the `test/` directory, and the
7-
documentation for the
8-
[Decoder class](https://github.com/mojotech/json-type-validation/blob/master/docs/classes/_decoder_.decoder.md).
9-
At some point you may need documentation for dealing with the
10-
[Result type](https://github.com/mojotech/json-type-validation/blob/master/docs/modules/_result_.md).
7+
The best places to start are with the examples in the `test/` directory, and the documentation for the [Decoder class](https://github.com/mojotech/json-type-validation/blob/master/docs/classes/_decoder_.decoder.md). At some point you may need documentation for dealing with the [Result type](https://github.com/mojotech/json-type-validation/blob/master/docs/modules/_result_.md).
118

129
### Type Parameters
1310

14-
Many of the decoder functions take an optional type parameter which determines
15-
the type of the decoded value. In most cases typescript successfully infers
16-
these types, although some specific decoders include documentation for
17-
situations where the type is necessary (see the `constant` and `union`
18-
decoders). You may still find that including the type parameter improves type
19-
inference in situations where typescript's error messages are particularly
20-
unhelpful.
11+
Many of the decoder functions take an optional type parameter which determines the type of the decoded value. In most cases typescript successfully infers these types, although some specific decoders include documentation for situations where the type is necessary (see the `constant` and `union` decoders). You may still find that including the type parameter improves type inference in situations where typescript's error messages are particularly unhelpful.
12+
13+
As an example, a decoder for the `Pet` interface can be typechecked just as effectively using the type parameter as with the `Decoder<Pet>` annotation.
2114

22-
As an example, a decoder for the `Pet` interface can be typechecked just as
23-
effectively using the type parameter as with the `Decoder<Pet>` annotation.
2415
```
2516
const petDecoder = object<Pet>({
2617
name: string(),
@@ -32,25 +23,16 @@ const petDecoder = object<Pet>({
3223

3324
### Combinators
3425

35-
This library uses the [combinator pattern](https://wiki.haskell.org/Combinator_pattern)
36-
to build decoders. The decoder primitives `string`, `number`, `boolean`,
37-
`anyJson`, `constant`, `succeed`, and `fail` act as decoder building blocks that
38-
each perform a simple decoding operation. The decoder combinators `object`,
39-
`array`, `dict`, `optional`, `oneOf`, `union`, `withDefault`, `valueAt`, and
40-
`lazy` take decoders as arguments, and combined the decoders into more
41-
complicated structures. You can think of your own user-defined decoders as an
42-
extension of these composable units.
43-
44-
26+
This library uses the [combinator pattern](https://wiki.haskell.org/Combinator_pattern) to build decoders. The decoder primitives `string`, `number`, `boolean`, `anyJson`, `constant`, `succeed`, and `fail` act as decoder building blocks that each perform a simple decoding operation. The decoder combinators `object`, `array`, `dict`, `optional`, `oneOf`, `union`, `withDefault`, `valueAt`, and `lazy` take decoders as arguments, and combined the decoders into more complicated structures. You can think of your own user-defined decoders as an extension of these composable units.
4527

4628
## Index
4729

4830
### External modules
4931

5032
* ["combinators"](modules/_combinators_.md)
5133
* ["decoder"](modules/_decoder_.md)
34+
* ["index"](modules/_index_.md)
5235
* ["result"](modules/_result_.md)
5336

54-
55-
5637
---
38+

0 commit comments

Comments
 (0)