Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Class properties aren't included in output YAML #13

@pmn

Description

@pmn

It doesn't seem possible to report properties on a class using this library. The example below works well in vanilla JSDoc, but the properties don't show up anywhere. The method does show up in the YAML although it doesn't mark it as async.

How do properties need to be annotated so that they turn up in the DocFX YAML?

/**
 * A fruit
 * @param name {string} - The name of the fruit
 * @property color {string} - The fruit's color
 * @property weight {float} - The fruit's weight.
 * @property sourceFarm {Object} - The farm the fruit was grown in.
 */
class Fruit {
    constructor(name) {
        this.name = name;
       
        let fruitData = getFruitData(name);

        this.color = fruitData.color;
        this.weight = fruitData.weight;
        this.sourceFarm = fruitData.sourceFarm;

       /** Eat the fruit */
       async function eat() {
           // Eat the fruit... 
       } 
}

JSDoc output:

Screen Shot 2021-03-23 at 14 33 50

Doc2FX output:

Screen Shot 2021-03-23 at 14 38 53

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions