getSuggestionForNonexistentSymbol: Add comment (#18885)

This commit is contained in:
Andy 2017-10-02 10:23:37 -07:00 committed by GitHub
parent d11172c86e
commit a075ba9828

View file

@ -14866,6 +14866,7 @@ namespace ts {
function getSuggestionForNonexistentSymbol(location: Node, name: __String, meaning: SymbolFlags): string {
const result = resolveNameHelper(location, name, meaning, /*nameNotFoundMessage*/ undefined, name, /*isUse*/ false, (symbols, name, meaning) => {
// `name` from the callback === the outer `name`
const symbol = getSymbol(symbols, name, meaning);
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
// So the table *contains* `x` but `x` isn't actually in scope.