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

NotEqual<A, B, Then, Else>: IsNotEqual<A, B, Then, Else>

Checks A and B are not equal.

Type Parameters

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

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

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

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