简体   繁体   中英

google closure not suppressing warnings

S:\\Source_Control\\Test.js:24027: WARNING - Suspicious code. The result of the 'getprop' operator is not being used. /** @suppress {suspiciousCode} */ $['player'].Player;

The suppress tag does not appear to be functioning. Am I using it wrong?

This is the code:

/** @suppress {suspiciousCode} */ $['player'].Player;

Suppress annotations are only supported at the file level or the function level.

You'll need to place your suppress annotation on the function:

/** @suppress{suspiciousCode} */
function() {
    $['player'].Player;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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