...
Support for typing parameters as Objects with certain properties:
Code Block |
---|
/** * @param {Object} person * @param {String} person.name * @param {String} person.email * @param {Number} [person.age] optional "age" property */ function processPerson(person) { application.output(person.name); application.output(person.email); } |
Support for rest parameters: Allows to indicate through JSDoc that a function can take unlimited trailing arguments of the specified type:
Code Block |
---|
/** * @param {...String} someExtraStrings One or more additional String can be send into this function */ function methodWithRestParams(someExtraString){} function test() { methodWithRestParams('one', 'two', 'three', 'four'); } |
...