我在接口中定义了如下函数:
interface UseAutocompleteReturnValue {
...
getRootProps: (externalProps?: any) => React.HTMLAttributes<HTMLDivElement>;
}
在我的界面中,我想创建一个名为rootProp
的props ,它将基于getRootProps
中的参数externalProps
的类型,因此本例中的类型为:
rootProps?: any
个
我怎么能做到这一点?