documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Support export namespace

Open goodmind opened this issue 6 years ago • 3 comments

Support namespace exports in --document-exported

export * as Something from './file'

goodmind avatar May 05 '19 07:05 goodmind

I have the same problem. just need to add exportNamespaceFrom in plugins list in https://github.com/documentationjs/documentation/blob/master/src/parsers/parse_to_ast.js

ridergoster avatar May 07 '19 14:05 ridergoster

@ridergoster no, not only this should be added, --document-exported should support namespace exports too

goodmind avatar May 07 '19 15:05 goodmind

As a workaround you could import the module you want documented as an alias. Then create a variable to be documented and export it.

For example:

import {thing as _thing} from './place';

/**
 * Documentation for the thing
 */
export let thing = _thing;

goatonabicycle avatar Mar 12 '21 11:03 goatonabicycle