Skip to content

Commit dec3e00

Browse files
committed
Workaround for double-bracketing of symbols
1 parent 3889972 commit dec3e00

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

apps/api-extractor-model/src/mixins/ApiNameMixin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ export function ApiNameMixin<TBaseClass extends IApiItemConstructor>(baseClass:
106106
return JSON.parse(name);
107107
}
108108
if (name[0] === '[') {
109-
return DeclarationReference.parse(name);
109+
// Unwrap the [] and parse the reference
110+
return DeclarationReference.parse(name.substr(1, name.length - 2));
110111
}
111112
return name;
112113
}

build-tests/api-documenter-test/etc/api-documenter-test.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@
10441044
},
10451045
{
10461046
"kind": "PropertySignature",
1047-
"canonicalReference": "api-documenter-test!IDocInterface3#[[EcmaSmbols.example]]:member",
1047+
"canonicalReference": "api-documenter-test!IDocInterface3#[EcmaSmbols.example]:member",
10481048
"docComment": "/**\n * ECMAScript symbol\n */\n",
10491049
"excerptTokens": [
10501050
{

0 commit comments

Comments
 (0)