Method overloading is a familiar concept from traditional programming languages like Java or C#. It basically 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 different. The executed code is still pure Javascript.
Due to the dynamic nature of JavaScript we can’t use overloading in the same way we do in other languages. Find out how method overloading works in TypeScript
Top comments (3)
Did you know that on dev.to there is an option to automatically import your post from medium? And can use canonical url without affecting SEO rank?
Hi Camilo Martinez. No, I am new to dev.to and did not know about this feature. How can I enable it?
You can setup on: dev.to/settings/publishing-from-rss