The code below outputs an error as it should:
const a = { a: 1 }
const b: typeof a = { a: 2, b: 3 }
// Error: Type '{ a: number; b: number; }' is not assignable to type '{ a: number; }'.
But this piece of code does not output an error:
const a = { a: 1 }
const b = { a: 2, c: 3 }
const c: typeof a = b
What is the problem with the second code block? And is there a way to enforce type checks there?