简体   繁体   English

表示在Webstorm中外部使用函数

[英]Indicate that a function is used externally in Webstorm

I feel I'm overlooking something here. 我觉得我在这里忽略了什么。 I've created a nice Typescript file, but WebStorm complains that all my functions are 'Unused'. 我创建了一个很好的Typescript文件,但WebStorm抱怨我的所有功能都是'未使用'。 Well, they are .. just not locally to the file itself. 好吧,它们......只是不在本地文件本身。 Is there some JSDoc or other commented code I can put in to tell WebStorm that I KNOW this function IS used .. just used externally? 是否有一些JSDoc或其他注释代码我可以告诉WebStorm我知道这个函数是用过的......只是在外部使用?

Yes - //noinspection JSUnusedGlobalSymbols ; 是的 - //noinspection JSUnusedGlobalSymbols ; hit Alt+Enter on your function that is reported to be unused, then hit Right and choose ' Suppress for statement ' 在您报告为未使用的函数上Alt+Enter ,然后单击Right并选择' Suppress for statement '

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM