Your definition of type safety might not include validation + using the type to carry proof of that validation throughout the life of the program.
For examples see:
https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...