webdoc-labs / webdoc

Documentation generator for the web
https://www.webdoclabs.com
Other
79 stars 9 forks source link

Issue using @ignore with Classes #132

Closed bigtimebuddy closed 3 years ago

bigtimebuddy commented 3 years ago

Here's a reproduction: https://github.com/bigtimebuddy/webdoc-ignore-bug

Example

In this example multiple classes are ignored, but the first still shows up in the docs. I expect to see none of these classes.

/**
 * @ignore
 */
export class FirstIgnoreClass {}

/**
 * @ignore
 */
export class SecondIgnoreClass {}

/**
 * @ignore
 */
export class ThirdIgnoreClass {}

Actual Result

Output export looks like this. FirstIgnoreClass is still exported.

{
    "version": "1.0.0",
    "metadata": {
        "linker": "(unsigned)",
        "siteRoot": ""
    },
    "root": {
        "id": "root-UnV77xJ2i155q76tLrj6R",
        "name": "",
        "type": "RootDoc",
        "members": [{
            "id": "Lpv4DtLjtOa78bc6Ijg6R",
            "name": "FirstIgnoreClass",
            "brief": "",
            "type": "ClassDoc",
            "members": [{
                "id": "SMzxRTXGkwVQvmxSZS8jC",
                "name": "constructor",
                "brief": "",
                "access": "public",
                "scope": "instance",
                "type": "MethodDoc"
            }]
        }]
    },
    "registry": {
        "Lpv4DtLjtOa78bc6Ijg6R": {
            "uri": "FirstIgnoreClass.html"
        },
        "SMzxRTXGkwVQvmxSZS8jC": {
            "uri": "FirstIgnoreClass.html#constructor"
        }
    }
}

Workaround

Using @private, while still exports to the class, will hide it from the template.