如何使用Closure Compiler @suppress多个警告?

mjs*_*mjs 6 compiler-construction suppress compiler-warnings google-closure-compiler

可以通过@suppress注释使用Google的Closure Compiler在每个文件的基础上抑制警告.但是,似乎不可能同时抑制多个警告 - 例如globalThischeckVars警告.我试过了两个

/**
 * @fileoverview
 * @suppress {globalThis checkVars}
 */
Run Code Online (Sandbox Code Playgroud)

/**
 * @fileoverview
 * @suppress {globalThis,checkVars}
 */
Run Code Online (Sandbox Code Playgroud)

但两者都会导致@suppress注释被忽略.多@suppress行也不起作用.

小智 13

使用管道字符分隔类型(例如:'|').

/**
 * @fileoverview
 * @suppress {globalThis|checkVars}
 */
Run Code Online (Sandbox Code Playgroud)