3 ms·
Strong or weak typing doesn't have an impact type safety. TypeScript is statically typed which guarantees type safety. TypeScript is often used in web environ
by shepherdjerred 3y ago
Strong or weak typing doesn't have an impact type safety.
TypeScript is statically typed which guarantees type safety.
TypeScript is often used in web environment which often leads to developers defeating the type system. For example, applications often cast some user input, API response, or local storage to an expected type, but that is not a limitation of TypeScript, and would not necessarily be solved by using some other language like Go or Rust.
TypeScript is an unsound type system [0], but in practice this doesn't have any real impact on most web applications.
[0]: https://www.typescriptlang.org/docs/handbook/type-compatibility.html https://www.typescriptlang.org/docs/handbook/type-compatibil...