Skip to content

Commit 793f139

Browse files
committed
PR feedback
1 parent e67b37a commit 793f139

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

apps/api-extractor/src/analyzer/AstSymbolTable.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,24 @@ export class AstSymbolTable {
249249
unquotedName = localSymbol.name;
250250
}
251251

252-
// If it is a non-well-known symbol, then return the late bound name
252+
// If it is a non-well-known symbol, then return the late-bound name. For example, "X.Y.z" in this example:
253+
//
254+
// namespace X {
255+
// export namespace Y {
256+
// export const z: unique symbol = Symbol("z");
257+
// }
258+
// }
259+
//
260+
// class C {
261+
// public [X.Y.z](): void { }
262+
// }
263+
//
253264
if (isUniqueSymbol) {
254265
const declarationName: ts.DeclarationName | undefined = ts.getNameOfDeclaration(declaration);
255266
if (declarationName && ts.isComputedPropertyName(declarationName)) {
256267
const lateBoundName: string | undefined = TypeScriptHelpers.tryGetLateBoundName(declarationName);
257268
if (lateBoundName) {
258-
// Here the string may contain an expression such as "[x.y.z]". Names starting with "[" are always
269+
// Here the string may contain an expression such as "[X.Y.z]". Names starting with "[" are always
259270
// expressions. If a string literal contains those characters, the code below will JSON.stringify() it
260271
// to avoid a collision.
261272
return lateBoundName;

0 commit comments

Comments
 (0)