
1 Lqxc Sep 14, 2022 via Android 还需要点上下文 |
2 cyrbuzz Sep 14, 2022 XXX.specs?.item?.type === 'array'。 |
3 IvanLi127 Sep 14, 2022 要么你得先在前面加判断,判断出是 `XXX.specs` 是 `booleanDateType`;要么直接把 `XXX.specs` 强转成 `booleanDateType`。 |
4 lovedebug Sep 14, 2022 你这是在操作类型啊,不是值 |
5 Leviathann Sep 14, 2022 stringDateType 怎么定义的? |
6 renmu Sep 14, 2022 via Android //@ts-ignore |
7 Balibabo Sep 14, 2022 ``` x?.x?.x?.item ``` 可解 99% 的 not exist 问题 |
OP const arr = XXX.specs as ArrDateType;定死类型就行了 |
9 PerFectTime Sep 14, 2022 //@ts-ignore 手动狗头 |