I've added the code that gives me the error to [TypeScript's playground](https://www.typescriptlang.org/play/index.html#src=interface%20Car%20%7B%0D%0A%20%20%20%20make%3A%20string%2C%0D%0A%20%20%20%20model%3A%20string%2C%0D%0A%20%20%20%20year%3A%20number%0D%0A%7D%0D%0A%0D%0Afunction%20repairCar(car%3A%20Car)%20%7B%0D%0A%0D%0A%7D%0D%0A%0D%0Alet%20myCar%20%3D%20%7B%0D%0A%20%20%20%20make%3A%20'Honda'%2C%0D%0A%20%20%20%20model%3A%20'Accord'%2C%0D%0A%20%20%20%20year%3A%201992%2C%0D%0A%20%20%20%20color%3A%20'red'%0D%0A%7D%0D%0A%0D%0ArepairCar(myCar)%3B%0D%0A%0D%0Alet%20myCar2%3A%20Car%20%3D%20%7B%0D%0A%20%20%20%20make%3A%20'Honda'%2C%0D%0A%20%20%20%20model%3A%20'Accord'%2C%0D%0A%20%20%20%20year%3A%201992%2C%0D%0A%20%20%20%20color%3A%20'red'%0D%0A%7D), you'll see the error at the object assignment at the bottom. 

```
interface Car {
    make: string,
    model: string,
    year: number
}

function repairCar(car: Car) {

}

let myCar = {
    make: 'Honda',
    model: 'Accord',
    year: 1992,
    color: 'red'
}

repairCar(myCar);

```

But when I add this code:

```
let myCar2: Car = {
    make: 'Honda',
    model: 'Accord',
    year: 1992,
    color: 'red'
}

```

I get this error: 

> 
> Type '{ make: string; model: string; year: number; color: string; }'
>  is not assignable to type 'Car'. Object literal may only specify
>  known properties, and 'color' does not exist in type 'Car'.
> 
> 
> 

I don't understand why it is allowed to have the excess property on the object that gets passed to the repairCar function but not at the time when it gets assigned to a variable that has a type annotation, it's the same interface.