I know you can do object destructuring in ES6 but I was wondering if there is a clever solution for constructor destructuring so I can skip the manual assignment like below and instead do something like the hypothetical scenario. I know it is dangerous and unreliable to accept everything in constructor, but just curious.
// Hypothetical
constructor(... args){
object.assign(this,...args);
}
constructor(pieceName,pieceImage,dataAttribute,numeric,ascii){
this.pieceName = piecename;
this.pieceImage = pieceImage;
this.dataAttribu
}