@@ -1309,8 +1309,8 @@ export const enum CheckMode {
1309
1309
SkipGenericFunctions = 1 << 3, // Skip single signature generic functions
1310
1310
IsForSignatureHelp = 1 << 4, // Call resolution for purposes of signature help
1311
1311
RestBindingElement = 1 << 5, // Checking a type that is going to be used to determine the type of a rest binding element
1312
- // e.g. in `const { a, ...rest } = foo`, when checking the type of `foo` to determine the type of `rest`,
1313
- // we need to preserve generic types instead of substituting them for constraints
1312
+ // e.g. in `const { a, ...rest } = foo`, when checking the type of `foo` to determine the type of `rest`,
1313
+ // we need to preserve generic types instead of substituting them for constraints
1314
1314
TypeOnly = 1 << 6, // Called from getTypeOfExpression, diagnostics may be omitted
1315
1315
}
1316
1316
@@ -3350,7 +3350,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3350
3350
if (isEntityNameExpression((node as ExpressionWithTypeArguments).expression)) {
3351
3351
return (node as ExpressionWithTypeArguments).expression as EntityNameExpression;
3352
3352
}
3353
- // falls through
3353
+ // falls through
3354
3354
default:
3355
3355
return undefined;
3356
3356
}
@@ -5451,7 +5451,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
5451
5451
if (!isExternalOrCommonJsModule(location as SourceFile)) {
5452
5452
break;
5453
5453
}
5454
- // falls through
5454
+ // falls through
5455
5455
case SyntaxKind.ModuleDeclaration:
5456
5456
const sym = getSymbolOfDeclaration(location as ModuleDeclaration);
5457
5457
// `sym` may not have exports if this module declaration is backed by the symbol for a `const` that's being rewritten
@@ -10006,7 +10006,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
10006
10006
);
10007
10007
break;
10008
10008
}
10009
- // else fall through and treat commonjs require just like import=
10009
+ // else fall through and treat commonjs require just like import=
10010
10010
case SyntaxKind.ImportEqualsDeclaration:
10011
10011
// This _specifically_ only exists to handle json declarations - where we make aliases, but since
10012
10012
// we emit no declarations for the json document, must not refer to it in the declarations
@@ -10803,7 +10803,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
10803
10803
// If the binding pattern is empty, this variable declaration is not visible
10804
10804
return false;
10805
10805
}
10806
- // falls through
10806
+ // falls through
10807
10807
case SyntaxKind.ModuleDeclaration:
10808
10808
case SyntaxKind.ClassDeclaration:
10809
10809
case SyntaxKind.InterfaceDeclaration:
@@ -10836,8 +10836,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
10836
10836
// Private/protected properties/methods are not visible
10837
10837
return false;
10838
10838
}
10839
- // Public properties/methods are visible if its parents are visible, so:
10840
- // falls through
10839
+ // Public properties/methods are visible if its parents are visible, so:
10840
+ // falls through
10841
10841
10842
10842
case SyntaxKind.Constructor:
10843
10843
case SyntaxKind.ConstructSignature:
@@ -20664,7 +20664,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
20664
20664
if (!isConstAssertion(node)) {
20665
20665
break;
20666
20666
}
20667
- // fallthrough
20667
+ // fallthrough
20668
20668
case SyntaxKind.JsxExpression:
20669
20669
case SyntaxKind.ParenthesizedExpression:
20670
20670
return elaborateError((node as AsExpression | ParenthesizedExpression | JsxExpression).expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer);
@@ -26944,7 +26944,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
26944
26944
if (isCallExpression(node.parent)) {
26945
26945
return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
26946
26946
}
26947
- // falls through
26947
+ // falls through
26948
26948
default:
26949
26949
if (node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) {
26950
26950
return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
@@ -26986,7 +26986,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
26986
26986
const symbol = getResolvedSymbol(node as Identifier);
26987
26987
return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : undefined;
26988
26988
}
26989
- // falls through
26989
+ // falls through
26990
26990
case SyntaxKind.ThisKeyword:
26991
26991
return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`;
26992
26992
case SyntaxKind.NonNullExpression:
@@ -29370,7 +29370,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29370
29370
}
29371
29371
}
29372
29372
}
29373
- // falls through
29373
+ // falls through
29374
29374
case SyntaxKind.ThisKeyword:
29375
29375
case SyntaxKind.SuperKeyword:
29376
29376
case SyntaxKind.PropertyAccessExpression:
@@ -33371,7 +33371,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
33371
33371
33372
33372
checkJsxPreconditions(node);
33373
33373
33374
- markLinkedReferences (node, ReferenceHint.Jsx );
33374
+ markJsxAliasReferenced (node);
33375
33375
33376
33376
if (isNodeOpeningLikeElement) {
33377
33377
const jsxOpeningLikeNode = node;
@@ -38806,15 +38806,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
38806
38806
hasError = true;
38807
38807
break;
38808
38808
}
38809
- // fallthrough
38809
+ // fallthrough
38810
38810
case ModuleKind.ES2022:
38811
38811
case ModuleKind.ESNext:
38812
38812
case ModuleKind.Preserve:
38813
38813
case ModuleKind.System:
38814
38814
if (languageVersion >= ScriptTarget.ES2017) {
38815
38815
break;
38816
38816
}
38817
- // fallthrough
38817
+ // fallthrough
38818
38818
default:
38819
38819
span ??= getSpanOfTokenAtPosition(sourceFile, node.pos);
38820
38820
const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher :
@@ -40609,7 +40609,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
40609
40609
if ((node as CallExpression).expression.kind === SyntaxKind.ImportKeyword) {
40610
40610
return checkImportCallExpression(node as ImportCall);
40611
40611
}
40612
- // falls through
40612
+ // falls through
40613
40613
case SyntaxKind.NewExpression:
40614
40614
return checkCallExpression(node as CallExpression, checkMode);
40615
40615
case SyntaxKind.TaggedTemplateExpression:
@@ -41070,7 +41070,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
41070
41070
if (useDefineForClassFields) {
41071
41071
break;
41072
41072
}
41073
- // fall through
41073
+ // fall through
41074
41074
case "prototype":
41075
41075
const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1;
41076
41076
const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node));
@@ -42657,7 +42657,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
42657
42657
headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1;
42658
42658
break;
42659
42659
}
42660
- // falls through
42660
+ // falls through
42661
42661
42662
42662
case SyntaxKind.Parameter:
42663
42663
headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any;
@@ -46791,7 +46791,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
46791
46791
}
46792
46792
break;
46793
46793
}
46794
- // falls through
46794
+ // falls through
46795
46795
case SyntaxKind.ClassDeclaration:
46796
46796
case SyntaxKind.EnumDeclaration:
46797
46797
case SyntaxKind.FunctionDeclaration:
@@ -47610,7 +47610,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
47610
47610
return checkJSDocPropertyTag(node as JSDocPropertyTag);
47611
47611
case SyntaxKind.JSDocFunctionType:
47612
47612
checkJSDocFunctionType(node as JSDocFunctionType);
47613
- // falls through
47613
+ // falls through
47614
47614
case SyntaxKind.JSDocNonNullableType:
47615
47615
case SyntaxKind.JSDocNullableType:
47616
47616
case SyntaxKind.JSDocAllType:
@@ -48136,7 +48136,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48136
48136
switch (location.kind) {
48137
48137
case SyntaxKind.SourceFile:
48138
48138
if (!isExternalModule(location as SourceFile)) break;
48139
- // falls through
48139
+ // falls through
48140
48140
case SyntaxKind.ModuleDeclaration:
48141
48141
copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location as ModuleDeclaration | SourceFile).exports!, meaning & SymbolFlags.ModuleMember);
48142
48142
break;
@@ -48301,7 +48301,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48301
48301
if (isPropertyAccessExpression(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) {
48302
48302
return undefined;
48303
48303
}
48304
- // falls through
48304
+ // falls through
48305
48305
case AssignmentDeclarationKind.ThisProperty:
48306
48306
case AssignmentDeclarationKind.ModuleExports:
48307
48307
return getSymbolOfDeclaration(entityName.parent.parent as BinaryExpression);
@@ -48601,7 +48601,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48601
48601
if (!isThisInTypeQuery(node)) {
48602
48602
return getSymbolOfNameOrPropertyAccessExpression(node as EntityName | PrivateIdentifier | PropertyAccessExpression);
48603
48603
}
48604
- // falls through
48604
+ // falls through
48605
48605
48606
48606
case SyntaxKind.ThisKeyword:
48607
48607
const container = getThisContainer(node, /*includeArrowFunctions*/ false, /*includeClassComputedPropertyName*/ false);
@@ -48614,7 +48614,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48614
48614
if (isInExpressionContext(node)) {
48615
48615
return checkExpression(node as Expression).symbol;
48616
48616
}
48617
- // falls through
48617
+ // falls through
48618
48618
48619
48619
case SyntaxKind.ThisType:
48620
48620
return getTypeFromThisTypeNode(node as ThisExpression | ThisTypeNode).symbol;
@@ -48648,7 +48648,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48648
48648
if (isCallExpression(parent) && isBindableObjectDefinePropertyCall(parent) && parent.arguments[1] === node) {
48649
48649
return getSymbolOfDeclaration(parent);
48650
48650
}
48651
- // falls through
48651
+ // falls through
48652
48652
48653
48653
case SyntaxKind.NumericLiteral:
48654
48654
// index access
@@ -48687,7 +48687,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
48687
48687
const symbol = getIntrinsicTagSymbol(node.parent as JsxOpeningLikeElement);
48688
48688
return symbol === unknownSymbol ? undefined : symbol;
48689
48689
}
48690
- // falls through
48690
+ // falls through
48691
48691
48692
48692
default:
48693
48693
return undefined;
@@ -51108,15 +51108,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
51108
51108
);
51109
51109
break;
51110
51110
}
51111
- // fallthrough
51111
+ // fallthrough
51112
51112
case ModuleKind.ES2022:
51113
51113
case ModuleKind.ESNext:
51114
51114
case ModuleKind.Preserve:
51115
51115
case ModuleKind.System:
51116
51116
if (languageVersion >= ScriptTarget.ES2017) {
51117
51117
break;
51118
51118
}
51119
- // fallthrough
51119
+ // fallthrough
51120
51120
default:
51121
51121
diagnostics.add(
51122
51122
createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher),
0 commit comments