01 / 06
What it looks at is the shape, not the name
You have been naming shapes with interface, but what TypeScript looks at is the shape of the contents, not the name.
Try passing a plain object that never claimed to be a Person into a function that takes a Person. As long as the properties it needs are all there, it goes straight through.
interface Person { name: string;}function callBy(p: Person): void { console.log(p.name + "!");}const x = { name: "Yui" };callBy(x);Result
Yui!