myFuncResult interface {
abc: string
}
function myFunc():myFuncResult {
if(something) return { abc:'abc' } //ok here
return 'result' //but this line gave me warning
}
我有两种基于条件的结果类型(对象和字符串),如何在我的界面中声明它?
一只斗牛犬
慕运维8079593
狐的传说
随时随地看视频慕课网APP
相关分类