以下三种写法,可以参考:
const handleMenuClick = ({item, key, keyPath}: {item: Object, key: string, keyPath:string}) => {
}
const handleMenuClick = ({item, key, keyPath}: any) => {
}
interface SomeObj {
item: Object
key: string
keyPath:string
}
const handleMenuClick1 = ({item, key, keyPath}: SomeObj) => {
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…