Re:TypeScript 4.1
by kungito on Saturday November 21, 2020 @10:42AM
(#25170259)
You can always describe what has been done with the string by boxing it into an expressive type. Your other example is that when dealing with bad external code you need to do additional checks. That's a specific scenario and every language which exists has to deal with it in the same way. In more powerful languages you could infer which checks need to be done from the type and do the automatically for external code
[ Parent
| on HN ]
There are no comments on this comment yet.