开发者

How to @suppress multiple warnings with Closure Compiler?

开发者 https://www.devze.com 2023-03-09 00:37 出处:网络
It\'s possible to suppress warnings on a per-file basis with Google\'s Closure Compiler via the @suppress annotation.However, it doesn\'t seem to be possible to suppress multiple warnings at the same

It's possible to suppress warnings on a per-file basis with Google's Closure Compiler via the @suppress annotation. However, it doesn't seem to be possible to suppress multiple warnings at the same time--for example the globalThis and checkVars warnings. 开发者_开发知识库I tried both

/**
 * @fileoverview
 * @suppress {globalThis checkVars}
 */

and

/**
 * @fileoverview
 * @suppress {globalThis,checkVars}
 */

but both result in the @suppress annotation being ignored. Multiple @suppress lines also do not work.


Separate the types with the pipe character (eg: '|').

/**
 * @fileoverview
 * @suppress {globalThis|checkVars}
 */
0

精彩评论

暂无评论...
验证码 换一张
取 消