You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
Lucas Vos edited this page Jul 16, 2014
·
4 revisions
Operator overloading
in C# operators can be overloaded, which is not supported in Typescript.
To mimic this behaviour, we use a convention based approach, along with some helper methods.
Resulting in this kind of coding
C# sample
var P1 = new Point(1,1);
var P2 = new Point(3,3);
var P = P1 + P2;
In Typescript
var P1 = new Point(1,1);
var P2 = new Point(3,3);
var P = Ops.Add(P1 , P2);