我有一个类型为Function
的变量。然后,我将此函数初始化为带有两个字符串参数的函数:
let aux2: Function = (draftId: string, mode: string) => {...}
我想知道是否只能使用具有两个字符串参数的let aux2: Function
实例化Function
变量,像这样:
let aux2: Function<string, string> = (draftId: string, mode: string) => {...}