Function Type:
type messageFn = (name: string) => string; function sayHello(name: string): string { return `hello ${name}` } const sayHello: messageFn = sayHello;
Interface:
interface messageFn { (name: string): string }