Comparing version 1.8.4 to 1.8.5
@@ -17,2 +17,7 @@ # Changelog | ||
# 1.8.5 | ||
- **Bug Fix** | ||
- change how types and output types are retrieved in `IntersectionC` and `TupleC`, fix #315 (@gcanti) | ||
# 1.8.4 | ||
@@ -19,0 +24,0 @@ |
@@ -567,3 +567,19 @@ import { Either } from 'fp-ts/lib/Either'; | ||
*/ | ||
export interface IntersectionC<CS extends [Mixed, Mixed, ...Array<Mixed>]> extends IntersectionType<CS, CS extends [Mixed, Mixed] ? TypeOf<CS['0']> & TypeOf<CS['1']> : CS extends [Mixed, Mixed, Mixed] ? TypeOf<CS['0']> & TypeOf<CS['1']> & TypeOf<CS['2']> : CS extends [Mixed, Mixed, Mixed, Mixed] ? TypeOf<CS['0']> & TypeOf<CS['1']> & TypeOf<CS['2']> & TypeOf<CS['3']> : CS extends [Mixed, Mixed, Mixed, Mixed, Mixed] ? TypeOf<CS['0']> & TypeOf<CS['1']> & TypeOf<CS['2']> & TypeOf<CS['3']> & TypeOf<CS['4']> : unknown, CS extends [Mixed, Mixed] ? OutputOf<CS['0']> & OutputOf<CS['1']> : CS extends [Mixed, Mixed, Mixed] ? OutputOf<CS['0']> & OutputOf<CS['1']> & OutputOf<CS['2']> : CS extends [Mixed, Mixed, Mixed, Mixed] ? OutputOf<CS['0']> & OutputOf<CS['1']> & OutputOf<CS['2']> & OutputOf<CS['3']> : CS extends [Mixed, Mixed, Mixed, Mixed, Mixed] ? OutputOf<CS['0']> & OutputOf<CS['1']> & OutputOf<CS['2']> & OutputOf<CS['3']> & OutputOf<CS['4']> : unknown, unknown> { | ||
export interface IntersectionC<CS extends [Mixed, Mixed, ...Array<Mixed>]> extends IntersectionType<CS, CS extends { | ||
length: 2; | ||
} ? TypeOf<CS[0]> & TypeOf<CS[1]> : CS extends { | ||
length: 3; | ||
} ? TypeOf<CS[0]> & TypeOf<CS[1]> & TypeOf<CS[2]> : CS extends { | ||
length: 4; | ||
} ? TypeOf<CS[0]> & TypeOf<CS[1]> & TypeOf<CS[2]> & TypeOf<CS[3]> : CS extends { | ||
length: 5; | ||
} ? TypeOf<CS[0]> & TypeOf<CS[1]> & TypeOf<CS[2]> & TypeOf<CS[3]> & TypeOf<CS[4]> : unknown, CS extends { | ||
length: 2; | ||
} ? OutputOf<CS[0]> & OutputOf<CS[1]> : CS extends { | ||
length: 3; | ||
} ? OutputOf<CS[0]> & OutputOf<CS[1]> & OutputOf<CS[2]> : CS extends { | ||
length: 4; | ||
} ? OutputOf<CS[0]> & OutputOf<CS[1]> & OutputOf<CS[2]> & OutputOf<CS[3]> : CS extends { | ||
length: 5; | ||
} ? OutputOf<CS[0]> & OutputOf<CS[1]> & OutputOf<CS[2]> & OutputOf<CS[3]> & OutputOf<CS[4]> : unknown, unknown> { | ||
} | ||
@@ -588,3 +604,23 @@ /** | ||
*/ | ||
export interface TupleC<CS extends [Mixed, ...Array<Mixed>]> extends TupleType<CS, CS extends [Mixed] ? [TypeOf<CS['0']>] : CS extends [Mixed, Mixed] ? [TypeOf<CS['0']>, TypeOf<CS['1']>] : CS extends [Mixed, Mixed, Mixed] ? [TypeOf<CS['0']>, TypeOf<CS['1']>, TypeOf<CS['2']>] : CS extends [Mixed, Mixed, Mixed, Mixed] ? [TypeOf<CS['0']>, TypeOf<CS['1']>, TypeOf<CS['2']>, TypeOf<CS['3']>] : CS extends [Mixed, Mixed, Mixed, Mixed, Mixed] ? [TypeOf<CS['0']>, TypeOf<CS['1']>, TypeOf<CS['2']>, TypeOf<CS['3']>, TypeOf<CS['4']>] : unknown, CS extends [Mixed] ? [OutputOf<CS['0']>] : CS extends [Mixed, Mixed] ? [OutputOf<CS['0']>, OutputOf<CS['1']>] : CS extends [Mixed, Mixed, Mixed] ? [OutputOf<CS['0']>, OutputOf<CS['1']>, OutputOf<CS['2']>] : CS extends [Mixed, Mixed, Mixed, Mixed] ? [OutputOf<CS['0']>, OutputOf<CS['1']>, OutputOf<CS['2']>, OutputOf<CS['3']>] : CS extends [Mixed, Mixed, Mixed, Mixed, Mixed] ? [OutputOf<CS['0']>, OutputOf<CS['1']>, OutputOf<CS['2']>, OutputOf<CS['3']>, OutputOf<CS['4']>] : unknown, unknown> { | ||
export interface TupleC<CS extends [Mixed, ...Array<Mixed>]> extends TupleType<CS, CS extends { | ||
length: 1; | ||
} ? [TypeOf<CS[0]>] : CS extends { | ||
length: 2; | ||
} ? [TypeOf<CS[0]>, TypeOf<CS[1]>] : CS extends { | ||
length: 3; | ||
} ? [TypeOf<CS[0]>, TypeOf<CS[1]>, TypeOf<CS[2]>] : CS extends { | ||
length: 4; | ||
} ? [TypeOf<CS[0]>, TypeOf<CS[1]>, TypeOf<CS[2]>, TypeOf<CS[3]>] : CS extends { | ||
length: 5; | ||
} ? [TypeOf<CS[0]>, TypeOf<CS[1]>, TypeOf<CS[2]>, TypeOf<CS[3]>, TypeOf<CS[4]>] : unknown, CS extends { | ||
length: 1; | ||
} ? [OutputOf<CS[0]>] : CS extends { | ||
length: 2; | ||
} ? [OutputOf<CS[0]>, OutputOf<CS[1]>] : CS extends { | ||
length: 3; | ||
} ? [OutputOf<CS[0]>, OutputOf<CS[1]>, OutputOf<CS[2]>] : CS extends { | ||
length: 4; | ||
} ? [OutputOf<CS[0]>, OutputOf<CS[1]>, OutputOf<CS[2]>, OutputOf<CS[3]>] : CS extends { | ||
length: 5; | ||
} ? [OutputOf<CS[0]>, OutputOf<CS[1]>, OutputOf<CS[2]>, OutputOf<CS[3]>, OutputOf<CS[4]>] : unknown, unknown> { | ||
} | ||
@@ -591,0 +627,0 @@ /** |
{ | ||
"name": "io-ts", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "TypeScript compatible runtime type system for IO validation", | ||
@@ -55,3 +55,3 @@ "files": [ | ||
"tslint-config-standard": "^8.0.1", | ||
"typescript": "^3.3.3" | ||
"typescript": "^3.4.1" | ||
}, | ||
@@ -58,0 +58,0 @@ "tags": [ |
@@ -191,2 +191,4 @@ [![build status](https://img.shields.io/travis/gcanti/io-ts/master.svg?style=flat-square)](https://travis-ci.org/gcanti/io-ts) | ||
You can also use the [`withMessage`](https://gcanti.github.io/io-ts-types/modules/withMessage.ts.html) helper from [io-ts-types](https://github.com/gcanti/io-ts-types) | ||
# Community | ||
@@ -193,0 +195,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
107869
2398
577