From 69a917929357233930258ebd45c1529ff06fa268 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 20 Aug 2015 12:38:05 -0700 Subject: [PATCH] Added 'any' cast in 'tcomb'. --- tcomb/tcomb-tests.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tcomb/tcomb-tests.ts b/tcomb/tcomb-tests.ts index 3a27ffc7f..aafd5e55b 100644 --- a/tcomb/tcomb-tests.ts +++ b/tcomb/tcomb-tests.ts @@ -577,17 +577,16 @@ describe('irreducible types constructors', function () { {T: Dat, x: new Date()} ].forEach(function (o) { - var T = o.T; - var x = o.x; + var { T, x } = o; it('should accept only valid values', function () { - eq(T(x), x); + eq((T)(x), x); }); it('should throw if used with new', function () { throwsWithMessage(function () { /* jshint ignore:start */ - var x = new (T) (); + var x = new (T) (); /* jshint ignore:end */ }, 'Operator `new` is forbidden for type `' + getTypeName(T) + '`'); });