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