-
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Our current display of method signatures leaves out any means of marking varargs and optional args.
A quick few examples:
- a single optional vararg (
optional: true
,repeatable: true
) should be:
console.log([...data])
but isconsole.log(data)
- a single optional arg (
optional: true
) should be:
console.log(data)
but isconsole.log(data)
- a single vararg (
repeatable: true
) should be:
console.log(...data)
but isconsole.log(data)
There's more complex cases like multiple optional arguments:
- for example, Node shows:
util.inspect(object[, showHidden[, depth[, colors]]])
As you can see, they typically nest the optional brackets. There's other cases where they don't:
console.timeLog([label][, ...data])
It's not clear to me if they don't nest when the last optional arg is varargs, or in other cases too? (We don't really have a means of relating optional arguments to one another in our doc structure to control nesting here)
Metadata
Metadata
Assignees
Labels
No labels