This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Description
Test case:
const t = require('tcomb');
const Rectangle = t.struct({
width: t.Number,
height: t.Number
}, {strict: true});
Rectangle.prototype.getArea = function () {
return this.width * this.height;
};
let r = Rectangle({width: 10, height: 10});
Rectangle.update(r, {width: {$set: 20}});
throws:
TypeError: [tcomb] Invalid additional prop "getArea" supplied to Struct{width: Number, height: Number}
replacing lib/assign.js with Object.assign seems to fix the problem.