Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Dec 13, 2018
1 parent 323f50f commit 94da6fb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@
> - [Internal]
> - [Polish]
> - [Experimental]
> - [Deprecation]
**Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
high state of flux, you're at risk of it changing without notice.

# 1.5.0

- **New Feature**
- add `UnknownType`, closes #238 (@gcanti)
- **Deprecation**
- `ThrowReporter` is now deprecated (@gcanti)

# 1.4.2

use `Compact` in `intersection` signatures as a workaround for #234 (@sledorze)
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,17 @@ interface Reporter<A> {
}
```

This package exports two default reporters

- `PathReporter: Reporter<Array<string>>`
- `ThrowReporter: Reporter<void>`
This package exports a default `PathReporter` reporter

Example

```ts
import { PathReporter } from 'io-ts/lib/PathReporter'
import { ThrowReporter } from 'io-ts/lib/ThrowReporter'

const result = Person.decode({ name: 'Giulio' })

console.log(PathReporter.report(result))
// => ['Invalid value undefined supplied to : { name: string, age: number }/age: number']

ThrowReporter.report(result)
// => throws 'Invalid value undefined supplied to : { name: string, age: number }/age: number'
```

You can define your own reporter. `Errors` has the following type
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "io-ts",
"version": "1.4.2",
"version": "1.5.0",
"description": "TypeScript compatible runtime type system for IO validation",
"files": [
"lib"
Expand Down
1 change: 1 addition & 0 deletions src/ThrowReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PathReporter } from './PathReporter'

/**
* @since 1.0.0
* @deprecated
*/
export const ThrowReporter: Reporter<void> = {
report: validation => {
Expand Down

0 comments on commit 94da6fb

Please sign in to comment.