Typescript method overloading

kreuzerk

kreuzerk

Posted on November 22, 2018

Typescript method overloading

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

💖 💪 🙅 🚩
kreuzerk
kreuzerk

Posted on November 22, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related