Typedoc: @private does not respect --excludePrivate

Created on 16 May 2017  路  4Comments  路  Source: TypeStrong/typedoc

If you use @ private, the member is still visible even though --excludePrivate was set to true. The member was only marked as private in the documentation.

Most helpful comment

For anyone else that stumbles across this with the same problem, the --excludePrivate flag currently only works for private class members. It does not work for anything else decorated with /** @private */.

The simplest way I've found to hide other things, short of using a custom fork or plugin, is to simply add the following css:

.tsd-is-private {
    display: none;
}

TypeDoc is awesome, but is really hard to work on. The codebase could do with a bit of sanitization (remove grunt, use ts-node to run the tests without having to build them...). I'll have a think and raise a seperate issue / PR for that.

All 4 comments

Related to #62 and #25. Since we don't have good docs on those features I'd have to experiment with it to know exactly what the @private and @hidden tags are supposed to do.

They are supposed to fully exclude the property/function/thing from the docs to be invisible to the consumer. Any news on when this will be available?

For anyone else that stumbles across this with the same problem, the --excludePrivate flag currently only works for private class members. It does not work for anything else decorated with /** @private */.

The simplest way I've found to hide other things, short of using a custom fork or plugin, is to simply add the following css:

.tsd-is-private {
    display: none;
}

TypeDoc is awesome, but is really hard to work on. The codebase could do with a bit of sanitization (remove grunt, use ts-node to run the tests without having to build them...). I'll have a think and raise a seperate issue / PR for that.

Fixed with 5d41a2e03a4cefa29ae84e7f9ef409d976d4ac56

Was this page helpful?
0 / 5 - 0 ratings