title: Annotating "zero or more parameters with any type" for Google Closure Compiler
body: <p>I have a function that is the same as <code>jQuery.noop</code>, <code>angular.noop</code> and <code>goog.nullFunction</code>: It does nothing and returns undefined, but it is convenient in the form of <code>callback(successFn || noop);</code>.</p>
  
  <p>It can be called with any number of arguments (0 or more) of any type.</p>
  
  <p>This is how I have it currently:</p>
  
  <pre><code>/**
   * @param varArgs {...*}
   */
  var noop = function(varArgs) {};
  </code></pre>
  
  <p><strong>Problem:</strong> When called without arguments, Google Closure Compiler gives me this:</p>
  
  <pre><code>Function noop: called with 0 argument(s). 
  Function requires at least 1 argument(s) and no more than 1 argument(s).
  </code></pre>
  
  <p>The funny thing is that <a href="http://docs.closure-library.googlecode.com/git-history/15160ce901b70ac9df5e7d25ae4835835738f782/closure_goog_base.js.source.html#line393" rel="nofollow">goog.nullFunction </a> is annotated for Closure Compiler, but its annotation is also flawed, it throws errors when it's called with one or more arguments:</p>
  
  <pre><code>Function noop: called with 1 argument(s).
  Function requires at least 0 argument(s) and no more than 0 argument(s).
  </code></pre>
  
  <p><strong>Question:</strong> How do I annotate my <code>noop</code> function properly?</p>