Vocabulary: Call signature

A call signature in TypeScript is a way to define the type of a function or method within an interface or type. It specifies the shape of a function, including the parameter types and the return type. This allows you to describe the signature of functions that can be called, including their arguments and return values. (from ChatGPT)

interface MyFunction {
  (param1: number, param2: string): boolean;
}

const myFunc: MyFunction = (num, str) => {
  return num > parseInt(str);
};

console.log(myFunc(5, '3')); // Output: true