3 ms·
Because the type system is unsound, you could add an error to your implementation and the type system will not catch it. It will happily tell you that everythin
by agentultra 2y ago
Because the type system is unsound, you could add an error to your implementation and the type system will not catch it. It will happily tell you that everything type checks.
How do you use that to prevent errors?
- auggierose 2y agoYes, that can happen. Just as a sound type system will also not prevent all possible bugs. So what? TypeScript's type system helps me to prevent many bugs by performing standard sanity checks, and is a very practical tool. Just rephrase your question as "How will a pervasive system of sanity checks help me prevent errors?", and I hope you agree that it kind of answers itself.