r
constructor(partial: Partial<Product>) {с таким конструктором получаю ошибку TypeError: Cannot set property image of #<ProductModel> which has only a getter
Object.assign(this, {
... partial,
_image: partial.image
});
}
set image(value: any) {
this._image = value;
}
добавил сеттер - работает, но выглядит все равно как-то грязно