Largely designed for statically typed languages – they rely on having a compiler.
These patterns are designed or intended to:
Communicate input and output expectations through API.
Ensure correctness through type safety.
Only allow an instance of a type to exist, if it meets certain criteria.
Favour compile time errors over runtime errors.
By making it impossible to compile incorrect code, correctness and quality is maintained, with fewer tests.