Skip to main content

Type Alias: Equivalent<A, B>

type Equivalent<A, B> = [A] extends [B] ? [B] extends [A] ? true : false : false;

Defined in: packages/overcast-core/src/types/index.ts:8

true when A and B are mutually assignable (structurally equivalent). Preferred over invariant equality for comparing a z.infer object against a composed type like Omit<…> & Record<…>: those are the same shape but not token-identical, so a strict equality check reports a false mismatch. The tuple wrappers stop the conditionals distributing over unions.

Type Parameters

Type Parameter
A
B