3 ms·
TypeScript does have method overloading same as other typed languages (except you have to do runtime checks, but that is a JavaScript limitation).
by zaccusl 6y ago
TypeScript does have method overloading same as other typed languages (except you have to do runtime checks, but that is a JavaScript limitation).
- munchbunny 6y ago> except you have to do runtime checks, but that is a JavaScript limitation IMO not having to do runtime checks is a big part of the value proposition of method overloading the way many languages do it. Whether or not it’s a limitation inherited from JavaScript, it’s still really klunky compared to other mainstream languages. It’s one of the few things that I actually dislike about TypeScript, despite overall loving it.