Skip to content

Config option to exclude not explicitly documented symbols #995

@canonic-epicure

Description

@canonic-epicure

It seems, currently the approach used by TypeDoc is that all symbols in the source files are included in the resulting documentation. It goes that far, that even symbols that are not exported from the module (and thus not accessible by the users) are also included by default, and one need to use special config to exclude them (excludeNotExported). So users need to explicitly opt-out for specific symbols.

It is probably a reasonable default for the internal documentation, that is supposed to be used by developers, working on the project. However, if the documentation is being written for the end users, the better default would be to opt-in for documentation and hide all symbols that are not explicitly documented.

consider this:

/**
 * This is my cool helper
 */
export function myHelper () : number {
    return helper1() + helper2() + helper3() + ... + helper10()
}

const helper1 = () => 1
const helper2 = () => 2
const helper3 = () => 3

Here the myHelper is a public function and all helperX are private. I'd like to have an option to only include myHelper in the docs, based on the fact, that it is explicitly documented, and, since the helperX helpers have no documentation comments, assume those are private.

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