簡體   English   中英

JSDoc:如何聲明內聯參數

[英]JSDoc : How to declare inline params

我無法使用 jsdoc 3.5.5 來生成內聯注釋的文檔。 請參閱附件示例:

/**
 * my TestCase Class
 */
class TestCase {

    doesntWorkA(/** String */ str) /** Number */ {
        return 5;
    }

    doesntWorkB(/** @type {String} */ str) /** @type {Number} */ {
        return 5;
    }


    /**
    * @param {String} str
    * @return {Number}
    */
    works(str) {
        return 5;
    }
}

這是一個示例,展示了如何內聯使用它:

 hooks.run.tap('xxxx',/** @param {WebpackCompilation} compilation */ compilation => {
  ...
 });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM