3 ms·
You can lie to TypeScript extremely easily in a way that you can't do in strongly typed languages.
by ZephyrBlu 1y ago
You can lie to TypeScript extremely easily in a way that you can't do in strongly typed languages.
- colejohnson66 1y agoEven in a strongly typed language like Java or C#, nothing stops `(string)(object)42`. It all compiles and fails at runtime, like TypeScript. No matter what language you’re in, the second you use a cast, you’re asserting to the compiler that you know more than it.