There are two self-identity bugs that can pretty simply be fixed: TS Playground
Both of these evaluate to false:
IsEqual<{a: 1} & {a: 1}, {a: 1}>
IsEqual<{a: 1} | {a: 1}, {a: 1}>
The fix is to expand the check a touch:
type IsEqual<A, B> =
(<G>() => G extends A & G | G ? 1 : 2) extends
(<G>() => G extends B & G | G ? 1 : 2)
? true
: false;
There's also this intersection bug but I'm unaware of a fix: TS Playground
This evaluates to false:
IsEqual<{a: 1} & {b: 2}, {a: 1, b: 2}>
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too