How to make optional arguments
Asked by
bob saget
I want to make a self documenting function snippet with any optional number of arguments, so for example
function moo(a, b) {
}
would get
/**
* TODO
* @method moo
* param {} a
* param {} b
**/
With a, b and any other arguments being completely optional (including no arguments). Something like infinitely optional arguments would be great
* {?@param {} $n}
function ${1:function_
Or something like that,. Is that possible?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask bob saget for more information if necessary.
To post a message you must log in.