[Typescript] What is a Function Type ? Function Types and Interfaces - Are They Related ?时间:2023-03-10 04:59:34 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 }