Hello!
Thanks for the explanation in this comment. However, it is still not fully clear to me (probably because I'm not familiar with Jest's toMatchObject either).
Please confirm if my understanding is correct:
let a: A;
let b: B;
// Passes if and only if `A` is identical to `B`
expectTypeOf(a).toEqualTypeOf(b)
// Passes if and only if `A extends B`
// In other words, passes if and only if the assignment `b = a` is valid
expectTypeOf(a).toMatchTypeOf(b)
Is this correct?
Thanks!!
Hello!
Thanks for the explanation in this comment. However, it is still not fully clear to me (probably because I'm not familiar with Jest's
toMatchObjecteither).Please confirm if my understanding is correct:
Is this correct?
Thanks!!