Javascript autocomplete / Atom Ternjs JsDoc Docblockr

Date: 2018-10-17
/**
 * This is a class that represents a duck
 */
class Duck {
/**
 * Let the duck quaak
 * @param  {string} the_word [description]
 * @return {HTMLElement}          [description]
 */
    quaak(the_word)
    {
        return new HTMLElement();
    }
}

/**
 * [cb description]
 * @type {Duck}
 */
let b = null;
let el = b.quaak('test');

/**
 * Put a HTMLElement on fullscreen
 * @param {Duck} a Duck to put on fullscreen
 * @param {Number} b Number to hold on to
 */
function test(a, b){
    a.quaak();
    return a + b;
}

const resolve = (a) => {};

/**
 * testFirstLvl description
 * @param {Number} a Give a number
 * @returns {Number}
 */
let testFirstLvl = (a) => 0;


/**
 * testFirstLvl2 description
 * @param {Number} a Give a number
 * @returns {Number}
 */
let testSecondLevel = (a) => 0;

/**
 * The sample namespace
 * @typedef {Object} ITestLevelGen
 * @property {testFirstLvl} testFirstLvl
 * @property {testSecondLevel} testSecondLevel
 */


/**
 * Test namespace
 * @type {ITestLevelGen}
 */
let namespaceTest = resolve('test');
namespaceTest.testFirstLvl();
namespaceTest.testSecondLevel();
apm install atom-ternjs docblockr
# configure ternjs per project

 

14720cookie-checkJavascript autocomplete / Atom Ternjs JsDoc Docblockr