Articles

0

Like

TypeScript - Function / Constructor Overloading

(http://idreesdotnet.blogspot.com/2016/03/typescript-function-constructor.html)
TypeScript supports overloading of functions/constructor, but not in the same way as in .Net. Since JavaScript does not provide support of overloading itself, TypeScript enforces strong typing against the various overload signatures at design time, the function name is the same, but the signature of each overload (i.e. their name and parameters, but not the return type) is different. But we still have to write a generalized function that could work in generated JavaScript code, that is compatible with all overloads signatures, and will have only one function implementation.
Posted by: Muhammad Idrees
On 14 Mar 2016 | Views: 561 | Categories: Visual Studio, Tips & Tricks, Other, ASP.NET
Comments(0)

Post your comments

 

Other lins

.Net Techies
Other lins