title: Why does TypeScript compiler behave differently when function called with an identical object in my example?
body: <p>Code snippet:</p>
  <pre><code>interface Named {
    firstName: string
    lastName: string
  }
  
  const makeFullName = (item: Named) =&gt; ({
    ...item,
    fullName: `${item.firstName} ${item.lastName}`
  })
  
  const me = { firstName: 'alexander', lastName: 'rodin', age: 26 }
  
  makeFullName({ firstName: 'alexander', lastName: 'rodin', age: 26 }) // 1st call error
  makeFullName(me) // 2nd call is ok
  </code></pre>
  <p>I can't understand why I don't have an error on the second call and have an error on the first call, because I pass an identical object in both cases.</p>
  <p>Run in <a href="https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgHJwLYQCbIN4BQyyMwUAzmOlgFzKVSgDmRyANnJdRHQ8wQF8CBBAHsQlZBjgBrCADEArmzbdkAXmQAKYJAx1u2AJQaAfNsLEAdDd0QMAGlYxlqzD2QADACR47GK1IKKncBZF9-Kw4uUM9BI2ExCTApFE08EjIY2mQAcjg2CAAPOBBsaFyHdk4QnNyoUWxQSuQ4Jg8AJgA2ZCECaTklFW4tDKDsj3zCkrKKqujayYamkBa2zp6BBIGFVxGsIyA" rel="nofollow noreferrer">TS Playground</a></p>