@@ -16322,7 +16322,7 @@ namespace ts {
16322
16322
errorNode = prop.valueDeclaration.name;
16323
16323
}
16324
16324
const propName = symbolToString(prop);
16325
- const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget);
16325
+ const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget, true );
16326
16326
if (suggestion) reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion);
16327
16327
else reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget));
16328
16328
}
@@ -24878,12 +24878,12 @@ namespace ts {
24878
24878
return prop !== undefined && prop.valueDeclaration && hasSyntacticModifier(prop.valueDeclaration, ModifierFlags.Static);
24879
24879
}
24880
24880
24881
- function getSuggestedSymbolForNonexistentProperty(name: Identifier | PrivateIdentifier | string, containingType: Type): Symbol | undefined {
24882
- return getSpellingSuggestionForName(isString(name) ? name : idText(name), getPropertiesOfType(containingType), SymbolFlags.Value);
24881
+ function getSuggestedSymbolForNonexistentProperty(name: Identifier | PrivateIdentifier | string, containingType: Type, isJSX = false ): Symbol | undefined {
24882
+ return getSpellingSuggestionForName(isString(name) ? name : idText(name), getPropertiesOfType(containingType), SymbolFlags.Value, isJSX );
24883
24883
}
24884
24884
24885
- function getSuggestionForNonexistentProperty(name: Identifier | PrivateIdentifier | string, containingType: Type): string | undefined {
24886
- const suggestion = getSuggestedSymbolForNonexistentProperty(name, containingType);
24885
+ function getSuggestionForNonexistentProperty(name: Identifier | PrivateIdentifier | string, containingType: Type, isJSX = false ): string | undefined {
24886
+ const suggestion = getSuggestedSymbolForNonexistentProperty(name, containingType, isJSX );
24887
24887
return suggestion && symbolName(suggestion);
24888
24888
}
24889
24889
@@ -24956,8 +24956,8 @@ namespace ts {
24956
24956
* (0.4 allows 1 substitution/transposition for every 5 characters,
24957
24957
* and 1 insertion/deletion at 3 characters)
24958
24958
*/
24959
- function getSpellingSuggestionForName(name: string, symbols: Symbol[], meaning: SymbolFlags): Symbol | undefined {
24960
- return getSpellingSuggestion(name, symbols, getCandidateName);
24959
+ function getSpellingSuggestionForName(name: string, symbols: Symbol[], meaning: SymbolFlags, isJSX = false ): Symbol | undefined {
24960
+ return getSpellingSuggestion(name, symbols, getCandidateName, isJSX );
24961
24961
function getCandidateName(candidate: Symbol) {
24962
24962
const candidateName = symbolName(candidate);
24963
24963
if (startsWith(candidateName, "\"")) {
0 commit comments