Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to @suppress multiple warnings with Closure Compiler?

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.

like image 520
mjs Avatar asked May 30 '11 10:05

mjs


1 Answers

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

/**
 * @fileoverview
 * @suppress {globalThis|checkVars}
 */
like image 186
Andy Avatar answered Nov 15 '22 10:11

Andy