diff --git a/CHANGELOG.md b/CHANGELOG.md index dc7df9811..ac9ff0c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ **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.1 + +- **Polish** + - remove useless module augmentation of `Array` (@gcanti) + # 1.5.0 - **New Feature** diff --git a/package.json b/package.json index 778680c34..be790057f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "io-ts", - "version": "1.5.0", + "version": "1.5.1", "description": "TypeScript compatible runtime type system for IO validation", "files": [ "lib" diff --git a/src/index.ts b/src/index.ts index 121ba9638..b3730dd3b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,6 @@ import { Either, Left, Right } from 'fp-ts/lib/Either' import { Predicate } from 'fp-ts/lib/function' -declare global { - interface Array { - _A: T - } -} - /** * @since 1.0.0 */ @@ -997,11 +991,11 @@ export class UnionType, A = any, O = A, I = mixed> extend export const union = >( types: RTS, name: string = `(${types.map(type => type.name).join(' | ')})` -): UnionType, OutputOf, mixed> => { +): UnionType, OutputOf, mixed> => { const len = types.length return new UnionType( name, - (m): m is TypeOf => types.some(type => type.is(m)), + (m): m is TypeOf => types.some(type => type.is(m)), (m, c) => { const errors: Errors = [] for (let i = 0; i < len; i++) { @@ -1459,7 +1453,7 @@ export const taggedUnion = >>( tag: Tag, types: RTS, name: string = `(${types.map(type => type.name).join(' | ')})` -): TaggedUnionType, OutputOf, mixed> => { +): TaggedUnionType, OutputOf, mixed> => { const len = types.length const values: Array = new Array(len) const hash: { [key: string]: number } = {} @@ -1491,9 +1485,9 @@ export const taggedUnion = >>( (m, c) => (isTagValue(m) ? success(m) : failure(m, c)), identity ) - return new TaggedUnionType, OutputOf, mixed>( + return new TaggedUnionType, OutputOf, mixed>( name, - (v): v is TypeOf => { + (v): v is TypeOf => { if (!Dictionary.is(v)) { return false }