My constructor has the following structure:
constructor(values: Object = {}) {
//Constructor initialization
Object.assign(this, values);
}
However, it currently requires named initialization like this :
new Inventory({ Name: "Test", Quantity: 1, Price: 100 })
I am wondering if it can be done directly from an array in this format:
new Inventory(["Test", 1, 100])