Consider the following code from the typescript handbook call_signatures:
type DescribableFunction = {
description: string;
(someArg: number): boolean;
};
function doSomething(fn: DescribableFunction) {
console.log(fn.description + " returned " + fn(6));
}
Now I want to initialise a DescribableFunction
object, but I'm not sure what I should pass as the second argument. What constitutes to a valid DescribableFunction
object in this situation?