Typescript method overloading

Method overloading is a familiar concept from traditional programming languages like Java or C#. It allows a class to have multiple methods with the same name if their signature is different.

But Typescript only helps us during edit and compile time and not at runtime. Therefore method overloading works differently. The executed code is still pure Javascript.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store