【发布时间】:2023-02-18 19:14:28
【问题描述】:
从下面的 if 条件中抛出错误,但代码仍按预期工作。
if ((item['id'].trim()).length !== 0) {
return item;
}
错误 -
对“任意”值的不安全成员访问 .length。 eslint(@typescript-eslint/no-unsafe-member-access)
对“任何”值的不安全成员访问 .trim。 eslint(@typescript-eslint/no-unsafe-member-access)
【问题讨论】:
标签: angular typescript eslint typescript-eslint