Closed cesarandreu closed 8 years ago
:+1:
The test for the object patterns will pass regardless of the supplied input:
// the test
ok('object-pattern', {a: 'foo', b: 34});
// the fixture
export default function demo ({a, b}: {a: string, b: number}): string {
return a;
}
// the transformed fixture
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = demo;
function demo(_ref2) {
var a = _ref2.a;
var b = _ref2.b;
return a;
}
however, even if you change the test to the following, it will still pass:
ok('object-pattern', {a: 'foo', b: 'foo'});
The following won't perform the type check on the destructured type and query object:
However, the following will: