Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions libs/docs-utils/src/nav/api.type.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import { DaffNavDoc } from './type';
import { DaffDocsApiRole } from '../api/public_api';

/**
* A navigation item for an API doc.
*/
export interface DaffApiNavDoc extends DaffNavDoc {
interface DaffApiNavDocBase extends DaffNavDoc {
path: string;
docType: string;
role?: DaffDocsApiRole;
}

/**
* A navigation item for an API doc.
*/
export interface DaffApiNavDoc extends DaffApiNavDocBase {
deprecated?: string;
}

/**
* A navigation item for an API doc of a package entrypoint.
*/
export interface DaffApiNavPackageDoc extends DaffApiNavDoc {
export interface DaffApiNavPackageDoc extends DaffApiNavDocBase {
docType: 'package';
description: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function getExportInfo(exportDoc): DaffDocsApiNavList {
path: `${exportDoc.path[0] === '/' ? '' : '/'}${exportDoc.path}`,
docType: getDocType(exportDoc),
role: exportDoc.role,
deprecated: exportDoc.deprecated,
children: exportDoc.docType === DaffDocsApiType.PACKAGE
? exportDoc.exports
.map(getExportInfo)
Expand Down