diff --git a/apps/api-extractor-model/src/mixins/ApiNameMixin.ts b/apps/api-extractor-model/src/mixins/ApiNameMixin.ts index 85fb812c7fe..a1125589bf8 100644 --- a/apps/api-extractor-model/src/mixins/ApiNameMixin.ts +++ b/apps/api-extractor-model/src/mixins/ApiNameMixin.ts @@ -106,7 +106,8 @@ export function ApiNameMixin(baseClass: return JSON.parse(name); } if (name[0] === '[') { - return DeclarationReference.parse(name); + // Unwrap the [] and parse the reference + return DeclarationReference.parse(name.substr(1, name.length - 2)); } return name; } diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index b032c01e8d3..f141ce469e5 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -1044,7 +1044,7 @@ }, { "kind": "PropertySignature", - "canonicalReference": "api-documenter-test!IDocInterface3#[[EcmaSmbols.example]]:member", + "canonicalReference": "api-documenter-test!IDocInterface3#[EcmaSmbols.example]:member", "docComment": "/**\n * ECMAScript symbol\n */\n", "excerptTokens": [ {