Quantcast
Channel: Document collection (array of type) return value and parameter in JSDoc - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by Wilt for Document collection (array of type) return value and...

In the documentation for JSDoc on http://usejsdoc.org/ there is an example given for an array with members of type MyClass. There are two possibilities. One looks like this:@param{MyClass[]}The other...

View Article


Answer by Gajus for Document collection (array of type) return value and...

Given a screenings parameter:screenings = [ { timestamp: 1440157537, url: 'https://stackoverflow.com/a/22787287/1269037', }, { timestamp: ..., url: ..., },];You can document it one of the three...

View Article


Answer by Len for Document collection (array of type) return value and...

Although you may find that the guidance given in some of the other answers works for you, I prefer this syntax:/** * @return {Array<String>} ... */And in comparison to the guidance others have...

View Article

Answer by dmertl for Document collection (array of type) return value and...

If you're looking for how to document the type of objects in an array, you want something like this:/** * @param {String[]} aliases */Here inside curly-braces the String[] is the parameter type: type...

View Article

Answer by Seyeong Jeong for Document collection (array of type) return value...

As per doco @returns/** * @returns {Array} Lines from the file. */function readLines(filepath) {}Also see.

View Article


Document collection (array of type) return value and parameter in JSDoc

How to document Array return value (and parameters) in JSDoc when array elements can be either of the following:A type (e.g. String, Array).An object literal.

View Article
Browsing latest articles
Browse All 6 View Live