Using jsdoc with and es2015 module syntax

I have two small problems in jsdoc 3.4.0 when using es2015 module syntax.

1) Code example:

/** @module */

/** Example for a local function */
function localFUnction() {}

/** Example for an exported function */
function publicFunction() {
    localFUnction();
}

export default {
    publicFunction
};

leads to:

Module: module/module
Methods
(inner) localFUnction()
Example for a local function

(inner) publicFunction()
Example for an exported function

and does not recognize that the publicFunction is exported and identifies both functions as internal.

2) Example code:

/** @module */

/** Example for a local function */
function localFUnction() {}

/** Example for an exported function */
export function publicFunction() {
    localFUnction();
}

leads to:

Module: module/module
Methods
(static) publicFunction()
Example for an exported function

(inner) localFUnction()
Example for a local function 

and now recognizes that the export syntax indicates the public function as static.

I'm not sure if something is wrong, or I'm just using it incorrectly, and any help is appreciated.

+4
source share

All Articles