Skip to content

Commit f898e43

Browse files
authored
feat(docs,dgeni): add deprecated to API nav list (#3649)
1 parent fdf253e commit f898e43

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
import { DaffNavDoc } from './type';
22
import { DaffDocsApiRole } from '../api/public_api';
33

4-
/**
5-
* A navigation item for an API doc.
6-
*/
7-
export interface DaffApiNavDoc extends DaffNavDoc {
4+
interface DaffApiNavDocBase extends DaffNavDoc {
85
path: string;
96
docType: string;
107
role?: DaffDocsApiRole;
118
}
129

10+
/**
11+
* A navigation item for an API doc.
12+
*/
13+
export interface DaffApiNavDoc extends DaffApiNavDocBase {
14+
deprecated?: string;
15+
}
16+
1317
/**
1418
* A navigation item for an API doc of a package entrypoint.
1519
*/
16-
export interface DaffApiNavPackageDoc extends DaffApiNavDoc {
20+
export interface DaffApiNavPackageDoc extends DaffApiNavDocBase {
1721
docType: 'package';
1822
description: string;
1923
}

tools/dgeni/src/transforms/daffodil-api-package/helpers/generateApiList.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function getExportInfo(exportDoc): DaffDocsApiNavList {
5555
path: `${exportDoc.path[0] === '/' ? '' : '/'}${exportDoc.path}`,
5656
docType: getDocType(exportDoc),
5757
role: exportDoc.role,
58+
deprecated: exportDoc.deprecated,
5859
children: exportDoc.docType === DaffDocsApiType.PACKAGE
5960
? exportDoc.exports
6061
.map(getExportInfo)

0 commit comments

Comments
 (0)