docs/libs/typescript.js
function getCompletionEntryDisplayNameForSymbol(symbol, target, performCharacterChecks, location) {
            var displayName = ts.getDeclaredName(program.getTypeChecker(), symbol, location);
            if (displayName) {
                var firstCharCode = displayName.charCodeAt(0);
                // First check of the displayName is not external module; if it is an external module, it is not valid entry
                if ((symbol.flags & 1920 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) {
                    // If the symbol is external module, don't show it in the completion list
                    // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there)
                    return undefined;
                }
            }
            return getCompletionEntryDisplayName(displayName, target, performCharacterChecks);
        }
function getCompletionEntryDisplayNameForSymbol(symbol, target, performCharacterChecks, location) {
            var displayName = ts.getDeclaredName(program.getTypeChecker(), symbol, location);
            if (displayName) {
                var firstCharCode = displayName.charCodeAt(0);
                // First check of the displayName is not external module; if it is an external module, it is not valid entry
                if ((symbol.flags & 1920 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) {
                    // If the symbol is external module, don't show it in the completion list
                    // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there)
                    return undefined;
                }
            }
            return getCompletionEntryDisplayName(displayName, target, performCharacterChecks);
        }
function getCompletionEntryDisplayNameForSymbol ( symbol , target , performCharacterChecks , location ) { var displayName = ts . getDeclaredName ( program . getTypeChecker ( ) , symbol , location ) ; if ( displayName ) { var firstCharCode = displayName . charCodeAt ( 0 ) ; // First check of the displayName is not external module; if it is an external module, it is not valid entry if ( ( symbol . flags & 1920 /* Namespace */ ) && ( firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */ ) ) { // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) return undefined ; } } return getCompletionEntryDisplayName ( displayName , target , performCharacterChecks ) ; }
Get the name to be display in completion from a given symbol.

@return undefined if the name is of external module otherwise a name with striped of any quote
Get the name to be display in completion from a given symbol .