Type Alias Equal<A, B, Then, Else>

Equal<A, B, Then, Else>: IsEqual<A, B, Then, Else>

Checks A and B are equal.

Type Parameters

  • A
  • B
  • Then = true
  • Else = false

this will be changed to filter variant in the future. Please use IsEqual for the predicate behavior.

type R = Equal<1, 1> // true
type R = Equal<any, any> // true
type R = Equal<boolean, boolean> // true
type R = Equal<true, true> // true
type R = Equal<[1], [1]> // true

type R = Equal<boolean, true> // false
type R = Equal<any, 1> // false
type R = Equal<[any], [1]> // false
type R = Equal<{ a: 1 }, { a: 1; b: 2 }> // false