如何解决JetBrains WebStorm的“未解决的变量webServ"警告? [英] How do I resolve JetBrains WebStorm 'Unresolved variable webServ' warning?
问题描述
我正在使用
由于未在代码中的任何位置定义 webServ
(传递给 delete()
),则无法使用静态代码分析来解决.您可以使用注释来取消对语句的此类警告(按 Alt + Enter
,然后按 Right
,选择抑制语句).另请参见 https://youtrack.jetbrains.com/issue/WEB-17419#comment = 27-1058451 , https://intellij-support.jetbrains.com/hc/zh-CN/community/posts/206349469-disable-unresolved-variable-on-json-object-ajax调用收到的其他可能的解决方法
I'm utilizing WebStorm IDE for node.js development and I'm trying to cleanup all the WebStorm warnings and errors.
The remaining error is a 'Unresolved variable webServ' warning, but the use of the req.params.webServ is correct.
I don't want to just remove the WebStorm 'Unresolved variable...' warning.
How do I resolve this WebStorm IDE warning?
As webServ
is not defined anywhere in your code (except for root path string passed to delete()
), it can't be resolved using static code analysis. You can suppress such warnings for statement using comments (hit Alt+Enter
, then hit Right
, choose Suppress for statement).
See also https://youtrack.jetbrains.com/issue/WEB-17419#comment=27-1058451, https://intellij-support.jetbrains.com/hc/en-us/community/posts/206349469-disable-unresolved-variable-on-json-object-received-by-ajax-call for other possible workarounds
这篇关于如何解决JetBrains WebStorm的“未解决的变量webServ"警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!