Closed dz4k closed 7 months ago
The way to merge the default values with custom values is with Object.assign()
(see code here), and looks like it doesn't detect getter properties.
I guess the only way to detect them is by making it enumerable (with Object.defineProperty()
) but not sure if it makes sense because I assume you want to get the value dynamically? Like, for example:
class Context {
// Return a different value every time
get value() {
return Math.random();
}
}
Expected:
2
Actual:
ReferenceError: value is not defined