Allow arithmetic operations on objects that have valueOf()
method
#48503
Labels
Duplicate
An existing issue was already created
valueOf()
method
#48503
Suggestion
π Search Terms
valueOf
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Allow arithmetic operations on objects that have
valueOf()
method which returns type compatible with arithmetic operationsπ Motivating Example
Currently this produces errors:
But this works perfectly fine with vanilla JavaScript
π» Use Cases
Creating wrappers for primitive types that could be used as a target for
Proxy
The text was updated successfully, but these errors were encountered: