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

后端 未结 5 1417
甜味超标
甜味超标 2020-12-08 14:30

How to document Array return value (and parameters) in JSDoc when array elements can be either of the following:

  • A type (e.g. String,
5条回答
  •  情书的邮戳
    2020-12-08 14:57

    As per doco @returns

    /** 
     * @returns {Array} Lines from the file.
     */
    function readLines(filepath) {
    }
    

    Also see.

提交回复
热议问题