What causes the error message "the string is not assignable to iGreet" to appear?
interface iGreet {
(p: string ): string
}
class C {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet(p: string): iGreet {
return "Hello, " + this.greeting + " " + p;
}
}
let greeter = new C("world");
console.log(greeter.greet("test"))