UNPKG

docusaurus-plugin-typedoc-api

Version:

Docusaurus plugin that provides source code API documentation powered by TypeDoc.

26 lines (22 loc) 1.15 kB
'use strict'; // https://github.com/TypeStrong/typedoc/blob/master/src/lib/output/themes/DefaultTheme.ts#L264 function hasOwnDocument(id, reflections) { const reflection = reflections[id]; return Boolean(reflection?.permalink && !reflection.permalink.includes('#')); } // https://github.com/TypeStrong/typedoc/blob/2103f347c9cba40fcaa1f67e36f7cea0bdea2f0f/src/lib/models/ReflectionCategory.ts#L44 function allCategoryChildrenHaveOwnDocument(category, reflections) { let onlyOwnDocuments = true; category.children?.forEach(child => { onlyOwnDocuments &&= hasOwnDocument(child, reflections); }); return onlyOwnDocuments; } // https://github.com/TypeStrong/typedoc/blob/2103f347c9cba40fcaa1f67e36f7cea0bdea2f0f/src/lib/models/ReflectionGroup.ts#L81 function allGroupChildrenHaveOwnDocument(group, reflections) { return Boolean(group.children?.every(child => hasOwnDocument(child, reflections))); } exports.allCategoryChildrenHaveOwnDocument = allCategoryChildrenHaveOwnDocument; exports.allGroupChildrenHaveOwnDocument = allGroupChildrenHaveOwnDocument; exports.hasOwnDocument = hasOwnDocument; //# sourceMappingURL=visibility.js.map