|
|
|
|
|
by olmo
3752 days ago
|
|
Sorry moron4hire but you are underestimating TS types system. You can write quite crazy expressions abusing Boolean operators and he successfully keeps the static type. You can also have different method overloads signatures as long as you have a more general implementation that does the dynamic checks at run-time manually. Most of the time you can use Union types anyway. The big collection of definition files for almos any JS library out there is a living proof of how is possible to describe statically almost any JS API. Let's face it, dynamic languages are about laziness, not about 'unconstraibed creativity' |
|