From 05d02fa90be381f95ab8cadc8c589b99f29203c6 Mon Sep 17 00:00:00 2001 From: Jeff Cross Date: Thu, 11 Jun 2015 17:48:57 -0700 Subject: [PATCH] fix(docs): ensure no duplicates in alias names of docs Having multiple identical names in a doc's aliases would cause Ambiguous Link warnings for each reference to one of the aliases. Related to #2452 --- docs/dgeni-package/processors/readTypeScriptModules.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/dgeni-package/processors/readTypeScriptModules.js b/docs/dgeni-package/processors/readTypeScriptModules.js index ddbd4367f9..5adcbc4b10 100644 --- a/docs/dgeni-package/processors/readTypeScriptModules.js +++ b/docs/dgeni-package/processors/readTypeScriptModules.js @@ -146,13 +146,19 @@ module.exports = function readTypeScriptModules(tsParser, readFilesProcessor, mo } }); + //Make sure duplicate aliases aren't created, so "Ambiguous link" warnings are prevented + var aliasNames = [name]; + if (typeParamString) { + aliasNames.push(name + typeParamString); + } + var exportDoc = { docType: getExportDocType(exportSymbol), name: name, id: name, typeParams: typeParamString, heritage: heritageString, - aliases: [name, name + typeParamString], + aliases: aliasNames, moduleDoc: moduleDoc, content: getContent(exportSymbol), fileInfo: getFileInfo(exportSymbol, basePath),