Comparing version 2.5.1 to 2.5.2
@@ -15,2 +15,7 @@ # Changelog | ||
# v2.5.2 | ||
- **Bug Fix** | ||
- remove the assert checking if the type returned by a union dispatch function is correct (was causing issues with unions of unions or unions of intersections) | ||
## v2.5.1 | ||
@@ -17,0 +22,0 @@ |
@@ -433,4 +433,3 @@ /*! @preserve | ||
path = path || [displayName]; | ||
assert(isType(type), function () { return 'Invalid value ' + exports.stringify(value) + ' supplied to ' + path.join('/') + ' (no constructor found)'; }); | ||
assert(types.some(function (t) { return t === type; }), function () { return 'Invalid constructor ' + getTypeName(type) + ' returned by ' + path.join('/') + '.dispatch(x) function'; }); | ||
assert(isType(type), function () { return 'Invalid value ' + exports.stringify(value) + ' supplied to ' + path.join('/') + ' (no constructor returned by dispatch)'; }); | ||
path[path.length - 1] += '(' + getTypeName(type) + ')'; | ||
@@ -437,0 +436,0 @@ } |
{ | ||
"name": "tcomb", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "Type checking and DDD for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ [![build status](https://img.shields.io/travis/gcanti/tcomb/master.svg?style=flat-square)](https://travis-ci.org/gcanti/tcomb) | ||
# Code example | ||
# Usage | ||
@@ -41,2 +41,6 @@ ```js | ||
# Babel plugin | ||
[babel-plugin-tcomb](https://github.com/gcanti/babel-plugin-tcomb) | ||
# Features | ||
@@ -181,2 +185,3 @@ | ||
* [immutable-store](https://github.com/christianalfoni/immutable-store) | ||
* [ObjectModel](https://github.com/sylvainpolletvillard/ObjectModel) | ||
@@ -183,0 +188,0 @@ # License |
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
59918
188
844