Open skad0 opened 7 years ago
We should not use .create here ;-)
Ok, i understand that .create can't guarantee correct interpretation, but is current constructor ok? Is it convenient to pass every time as
const ob = {};
ob.block = entity.modName;
if (entity.modName) {
ob.mod = {};
ob.mod.name = entity.modName;
ob.mod.val = entity.modVal;
}
const lala = new BemEntityName({ entity: ob, tech: entity.tech });
or smth like that?
new BemCell({
entity: new BemEntityName({
block: entity.block,
elem: entity.elem,
mod: entity.modName
? { name: entity.modName, val: enrity.modVal }
: undefuned
}),
tech: entity.tech
})
Like that?
looks ugly
Now we have deprecation messages when we use a constructor for BemCell and provide to it
modName
andmodVal
fields