-
Notifications
You must be signed in to change notification settings - Fork 519
Open
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.
Description
class Rectangle {
#color
constructor(height, width, color) {
this.height = height;
this.width = width;
this.#color = color;
}
area() {
return this.height * this.width;
}
color2() {
return this.#color;
}
}
let r = new Rectangle(45,477, 'blue');
let ir = instanceToPlain(r);
console.log(ir)
let users = plainToInstance(Rectangle, ir);
console.log(users.color2()); <----------------------- undefined
Metadata
Metadata
Assignees
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.