Comparing version 1.4.0 to 1.4.1
@@ -16,2 +16,7 @@ # Changelog | ||
# 1.4.1 | ||
- **Polish** | ||
- `Type.prototype.pipe` now allows more types as input, #231 #232 (@sledorze) | ||
# 1.4.0 | ||
@@ -18,0 +23,0 @@ |
@@ -62,3 +62,3 @@ import { Either } from 'fp-ts/lib/Either'; | ||
encode: Encode<A, O>); | ||
pipe<B>(ab: Type<B, A, A>, name?: string): Type<B, O, I>; | ||
pipe<B, IB, A extends IB, OB extends A>(this: Type<A, O, I>, ab: Type<B, OB, IB>, name?: string): Type<B, O, I>; | ||
asDecoder(): Decoder<I, A>; | ||
@@ -65,0 +65,0 @@ asEncoder(): Encoder<A, O>; |
@@ -45,3 +45,4 @@ "use strict"; | ||
var _this = this; | ||
return new Type(name || "pipe(" + this.name + ", " + ab.name + ")", ab.is, function (i, c) { | ||
if (name === void 0) { name = "pipe(" + this.name + ", " + ab.name + ")"; } | ||
return new Type(name, ab.is, function (i, c) { | ||
var validation = _this.validate(i, c); | ||
@@ -48,0 +49,0 @@ if (validation.isLeft()) { |
{ | ||
"name": "io-ts", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "TypeScript compatible runtime type system for IO validation", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -18,3 +18,3 @@ [![build status](https://img.shields.io/travis/gcanti/io-ts/master.svg?style=flat-square)](https://travis-ci.org/gcanti/io-ts) | ||
```ts | ||
export type mixed = object | number | string | boolean | symbol | undefined | null | ||
export type mixed = unknown | ||
@@ -87,2 +87,6 @@ class Type<A, O = A, I = mixed> { | ||
**Note**. If you are running `< typescript@3.0.1` you have to polyfill `unknown`. | ||
You can use [unknown-ts](https://github.com/gcanti/unknown-ts) as a polyfill. | ||
# Error reporters | ||
@@ -89,0 +93,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85971
1391
593