Ale*_*.P. 2 javascript destruction eslint
我的代码中有这样的代码:
let [a, b, c, d, e] = await component.getState.call(game.gameId);
Run Code Online (Sandbox Code Playgroud)
变量b,c,e下面使用的代码,但不a和d.同时我有一个标记未使用变量的eslint检查.
有没有办法编写更正确的破坏来解决这个问题?我知道esling-disable-line no-unused但更愿意避免它.
用空占位符替换它:
let [, b, c, , e] = await component.getState.call(game.gameId);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
280 次 |
| 最近记录: |