You can use @suppress {duplicate}
to ignore this warning:
/**
* @this {Array}
* @param {*} item
* @param {number=} from: ignored
* @return {number}
* @suppress {duplicate}
*/
Array.prototype.indexOf = function(item, from) {
// ...
}
I am not sure about the implications redefining the method has on optimizations from the Closure Compiler in ADVANCED mode, though.