Skip to content

Commit d33256c

Browse files
committed
chore: save space
1 parent cdd14cc commit d33256c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/compiler/checker.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13245,7 +13245,7 @@ namespace ts {
1324513245
}
1324613246
else {
1324713247
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))) {
1324913249
if (suggestion !== undefined) {
1325013250
error(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName as string, typeToString(objectType), suggestion);
1325113251
}
@@ -16319,7 +16319,7 @@ namespace ts {
1631916319
errorNode = prop.valueDeclaration.name;
1632016320
}
1632116321
const propName = symbolToString(prop);
16322-
const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget, /** isJsxAttr */ true);
16322+
const suggestion = getSuggestionForNonexistentProperty(propName, errorTarget, /*isJsxAttr*/ true);
1632316323
if (suggestion) reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion);
1632416324
else reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget));
1632516325
}
@@ -16335,7 +16335,7 @@ namespace ts {
1633516335

1633616336
const name = propDeclaration.name!;
1633716337
if (isIdentifier(name)) {
16338-
suggestion = getSuggestionForNonexistentProperty(name, errorTarget, /** isJsxAttr */ false);
16338+
suggestion = getSuggestionForNonexistentProperty(name, errorTarget, /*isJsxAttr*/ false);
1633916339
}
1634016340
}
1634116341
if (suggestion !== undefined) {
@@ -24852,7 +24852,7 @@ namespace ts {
2485224852
relatedInfo = createDiagnosticForNode(propNode, Diagnostics.Did_you_forget_to_use_await);
2485324853
}
2485424854
else {
24855-
const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType, /** isJsxAttr */ false);
24855+
const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType, /*isJsxAttr*/ false);
2485624856
if (suggestion !== undefined) {
2485724857
const suggestedName = symbolName(suggestion);
2485824858
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 {
2489224892
// 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
2489324893
// So the table *contains* `x` but `x` isn't actually in scope.
2489424894
// 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);
2489624896
});
2489724897
return result;
2489824898
}
@@ -24903,7 +24903,7 @@ namespace ts {
2490324903
}
2490424904

2490524905
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);
2490724907
}
2490824908

2490924909
function getSuggestionForNonexistentExport(name: Identifier, targetModule: Symbol): string | undefined {

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ namespace ts {
11941194
createDiagnostics: (message: DiagnosticMessage, arg0: string, arg1?: string) => Diagnostic,
11951195
unknownOptionErrorText?: string
11961196
) {
1197-
const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName, /** isJsxAttr */ false);
1197+
const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName, /*isJsxAttr*/ false);
11981198
return possibleOption ?
11991199
createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) :
12001200
createDiagnostics(diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2784,7 +2784,7 @@ namespace ts {
27842784
}
27852785
else {
27862786
const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts");
2787-
const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity, /** isJsxAttr */ false);
2787+
const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity, /*isJsxAttr*/ false);
27882788
const message = suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0;
27892789
fileProcessingDiagnostics.add(createFileDiagnostic(
27902790
file,

src/services/codefixes/fixSpelling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace ts.codefix {
5151
if (parent.flags & NodeFlags.OptionalChain) {
5252
containingType = checker.getNonNullableType(containingType);
5353
}
54-
suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType, /** isJsxAttr */ false);
54+
suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType, /*isJsxAttr*/ false);
5555
}
5656
else if (isImportSpecifier(parent) && parent.name === node) {
5757
Debug.assertNode(node, isIdentifier, "Expected an identifier for spelling (import)");

0 commit comments

Comments
 (0)