code: public boolean addOptionalParams(JSType ...types) {
      if (hasVarArgs()) {
        return false;
      }
  
      for (JSType type : types) {
        newParameter(registry.createOptionalType(type)).setOptionalArg(true);
      }
      return true;
    }
docs: Add optional parameters of the given type to the end of the param list.
  @param types Types for each optional parameter. The builder will make them
  undefine-able.
  @return False if this is called after var args are added.