Exact type matching: ensure no extra properties.
The type to validate
The exact shape to match
Validates that T matches exactly the shape of Shape. Useful for type-level validation or enforcing strict interfaces.
T
Shape
type A = Exact< { a: number }, { a: number } >; // { a: number }type B = Exact< { a: number; b: number }, { a: number } >; // never Copy
type A = Exact< { a: number }, { a: number } >; // { a: number }type B = Exact< { a: number; b: number }, { a: number } >; // never
Exact type matching: ensure no extra properties.