I've got a class that has a property which is a function type, which takes a function as an argument. The typescript compiler is producing a "; expected" error on the second =>. Any thoughts why? Code is below.
class Foo{
public fn: ((string) => void) => void;
}
var foo = new Foo();
foo.fn = function(logger: (string) => void): void{
logger("bar");
};
var writeToConsole = function(str: string): void {
console.log(str);
}
foo.fn(writeToConsole);