Typescript: "type x is not assignable to type y" issue
Example:
interface Cat {
purr(): void;
}
interface Dog {
bark(): void;
}
let pet: Cat = { bark() {} };
Occurs when assigning a value to a variable, and the types aren't compatible.
Solution:
let pet: Dog = { bark() {} };