(doc: ApiDoc)
| 29 | |
| 30 | /** Checks whether the given API document is public. */ |
| 31 | export function isPublicDoc(doc: ApiDoc) { |
| 32 | // Always skip documents which have been created through inheritance. These docs are |
| 33 | // not exported as they have not been resolved by Dgeni through a module entry-point. |
| 34 | // The `@docs-public` tag is only applicable if a symbol is at least exported. |
| 35 | if (isInheritanceCreatedDoc(doc)) { |
| 36 | return false; |
| 37 | } |
| 38 | |
| 39 | if (_isEnforcedPublicDoc(doc)) { |
| 40 | return true; |
| 41 | } |
| 42 | |
| 43 | if (_hasDocsPrivateTag(doc) || doc.name.startsWith('_')) { |
| 44 | return false; |
| 45 | } else if (doc instanceof MemberDoc) { |
| 46 | return !_isInternalMember(doc); |
| 47 | } |
| 48 | return true; |
| 49 | } |
| 50 | |
| 51 | /** Gets the @docs-public tag from the given document if present. */ |
| 52 | export function getDocsPublicTag(doc: ApiDoc): Tag | undefined { |
no test coverage detected
searching dependent graphs…