Typegatewayv0.4.1
IsEqual
Returns a boolean for whether the two given types are equal.
https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650 https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
Use-cases: - If you want to make a conditional branch based on the result of a comparison of two types.
type IsEqual<A, B> = [A] extends [B]
? [B] extends [A]
? _IsEqual<A, B>
: false
: false;A
AB
B