|
|
|
|
|
by epolanski
830 days ago
|
|
This statement is quite questionable starting from the fact that there is no definition for what strong typing is. Care to provide what you mean? Strict TS won't compile pretty much any type-unsafe operation. It's not perfect, the standard libraries are a bit too unsafe type wise, exceptions are untyped and need Either/Result-like data types to be handled but it's an extremely powerful language if you know it and it's ecosystem. Most people though don't even bother reading the docs and can't tell you what a mapped type is or what is a disjointed union, etc. |
|
As soon as you have third party code calling your methods all bets are off. It could be JS calling your methods, or there simply is a hidden cast somewhere.
This is the moment that you realize that type annotations really are just a compile-time fiction, much like Python. At least in my definition, this is weak typing as the variable is physically capable of changing to any type at runtime, despite its type annotations.