Skip to content

Commit 8d0fcab

Browse files
authored
Merge pull request microsoft#963 from natalieethell/addUIDsToExtends
[api-documenter] fix _getTypeNameWithDot and link implements and extends to uid
2 parents 9635191 + 72cfaf7 commit 8d0fcab

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

apps/api-documenter/src/yaml/YamlDocumenter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@ export class YamlDocumenter {
314314
const apiStructure: IApiClass | IApiInterface = docItem.apiItem as IApiClass | IApiInterface;
315315

316316
if (apiStructure.extends) {
317-
yamlItem.extends = [ apiStructure.extends ];
317+
yamlItem.extends = [ this._linkToUidIfPossible(apiStructure.extends) ];
318318
}
319319

320320
if (apiStructure.implements) {
321-
yamlItem.implements = [ apiStructure.implements ];
321+
yamlItem.implements = [ this._linkToUidIfPossible(apiStructure.implements) ];
322322
}
323323

324324
if (apiStructure.isSealed) {
@@ -547,7 +547,7 @@ export class YamlDocumenter {
547547
if (hierarchy.length > 0 && hierarchy[0].kind === DocItemKind.Package) {
548548
hierarchy.shift(); // ignore the package qualifier
549549
}
550-
if (hierarchy.length < 1) {
550+
if (hierarchy.length < 2) {
551551
return undefined;
552552
}
553553
return hierarchy.map(x => x.name).join('.');
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-documenter",
5+
"comment": "add uid to implements and extends blocks, fix uid references",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/api-documenter",
10+
"email": "naethell@microsoft.com"
11+
}

0 commit comments

Comments
 (0)