Open
Description
I am not sure if this is expected behavior.
var State = require('ampersand-state');
var A = State.extend({
props: { n: 'number' },
parse: function (attrs) {
attrs.n = parseInt(attrs.n, 10);
return attrs;
}
});
var B = State.extend({
children: { a: A }
});
// parses string to int
var a = new A({ n: '1' }, { parse: true });
// throws TypeError
var b = new B({ a: { n: '1' } }, { parse: true });