Remix.run Logo
ZephyrBlu 2 months ago

You can lie to TypeScript extremely easily in a way that you can't do in strongly typed languages.

colejohnson66 2 months ago | parent [-]

Even 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.