Equals
Let you test if two types are the same
Implement compile time unit testing
A less trivial example: The code and it's corresponding test file.
If you are writing tests for your type, you definitely want to checkout //@ts-expect-error
Making sure all properties of an object are deconstructed
Making sure all cases of a switch are dealt with
Guaranteeing that a zod schema matches a given type
Last updated