by brainlessdev · 5y ago · 0 comments
TypeScript will believe what you tell it in a type guard's signature without looking at the body of the function further than "does it return a boolean".
I don't quite understand the criticism. You may as well say that unit tests are just as unsafe as not writing unit tests, because your test might not do what you think it's doing.
I elaborate on ways to use them effectively in the post.