理解 +补全 else 中的代码。【标 T1 行的代码】
remove(key: string): any
remove(key: string, option: OPTION, propkey: string, propvalue: any): any
remove(key: string, option: OPTION = OPTION.NONE, propkey: string = '', propvalue?: any) {
if (option === OPTION.ADDORAPPOBJTOARR) {
//1
const arr: any[] = goodStorage.get(key, [])
// 2
const keyValsOfObj = getValArrOfObj(arr, propkey)
// 3
const eleIndex = keyValsOfObj.indexOf(propvalue)
// 4
if (eleIndex > 0) {
arr.splice(eleIndex, 1)
goodStorage.set(key, arr)
}
}else {// T1
}
}