getSuggestionForNonexistentSymbol: Add comment (#18885)
This commit is contained in:
parent
d11172c86e
commit
a075ba9828
1 changed files with 1 additions and 0 deletions
|
@ -14866,6 +14866,7 @@ namespace ts {
|
||||||
|
|
||||||
function getSuggestionForNonexistentSymbol(location: Node, name: __String, meaning: SymbolFlags): string {
|
function getSuggestionForNonexistentSymbol(location: Node, name: __String, meaning: SymbolFlags): string {
|
||||||
const result = resolveNameHelper(location, name, meaning, /*nameNotFoundMessage*/ undefined, name, /*isUse*/ false, (symbols, name, meaning) => {
|
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);
|
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
|
// 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.
|
// So the table *contains* `x` but `x` isn't actually in scope.
|
||||||
|
|
Loading…
Reference in a new issue