How to test if two types are exactly the same
Ah, the type-level equality operator. @MattMcCutchen has come up with a solution involving generic conditional types which does a decent job of detecting when two types are exactly equal, as opposed to just mutually assignable. In a perfectly sound type system, “mutually assignable” and “equal” would probably be the same thing, but TypeScript isn’t perfectly … Read more