Skip to content

Commit 14d28d7

Browse files
chore(doc-gen): fix id and alias generation for exports and members
This helps to ensure that links to exports are not confused with links to members, which was causing some missing link issues. Helps angular#2475
1 parent 992293a commit 14d28d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/dgeni-package/processors/readTypeScriptModules.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,16 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo
147147
});
148148

149149
//Make sure duplicate aliases aren't created, so "Ambiguous link" warnings are prevented
150-
var aliasNames = [name];
150+
var aliasNames = [name, moduleDoc.id + '/' + name];
151151
if (typeParamString) {
152152
aliasNames.push(name + typeParamString);
153+
aliasNames.push(moduleDoc.id + '/' + name + typeParamString);
153154
}
154155

155156
var exportDoc = {
156157
docType: getExportDocType(exportSymbol),
157158
name: name,
158-
id: name,
159+
id: moduleDoc.id + '/' + name,
159160
typeParams: typeParamString,
160161
heritage: heritageString,
161162
aliases: aliasNames,
@@ -178,7 +179,6 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo
178179
docType: 'member',
179180
classDoc: classDoc,
180181
name: memberSymbol.name,
181-
id: memberSymbol.name,
182182
content: getContent(memberSymbol),
183183
fileInfo: getFileInfo(memberSymbol, basePath),
184184
location: getLocation(memberSymbol)

0 commit comments

Comments
 (0)