Skip to content

Commit

Permalink
Workaround for double-bracketing of symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
octogonz committed Jul 23, 2019
1 parent 3889972 commit dec3e00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/api-extractor-model/src/mixins/ApiNameMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export function ApiNameMixin<TBaseClass extends IApiItemConstructor>(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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down

0 comments on commit dec3e00

Please sign in to comment.