-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Operator Overloads #5407
Copy link
Copy link
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionDuplicateAn existing issue was already createdAn existing issue was already createdOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionDuplicateAn existing issue was already createdAn existing issue was already createdOut of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraints
It would simplify a lot of use cases if we could override relational, equality, additive, and Multiplicative operators.
My initial thoughts on how this would work is that functions would replace the operators with functions when compiling to JavaScript.
Becomes: