google / tern-closure

A Tern plugin adding Closure support.
Apache License 2.0
32 stars 18 forks source link

Support varargs #20

Open jgiles opened 10 years ago

jgiles commented 10 years ago

Example:

/** @param {...ParamType} var_args */
var fnVarArgs = function(var_args) {
  arguments; //: [ParamType]
  var_args; //: ...ParamType
};
fnVarArgs; //: fn(var_args: ...ParamType)

This will always be a bit of a hack because we'd have to apply the varargs type to the entire arguments variable, but it would be serviceable.