A property where operations that violate a data type are caught, at compile time or run time, to prevent unintended bugs.
Statically typed languages are generally considered to have high type safety, since they can catch errors early—such as trying to treat a string as a number. Even dynamically typed languages can improve type safety by adding a type-checking layer, such as TypeScript.
© 2026 ITBGM