Type alias IsEqual<A, B, Then, Else>
IsEqual<A, B, Then, Else>: [A, B] extends [B, A] ? BothNever<A, B, Then, Else, BothAny<A, B, Then, Else, IdentityEqual<A, B, Then, And<IsObject<A>, IsObject<B>, IdentityEqual<Properties<A>, Properties<B>, [A, B] extends [((...args) => any), ((...args) => any)] ? IsEqual<P1, P2, Then, Else> : Then, Else>, [A, B] extends [B, A] ? Then : Else>>>> : And<IsSymbol<A, { distributive: false; }>, IsSymbol<B, { distributive: false; }>, Then, Else>
Type Parameters
-
A
-
B
-
Then = true
-
Else = false
Checks
A
andB
are equal.Note that intersection type checks only works at first level. It cannot be check recursively, or else will run into infinite recursion if the type includes recursive types.