Typescript: "property does not exist on type" issue

Example:

interface Person {
  name: string;
}
let user: Person = {name: "John", age: 30};
The error occurs when an object has more properties than expected by the type.

Solution:

interface Person {
  name: string;
  age: number;
}

Beginner's Guide to TypeScript