demo/typescript.js
function getReferencedNestedRedeclaration(node) {
            var symbol = getReferencedValueSymbol(node);
            return symbol && isNestedRedeclarationSymbol(symbol) ? symbol.valueDeclaration : undefined;
        }
function getReferencedNestedRedeclaration(node) {
            var symbol = getReferencedValueSymbol(node);
            return symbol && isNestedRedeclarationSymbol(symbol) ? symbol.valueDeclaration : undefined;
        }
When resolved as an expression identifier, if the given node references a nested block scoped entity with a name that hides an existing name, return the declaration of that entity. Otherwise, return undefined.