I am trying to figure out a typescript situation where I am trying to define the output of a arrow function.
let isThisTrue:boolean = () => {
return true;
};
console.log(isThisTrue());
Can I only define a type when I am passing a value to a method? I know this example isn't really practical but I am just trying to grasp why I am unable to say that the expected output is a boolean.
Fiddle: https://jsfiddle.net/mn9efLtg/
Error: Uncaught SyntaxError: Unexpected token :