带有声明的元组的 typescript lint "no-unused-vars"

标签 typescript tuples eslint tslint

我有一行代码看起来像这样:

const [full, text, url] = markdownLink.exec(match) || [null, null, '']

但是我没有使用 full并且 linter 给了我一个警告。

Line 28: 'full' is assigned a value but never used



我想像这样声明元组,但我不需要 full .是否有一种句法方法可以通过完全跳过来解决这个问题?

最佳答案

关于带有声明的元组的 typescript lint "no-unused-vars",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57676483/

相关文章:

javascript - 将嵌套的 Json 转换为带有 parentId 的平面 Json 到每个节点

Angular:如何在有多个下拉菜单的 ng-bootstrap 下拉菜单中检测切换状态

html - 单击 Ionic 3 展开标题

javascript - 使用 moment.js 获取指定时区的时间

python - 从列表中删除重复的无序元组

Python搜索元组列表并根据具有多个条件的索引返回

javascript - 获取 eslint 快速修复,以便在 VSCode 中的 HTML 中使用 JavaScript

javascript - Vue.js eslint 解析错误。 : unexpected token

javascript - 如何将其重构到 ES6 中?