Skip to content

entry point restricting class member documentation #388

Closed
@datamadic

Description

@datamadic

I believe this is similar to both issue 186 and issue 172 but it may warrant a ticket itself.

My goal is to generate docs for a library with a single entry point that documents the public methods and properties (from the root's perspective) while excluding modules that may be used internally.

For example (in the snippet below) if Main is to be my entry point I would want thing1 in the Properties section of Main's generated documentation to be a link to the Thing1 class. This is the case if I generate the docs without the entryPoint flag. The issue is that the unwanted Thing2 is also documented (even with --excludePrivate it ends up in the Externals section). If I generate with with the entryPoint flag the Thing1 link in the Properties section just becomes a link back to the main page.

Is there some combo of flags / settings that I am overlooking that allows me to have docs generated from an entry point's perspective allowing links to properties without documenting all Externals? Apologies for taking your time if this is already possible!

An example repo

// main.ts
import Thing1 from "./thing1";
import Thing2 from "./thing2";

export default class Main {
    thing1: Thing1;

    constructor() {

        // used internally, no need to document this
        let other = new Thing2();

        // this is user facing, should be documented
        this.thing1 = new Thing1();
    }
}
// Thing1.ts
export default class Thing1 {
    pub() {
        console.log('thats public');
    }
    private prv() {
        console.log('thats private');
    }
}
// Thing2.ts
export default class Thing2 {
    fn() {
        console.log('so hidden');
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions