Support rest types in Syntax section of reference #836
+16
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of our signatures now support rest types, e.g. createVector. We currently do not display or type check this correctly. I've made a PR here to support type checking processing/p5.js#7803, and this adds the capability to display them in the reference.
It currently looks like this, using @GregStanton's idea borrowing from MDN the

x1, x2, ..., xn
syntax.The
Number:
type is a little awkward here, but probably fine for now, and better than what we currently have.For reference, how some other things display variadic arguments:
JavaScript
If we want the syntax section to reflect how one would write this in your own function, it would be:
...and also we'd document
components
as an array.MDN
w3schools
Three.js
Lodash
Immutable.js
Oracle Java docs