MCPcopy Index your code
hub / github.com/angular/components / isPublicDoc

Function isPublicDoc

tools/dgeni/common/private-docs.ts:31–49  ·  view source on GitHub ↗
(doc: ApiDoc)

Source from the content-addressed store, hash-verified

29
30/** Checks whether the given API document is public. */
31export 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. */
52export function getDocsPublicTag(doc: ApiDoc): Tag | undefined {

Callers 1

_decorateClassDocMethod · 0.90

Calls 4

isInheritanceCreatedDocFunction · 0.90
_isEnforcedPublicDocFunction · 0.85
_hasDocsPrivateTagFunction · 0.85
_isInternalMemberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…