@@ -13245,7 +13245,7 @@ namespace ts {
13245
13245
}
13246
13246
else {
13247
13247
let suggestion: string | undefined;
13248
- if (propName !== undefined && (suggestion = getSuggestionForNonexistentProperty(propName as string, objectType, /** isJsxAttr */ false))) {
13248
+ if (propName !== undefined && (suggestion = getSuggestionForNonexistentProperty(propName as string, objectType, /*isJsxAttr*/ false))) {
13249
13249
if (suggestion !== undefined) {
13250
13250
error(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName as string, typeToString(objectType), suggestion);
13251
13251
}
@@ -16319,7 +16319,7 @@ namespace ts {
16319
16319
errorNode = prop.valueDeclaration.name;
16320
16320
}
16321
16321
const propName = symbolToString(prop);
16322
- const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget, /** isJsxAttr */ true);
16322
+ const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget, /*isJsxAttr*/ true);
16323
16323
if (suggestion) reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion);
16324
16324
else reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget));
16325
16325
}
@@ -16335,7 +16335,7 @@ namespace ts {
16335
16335
16336
16336
const name = propDeclaration.name!;
16337
16337
if (isIdentifier(name)) {
16338
- suggestion = getSuggestionForNonexistentProperty(name, errorTarget, /** isJsxAttr */ false);
16338
+ suggestion = getSuggestionForNonexistentProperty(name, errorTarget, /*isJsxAttr*/ false);
16339
16339
}
16340
16340
}
16341
16341
if (suggestion !== undefined) {
@@ -24852,7 +24852,7 @@ namespace ts {
24852
24852
relatedInfo = createDiagnosticForNode(propNode, Diagnostics.Did_you_forget_to_use_await);
24853
24853
}
24854
24854
else {
24855
- const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType, /** isJsxAttr */ false);
24855
+ const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType, /*isJsxAttr*/ false);
24856
24856
if (suggestion !== undefined) {
24857
24857
const suggestedName = symbolName(suggestion);
24858
24858
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, declarationNameToString(propNode), typeToString(containingType), suggestedName);
@@ -24892,7 +24892,7 @@ namespace ts {
24892
24892
// 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
24893
24893
// So the table *contains* `x` but `x` isn't actually in scope.
24894
24894
// However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion.
24895
- return symbol || getSpellingSuggestionForName(unescapeLeadingUnderscores(name), arrayFrom(symbols.values()), meaning, /** isJsxAttr */ false);
24895
+ return symbol || getSpellingSuggestionForName(unescapeLeadingUnderscores(name), arrayFrom(symbols.values()), meaning, /*isJsxAttr*/ false);
24896
24896
});
24897
24897
return result;
24898
24898
}
@@ -24903,7 +24903,7 @@ namespace ts {
24903
24903
}
24904
24904
24905
24905
function getSuggestedSymbolForNonexistentModule(name: Identifier, targetModule: Symbol): Symbol | undefined {
24906
- return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), SymbolFlags.ModuleMember, /** isJsxAttr */ false);
24906
+ return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), SymbolFlags.ModuleMember, /*isJsxAttr*/ false);
24907
24907
}
24908
24908
24909
24909
function getSuggestionForNonexistentExport(name: Identifier, targetModule: Symbol): string | undefined {
0 commit comments