docs/libs/typescript.js
function appendPropertyOrElementAccessForSymbol(symbol, writer) {
                var symbolName = getNameOfSymbol(symbol);
                var firstChar = symbolName.charCodeAt(0);
                var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion);
                if (needsElementAccess) {
                    writePunctuation(writer, 19 /* OpenBracketToken */);
                    if (ts.isSingleOrDoubleQuote(firstChar)) {
                        writer.writeStringLiteral(symbolName);
                    }
                    else {
                        writer.writeSymbol(symbolName, symbol);
                    }
                    writePunctuation(writer, 20 /* CloseBracketToken */);
                }
                else {
                    writePunctuation(writer, 21 /* DotToken */);
                    writer.writeSymbol(symbolName, symbol);
                }
            }
function appendPropertyOrElementAccessForSymbol(symbol, writer) {
                var symbolName = getNameOfSymbol(symbol);
                var firstChar = symbolName.charCodeAt(0);
                var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion);
                if (needsElementAccess) {
                    writePunctuation(writer, 19 /* OpenBracketToken */);
                    if (ts.isSingleOrDoubleQuote(firstChar)) {
                        writer.writeStringLiteral(symbolName);
                    }
                    else {
                        writer.writeSymbol(symbolName, symbol);
                    }
                    writePunctuation(writer, 20 /* CloseBracketToken */);
                }
                else {
                    writePunctuation(writer, 21 /* DotToken */);
                    writer.writeSymbol(symbolName, symbol);
                }
            }
function appendPropertyOrElementAccessForSymbol ( symbol , writer ) { var symbolName = getNameOfSymbol ( symbol ) ; var firstChar = symbolName . charCodeAt ( 0 ) ; var needsElementAccess = ! ts . isIdentifierStart ( firstChar , languageVersion ) ; if ( needsElementAccess ) { writePunctuation ( writer , 19 /* OpenBracketToken */ ) ; if ( ts . isSingleOrDoubleQuote ( firstChar ) ) { writer . writeStringLiteral ( symbolName ) ; } else { writer . writeSymbol ( symbolName , symbol ) ; } writePunctuation ( writer , 20 /* CloseBracketToken */ ) ; } else { writePunctuation ( writer , 21 /* DotToken */ ) ; writer . writeSymbol ( symbolName , symbol ) ; } }
Writes a property access or element access with the name of the symbol out to the writer.
Uses the original source text for the name of the symbol if it is available to match how the user wrote the name,
ensuring that any names written with literals use element accesses.
Writes a property access or element access with the name of the symbol out to the writer . Uses the original source text for the name of the symbol if it is available to match how the user wrote the name ensuring that any names written with literals use element accesses .