typescript 4.7.0-dev.20220216 → 4.7.0-dev.20220220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220216";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220220";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -2412,7 +2412,7 @@ var ts;
2412
2412
  Debug.checkEachDefined = checkEachDefined;
2413
2413
  function assertNever(member, message, stackCrawlMark) {
2414
2414
  if (message === void 0) { message = "Illegal value:"; }
2415
- var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2415
+ var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2416
2416
  return fail(message + " " + detail, stackCrawlMark || assertNever);
2417
2417
  }
2418
2418
  Debug.assertNever = assertNever;
@@ -4909,13 +4909,14 @@ var ts;
4909
4909
  // Flags that require TypeFlags.Object
4910
4910
  ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread";
4911
4911
  ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType";
4912
+ ObjectFlags[ObjectFlags["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType";
4912
4913
  /* @internal */
4913
- ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 16777216] = "IsClassInstanceClone";
4914
+ ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 33554432] = "IsClassInstanceClone";
4914
4915
  // Flags that require TypeFlags.Object and ObjectFlags.Reference
4915
4916
  /* @internal */
4916
- ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 33554432] = "IdenticalBaseTypeCalculated";
4917
+ ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 67108864] = "IdenticalBaseTypeCalculated";
4917
4918
  /* @internal */
4918
- ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 67108864] = "IdenticalBaseTypeExists";
4919
+ ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 134217728] = "IdenticalBaseTypeExists";
4919
4920
  // Flags that require TypeFlags.UnionOrIntersection or TypeFlags.Substitution
4920
4921
  /* @internal */
4921
4922
  ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
@@ -8133,7 +8134,6 @@ var ts;
8133
8134
  Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
8134
8135
  Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"),
8135
8136
  Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
8136
- A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list: diag(1384, ts.DiagnosticCategory.Error, "A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384", "A 'new' expression with type arguments must always be followed by a parenthesized argument list."),
8137
8137
  Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."),
8138
8138
  Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, ts.DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."),
8139
8139
  Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
@@ -8519,6 +8519,7 @@ var ts;
8519
8519
  Cannot_assign_to_0_because_it_is_an_import: diag(2632, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."),
8520
8520
  JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, ts.DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"),
8521
8521
  _0_index_signatures_are_incompatible: diag(2634, ts.DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."),
8522
+ Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, ts.DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."),
8522
8523
  Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, ts.DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
8523
8524
  A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, ts.DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
8524
8525
  Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, ts.DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
@@ -9564,7 +9565,7 @@ var ts;
9564
9565
  Fix_all_implicit_this_errors: diag(95107, ts.DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"),
9565
9566
  Wrap_invalid_character_in_an_expression_container: diag(95108, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"),
9566
9567
  Wrap_all_invalid_characters_in_an_expression_container: diag(95109, ts.DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"),
9567
- Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file: diag(95110, ts.DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig.json to read more about this file"),
9568
+ Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, ts.DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"),
9568
9569
  Add_a_return_statement: diag(95111, ts.DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"),
9569
9570
  Remove_braces_from_arrow_function_body: diag(95112, ts.DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"),
9570
9571
  Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, ts.DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"),
@@ -13410,6 +13411,7 @@ var ts;
13410
13411
  case 110 /* TrueKeyword */:
13411
13412
  case 106 /* SuperKeyword */:
13412
13413
  case 229 /* NonNullExpression */:
13414
+ case 227 /* ExpressionWithTypeArguments */:
13413
13415
  case 230 /* MetaProperty */:
13414
13416
  case 100 /* ImportKeyword */: // technically this is only an Expression if it's in a CallExpression
13415
13417
  return true;
@@ -15123,7 +15125,7 @@ var ts;
15123
15125
  case 114 /* VoidKeyword */:
15124
15126
  return node.parent.kind !== 216 /* VoidExpression */;
15125
15127
  case 227 /* ExpressionWithTypeArguments */:
15126
- return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
15128
+ return ts.isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node);
15127
15129
  case 162 /* TypeParameter */:
15128
15130
  return node.parent.kind === 194 /* MappedType */ || node.parent.kind === 189 /* InferType */;
15129
15131
  // Identifiers and qualified names may be type nodes, depending on their context. Climb
@@ -15160,7 +15162,7 @@ var ts;
15160
15162
  }
15161
15163
  switch (parent.kind) {
15162
15164
  case 227 /* ExpressionWithTypeArguments */:
15163
- return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
15165
+ return ts.isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
15164
15166
  case 162 /* TypeParameter */:
15165
15167
  return node === parent.constraint;
15166
15168
  case 342 /* JSDocTemplateTag */:
@@ -15863,7 +15865,7 @@ var ts;
15863
15865
  case 296 /* SpreadAssignment */:
15864
15866
  return true;
15865
15867
  case 227 /* ExpressionWithTypeArguments */:
15866
- return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
15868
+ return parent.expression === node && !isPartOfTypeNode(parent);
15867
15869
  case 295 /* ShorthandPropertyAssignment */:
15868
15870
  return parent.objectAssignmentInitializer === node;
15869
15871
  default:
@@ -22850,16 +22852,18 @@ var ts;
22850
22852
  return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type);
22851
22853
  }
22852
22854
  // @api
22853
- function createTypeQueryNode(exprName) {
22855
+ function createTypeQueryNode(exprName, typeArguments) {
22854
22856
  var node = createBaseNode(180 /* TypeQuery */);
22855
22857
  node.exprName = exprName;
22858
+ node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
22856
22859
  node.transformFlags = 1 /* ContainsTypeScript */;
22857
22860
  return node;
22858
22861
  }
22859
22862
  // @api
22860
- function updateTypeQueryNode(node, exprName) {
22863
+ function updateTypeQueryNode(node, exprName, typeArguments) {
22861
22864
  return node.exprName !== exprName
22862
- ? update(createTypeQueryNode(exprName), node)
22865
+ || node.typeArguments !== typeArguments
22866
+ ? update(createTypeQueryNode(exprName, typeArguments), node)
22863
22867
  : node;
22864
22868
  }
22865
22869
  // @api
@@ -29983,7 +29987,8 @@ var ts;
29983
29987
  visitNode(cbNode, node.parameterName) ||
29984
29988
  visitNode(cbNode, node.type);
29985
29989
  case 180 /* TypeQuery */:
29986
- return visitNode(cbNode, node.exprName);
29990
+ return visitNode(cbNode, node.exprName) ||
29991
+ visitNodes(cbNode, cbNodes, node.typeArguments);
29987
29992
  case 181 /* TypeLiteral */:
29988
29993
  return visitNodes(cbNode, cbNodes, node.members);
29989
29994
  case 182 /* ArrayType */:
@@ -32516,7 +32521,9 @@ var ts;
32516
32521
  function parseTypeQuery() {
32517
32522
  var pos = getNodePos();
32518
32523
  parseExpected(112 /* TypeOfKeyword */);
32519
- return finishNode(factory.createTypeQueryNode(parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ true)), pos);
32524
+ var entityName = parseEntityName(/*allowReservedWords*/ true, /*allowPrivateIdentifiers*/ true);
32525
+ var typeArguments = tryParseTypeArguments();
32526
+ return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
32520
32527
  }
32521
32528
  function parseTypeParameter() {
32522
32529
  var pos = getNodePos();
@@ -34586,20 +34593,30 @@ var ts;
34586
34593
  expression = parsePropertyAccessExpressionRest(pos, expression, questionDotToken);
34587
34594
  continue;
34588
34595
  }
34589
- if (!questionDotToken && token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) {
34590
- nextToken();
34591
- expression = finishNode(factory.createNonNullExpression(expression), pos);
34592
- continue;
34593
- }
34594
34596
  // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName
34595
34597
  if ((questionDotToken || !inDecoratorContext()) && parseOptional(22 /* OpenBracketToken */)) {
34596
34598
  expression = parseElementAccessExpressionRest(pos, expression, questionDotToken);
34597
34599
  continue;
34598
34600
  }
34599
34601
  if (isTemplateStartOfTaggedTemplate()) {
34600
- expression = parseTaggedTemplateRest(pos, expression, questionDotToken, /*typeArguments*/ undefined);
34602
+ // Absorb type arguments into TemplateExpression when preceding expression is ExpressionWithTypeArguments
34603
+ expression = !questionDotToken && expression.kind === 227 /* ExpressionWithTypeArguments */ ?
34604
+ parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) :
34605
+ parseTaggedTemplateRest(pos, expression, questionDotToken, /*typeArguments*/ undefined);
34601
34606
  continue;
34602
34607
  }
34608
+ if (!questionDotToken) {
34609
+ if (token() === 53 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) {
34610
+ nextToken();
34611
+ expression = finishNode(factory.createNonNullExpression(expression), pos);
34612
+ continue;
34613
+ }
34614
+ var typeArguments = tryParse(parseTypeArgumentsInExpression);
34615
+ if (typeArguments) {
34616
+ expression = finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos);
34617
+ continue;
34618
+ }
34619
+ }
34603
34620
  return expression;
34604
34621
  }
34605
34622
  }
@@ -34619,38 +34636,30 @@ var ts;
34619
34636
  function parseCallExpressionRest(pos, expression) {
34620
34637
  while (true) {
34621
34638
  expression = parseMemberExpressionRest(pos, expression, /*allowOptionalChain*/ true);
34639
+ var typeArguments = void 0;
34622
34640
  var questionDotToken = parseOptionalToken(28 /* QuestionDotToken */);
34623
- // handle 'foo<<T>()'
34624
- // parse template arguments only in TypeScript files (not in JavaScript files).
34625
- if ((contextFlags & 131072 /* JavaScriptFile */) === 0 && (token() === 29 /* LessThanToken */ || token() === 47 /* LessThanLessThanToken */)) {
34626
- // See if this is the start of a generic invocation. If so, consume it and
34627
- // keep checking for postfix expressions. Otherwise, it's just a '<' that's
34628
- // part of an arithmetic expression. Break out so we consume it higher in the
34629
- // stack.
34630
- var typeArguments = tryParse(parseTypeArgumentsInExpression);
34631
- if (typeArguments) {
34632
- if (isTemplateStartOfTaggedTemplate()) {
34633
- expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments);
34634
- continue;
34635
- }
34636
- var argumentList = parseArgumentList();
34637
- var callExpr = questionDotToken || tryReparseOptionalChain(expression) ?
34638
- factory.createCallChain(expression, questionDotToken, typeArguments, argumentList) :
34639
- factory.createCallExpression(expression, typeArguments, argumentList);
34640
- expression = finishNode(callExpr, pos);
34641
+ if (questionDotToken) {
34642
+ typeArguments = tryParse(parseTypeArgumentsInExpression);
34643
+ if (isTemplateStartOfTaggedTemplate()) {
34644
+ expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments);
34641
34645
  continue;
34642
34646
  }
34643
34647
  }
34644
- else if (token() === 20 /* OpenParenToken */) {
34648
+ if (typeArguments || token() === 20 /* OpenParenToken */) {
34649
+ // Absorb type arguments into CallExpression when preceding expression is ExpressionWithTypeArguments
34650
+ if (!questionDotToken && expression.kind === 227 /* ExpressionWithTypeArguments */) {
34651
+ typeArguments = expression.typeArguments;
34652
+ expression = expression.expression;
34653
+ }
34645
34654
  var argumentList = parseArgumentList();
34646
34655
  var callExpr = questionDotToken || tryReparseOptionalChain(expression) ?
34647
- factory.createCallChain(expression, questionDotToken, /*typeArguments*/ undefined, argumentList) :
34648
- factory.createCallExpression(expression, /*typeArguments*/ undefined, argumentList);
34656
+ factory.createCallChain(expression, questionDotToken, typeArguments, argumentList) :
34657
+ factory.createCallExpression(expression, typeArguments, argumentList);
34649
34658
  expression = finishNode(callExpr, pos);
34650
34659
  continue;
34651
34660
  }
34652
34661
  if (questionDotToken) {
34653
- // We failed to parse anything, so report a missing identifier here.
34662
+ // We parsed `?.` but then failed to parse anything, so report a missing identifier here.
34654
34663
  var name = createMissingNode(79 /* Identifier */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.Identifier_expected);
34655
34664
  expression = finishNode(factory.createPropertyAccessChain(expression, questionDotToken, name), pos);
34656
34665
  }
@@ -34678,21 +34687,25 @@ var ts;
34678
34687
  // If it doesn't have the closing `>` then it's definitely not an type argument list.
34679
34688
  return undefined;
34680
34689
  }
34681
- // If we have a '<', then only parse this as a argument list if the type arguments
34682
- // are complete and we have an open paren. if we don't, rewind and return nothing.
34683
- return typeArguments && canFollowTypeArgumentsInExpression()
34684
- ? typeArguments
34685
- : undefined;
34690
+ // We successfully parsed a type argument list. The next token determines whether we want to
34691
+ // treat it as such. If the type argument list is followed by `(` or a template literal, as in
34692
+ // `f<number>(42)`, we favor the type argument interpretation even though JavaScript would view
34693
+ // it as a relational expression.
34694
+ return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined;
34686
34695
  }
34687
34696
  function canFollowTypeArgumentsInExpression() {
34688
34697
  switch (token()) {
34698
+ // These tokens can follow a type argument list in a call expression.
34689
34699
  case 20 /* OpenParenToken */: // foo<x>(
34690
34700
  case 14 /* NoSubstitutionTemplateLiteral */: // foo<T> `...`
34691
34701
  case 15 /* TemplateHead */: // foo<T> `...${100}...`
34692
- // these are the only tokens can legally follow a type argument
34693
- // list. So we definitely want to treat them as type arg lists.
34702
+ // These tokens can't follow in a call expression, nor can they start an
34703
+ // expression. So, consider the type argument list part of an instantiation
34704
+ // expression.
34694
34705
  // falls through
34706
+ case 27 /* CommaToken */: // foo<x>,
34695
34707
  case 24 /* DotToken */: // foo<x>.
34708
+ case 28 /* QuestionDotToken */: // foo<x>?.
34696
34709
  case 21 /* CloseParenToken */: // foo<x>)
34697
34710
  case 23 /* CloseBracketToken */: // foo<x>]
34698
34711
  case 58 /* ColonToken */: // foo<x>:
@@ -34710,20 +34723,10 @@ var ts;
34710
34723
  case 51 /* BarToken */: // foo<x> |
34711
34724
  case 19 /* CloseBraceToken */: // foo<x> }
34712
34725
  case 1 /* EndOfFileToken */: // foo<x>
34713
- // these cases can't legally follow a type arg list. However, they're not legal
34714
- // expressions either. The user is probably in the middle of a generic type. So
34715
- // treat it as such.
34716
34726
  return true;
34717
- case 27 /* CommaToken */: // foo<x>,
34718
- case 18 /* OpenBraceToken */: // foo<x> {
34719
- // We don't want to treat these as type arguments. Otherwise we'll parse this
34720
- // as an invocation expression. Instead, we want to parse out the expression
34721
- // in isolation from the type arguments.
34722
- // falls through
34723
- default:
34724
- // Anything else treat as an expression.
34725
- return false;
34726
34727
  }
34728
+ // Treat anything else as an expression.
34729
+ return false;
34727
34730
  }
34728
34731
  function parsePrimaryExpression() {
34729
34732
  switch (token()) {
@@ -34904,26 +34907,15 @@ var ts;
34904
34907
  return finishNode(factory.createMetaProperty(103 /* NewKeyword */, name), pos);
34905
34908
  }
34906
34909
  var expressionPos = getNodePos();
34907
- var expression = parsePrimaryExpression();
34910
+ var expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), /*allowOptionalChain*/ false);
34908
34911
  var typeArguments;
34909
- while (true) {
34910
- expression = parseMemberExpressionRest(expressionPos, expression, /*allowOptionalChain*/ false);
34911
- typeArguments = tryParse(parseTypeArgumentsInExpression);
34912
- if (isTemplateStartOfTaggedTemplate()) {
34913
- ts.Debug.assert(!!typeArguments, "Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'");
34914
- expression = parseTaggedTemplateRest(expressionPos, expression, /*optionalChain*/ undefined, typeArguments);
34915
- typeArguments = undefined;
34916
- }
34917
- break;
34918
- }
34919
- var argumentsArray;
34920
- if (token() === 20 /* OpenParenToken */) {
34921
- argumentsArray = parseArgumentList();
34922
- }
34923
- else if (typeArguments) {
34924
- parseErrorAt(pos, scanner.getStartPos(), ts.Diagnostics.A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list);
34912
+ // Absorb type arguments into NewExpression when preceding expression is ExpressionWithTypeArguments
34913
+ if (expression.kind === 227 /* ExpressionWithTypeArguments */) {
34914
+ typeArguments = expression.typeArguments;
34915
+ expression = expression.expression;
34925
34916
  }
34926
- return finishNode(factory.createNewExpression(expression, typeArguments, argumentsArray), pos);
34917
+ var argumentList = token() === 20 /* OpenParenToken */ ? parseArgumentList() : undefined;
34918
+ return finishNode(factory.createNewExpression(expression, typeArguments, argumentList), pos);
34927
34919
  }
34928
34920
  // STATEMENTS
34929
34921
  function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
@@ -36012,6 +36004,9 @@ var ts;
36012
36004
  function parseExpressionWithTypeArguments() {
36013
36005
  var pos = getNodePos();
36014
36006
  var expression = parseLeftHandSideExpressionOrHigher();
36007
+ if (expression.kind === 227 /* ExpressionWithTypeArguments */) {
36008
+ return expression;
36009
+ }
36015
36010
  var typeArguments = tryParseTypeArguments();
36016
36011
  return finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos);
36017
36012
  }
@@ -40457,7 +40452,7 @@ var ts;
40457
40452
  var result = [];
40458
40453
  result.push("{");
40459
40454
  result.push(tab + "\"compilerOptions\": {");
40460
- result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
40455
+ result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file) + " */");
40461
40456
  result.push("");
40462
40457
  // Print out each row, aligning all the descriptions on the same column.
40463
40458
  for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
@@ -51020,7 +51015,7 @@ var ts;
51020
51015
  // get symbol of the first identifier of the entityName
51021
51016
  var meaning;
51022
51017
  if (entityName.parent.kind === 180 /* TypeQuery */ ||
51023
- ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent) ||
51018
+ entityName.parent.kind === 227 /* ExpressionWithTypeArguments */ && !ts.isPartOfTypeNode(entityName.parent) ||
51024
51019
  entityName.parent.kind === 161 /* ComputedPropertyName */) {
51025
51020
  // Typeof value
51026
51021
  meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
@@ -51131,7 +51126,7 @@ var ts;
51131
51126
  return flags & 814775659 /* NodeBuilderFlagsMask */;
51132
51127
  }
51133
51128
  function isClassInstanceSide(type) {
51134
- return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288 /* Object */) && !!(ts.getObjectFlags(type) & 16777216 /* IsClassInstanceClone */)));
51129
+ return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288 /* Object */) && !!(ts.getObjectFlags(type) & 33554432 /* IsClassInstanceClone */)));
51135
51130
  }
51136
51131
  function createNodeBuilder() {
51137
51132
  return {
@@ -55060,7 +55055,7 @@ var ts;
55060
55055
  members_4, exportedType.callSignatures, exportedType.constructSignatures, exportedType.indexInfos);
55061
55056
  result.objectFlags |= (ts.getObjectFlags(type) & 8192 /* JSLiteral */); // Propagate JSLiteral flag
55062
55057
  if (result.symbol && result.symbol.flags & 32 /* Class */ && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {
55063
- result.objectFlags |= 16777216 /* IsClassInstanceClone */; // Propagate the knowledge that this type is equivalent to the symbol's class instance type
55058
+ result.objectFlags |= 33554432 /* IsClassInstanceClone */; // Propagate the knowledge that this type is equivalent to the symbol's class instance type
55064
55059
  }
55065
55060
  return result;
55066
55061
  }
@@ -57106,87 +57101,87 @@ var ts;
57106
57101
  * Converts an AnonymousType to a ResolvedType.
57107
57102
  */
57108
57103
  function resolveAnonymousTypeMembers(type) {
57109
- var symbol = getMergedSymbol(type.symbol);
57110
57104
  if (type.target) {
57111
57105
  setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
57112
- var members = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, /*mappingThisOnly*/ false);
57106
+ var members_6 = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, /*mappingThisOnly*/ false);
57113
57107
  var callSignatures = instantiateSignatures(getSignaturesOfType(type.target, 0 /* Call */), type.mapper);
57114
57108
  var constructSignatures = instantiateSignatures(getSignaturesOfType(type.target, 1 /* Construct */), type.mapper);
57115
- var indexInfos = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper);
57116
- setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
57109
+ var indexInfos_1 = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper);
57110
+ setStructuredTypeMembers(type, members_6, callSignatures, constructSignatures, indexInfos_1);
57111
+ return;
57117
57112
  }
57118
- else if (symbol.flags & 2048 /* TypeLiteral */) {
57113
+ var symbol = getMergedSymbol(type.symbol);
57114
+ if (symbol.flags & 2048 /* TypeLiteral */) {
57119
57115
  setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
57120
- var members = getMembersOfSymbol(symbol);
57121
- var callSignatures = getSignaturesOfSymbol(members.get("__call" /* Call */));
57122
- var constructSignatures = getSignaturesOfSymbol(members.get("__new" /* New */));
57123
- var indexInfos = getIndexInfosOfSymbol(symbol);
57124
- setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
57116
+ var members_7 = getMembersOfSymbol(symbol);
57117
+ var callSignatures = getSignaturesOfSymbol(members_7.get("__call" /* Call */));
57118
+ var constructSignatures = getSignaturesOfSymbol(members_7.get("__new" /* New */));
57119
+ var indexInfos_2 = getIndexInfosOfSymbol(symbol);
57120
+ setStructuredTypeMembers(type, members_7, callSignatures, constructSignatures, indexInfos_2);
57121
+ return;
57125
57122
  }
57126
- else {
57127
- // Combinations of function, class, enum and module
57128
- var members = emptySymbols;
57129
- var indexInfos = void 0;
57130
- if (symbol.exports) {
57131
- members = getExportsOfSymbol(symbol);
57132
- if (symbol === globalThisSymbol) {
57133
- var varsOnly_1 = new ts.Map();
57134
- members.forEach(function (p) {
57135
- if (!(p.flags & 418 /* BlockScoped */)) {
57136
- varsOnly_1.set(p.escapedName, p);
57137
- }
57138
- });
57139
- members = varsOnly_1;
57140
- }
57123
+ // Combinations of function, class, enum and module
57124
+ var members = emptySymbols;
57125
+ var indexInfos;
57126
+ if (symbol.exports) {
57127
+ members = getExportsOfSymbol(symbol);
57128
+ if (symbol === globalThisSymbol) {
57129
+ var varsOnly_1 = new ts.Map();
57130
+ members.forEach(function (p) {
57131
+ if (!(p.flags & 418 /* BlockScoped */)) {
57132
+ varsOnly_1.set(p.escapedName, p);
57133
+ }
57134
+ });
57135
+ members = varsOnly_1;
57141
57136
  }
57142
- var baseConstructorIndexInfo = void 0;
57143
- setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
57144
- if (symbol.flags & 32 /* Class */) {
57145
- var classType = getDeclaredTypeOfClassOrInterface(symbol);
57146
- var baseConstructorType = getBaseConstructorTypeOfClass(classType);
57147
- if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 8650752 /* TypeVariable */)) {
57148
- members = ts.createSymbolTable(getNamedOrIndexSignatureMembers(members));
57149
- addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
57150
- }
57151
- else if (baseConstructorType === anyType) {
57152
- baseConstructorIndexInfo = createIndexInfo(stringType, anyType, /*isReadonly*/ false);
57153
- }
57137
+ }
57138
+ var baseConstructorIndexInfo;
57139
+ setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
57140
+ if (symbol.flags & 32 /* Class */) {
57141
+ var classType = getDeclaredTypeOfClassOrInterface(symbol);
57142
+ var baseConstructorType = getBaseConstructorTypeOfClass(classType);
57143
+ if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 8650752 /* TypeVariable */)) {
57144
+ members = ts.createSymbolTable(getNamedOrIndexSignatureMembers(members));
57145
+ addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
57154
57146
  }
57155
- var indexSymbol = getIndexSymbolFromSymbolTable(members);
57156
- if (indexSymbol) {
57157
- indexInfos = getIndexInfosOfIndexSymbol(indexSymbol);
57147
+ else if (baseConstructorType === anyType) {
57148
+ baseConstructorIndexInfo = createIndexInfo(stringType, anyType, /*isReadonly*/ false);
57158
57149
  }
57159
- else {
57160
- if (baseConstructorIndexInfo) {
57161
- indexInfos = ts.append(indexInfos, baseConstructorIndexInfo);
57162
- }
57163
- if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ ||
57164
- ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */); }))) {
57165
- indexInfos = ts.append(indexInfos, enumNumberIndexInfo);
57166
- }
57150
+ }
57151
+ var indexSymbol = getIndexSymbolFromSymbolTable(members);
57152
+ if (indexSymbol) {
57153
+ indexInfos = getIndexInfosOfIndexSymbol(indexSymbol);
57154
+ }
57155
+ else {
57156
+ if (baseConstructorIndexInfo) {
57157
+ indexInfos = ts.append(indexInfos, baseConstructorIndexInfo);
57167
57158
  }
57168
- setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos || ts.emptyArray);
57169
- // We resolve the members before computing the signatures because a signature may use
57170
- // typeof with a qualified name expression that circularly references the type we are
57171
- // in the process of resolving (see issue #6072). The temporarily empty signature list
57172
- // will never be observed because a qualified name can't reference signatures.
57173
- if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) {
57174
- type.callSignatures = getSignaturesOfSymbol(symbol);
57159
+ if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ ||
57160
+ ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */); }))) {
57161
+ indexInfos = ts.append(indexInfos, enumNumberIndexInfo);
57175
57162
  }
57176
- // And likewise for construct signatures for classes
57177
- if (symbol.flags & 32 /* Class */) {
57178
- var classType_1 = getDeclaredTypeOfClassOrInterface(symbol);
57179
- var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray;
57180
- if (symbol.flags & 16 /* Function */) {
57181
- constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ?
57182
- createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 39 /* PropagatingFlags */) :
57183
- undefined; }));
57184
- }
57185
- if (!constructSignatures.length) {
57186
- constructSignatures = getDefaultConstructSignatures(classType_1);
57187
- }
57188
- type.constructSignatures = constructSignatures;
57163
+ }
57164
+ setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos || ts.emptyArray);
57165
+ // We resolve the members before computing the signatures because a signature may use
57166
+ // typeof with a qualified name expression that circularly references the type we are
57167
+ // in the process of resolving (see issue #6072). The temporarily empty signature list
57168
+ // will never be observed because a qualified name can't reference signatures.
57169
+ if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) {
57170
+ type.callSignatures = getSignaturesOfSymbol(symbol);
57171
+ }
57172
+ // And likewise for construct signatures for classes
57173
+ if (symbol.flags & 32 /* Class */) {
57174
+ var classType_1 = getDeclaredTypeOfClassOrInterface(symbol);
57175
+ var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : ts.emptyArray;
57176
+ if (symbol.flags & 16 /* Function */) {
57177
+ constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ?
57178
+ createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, /*resolvedTypePredicate*/ undefined, sig.minArgumentCount, sig.flags & 39 /* PropagatingFlags */) :
57179
+ undefined; }));
57180
+ }
57181
+ if (!constructSignatures.length) {
57182
+ constructSignatures = getDefaultConstructSignatures(classType_1);
57189
57183
  }
57184
+ type.constructSignatures = constructSignatures;
57190
57185
  }
57191
57186
  }
57192
57187
  function replaceIndexedAccess(instantiable, type, replacement) {
@@ -58187,8 +58182,8 @@ var ts;
58187
58182
  var stringIndexInfo;
58188
58183
  var applicableInfo;
58189
58184
  var applicableInfos;
58190
- for (var _i = 0, indexInfos_1 = indexInfos; _i < indexInfos_1.length; _i++) {
58191
- var info = indexInfos_1[_i];
58185
+ for (var _i = 0, indexInfos_3 = indexInfos; _i < indexInfos_3.length; _i++) {
58186
+ var info = indexInfos_3[_i];
58192
58187
  if (info.keyType === stringType) {
58193
58188
  stringIndexInfo = info;
58194
58189
  }
@@ -58761,14 +58756,14 @@ var ts;
58761
58756
  }
58762
58757
  function getIndexInfosOfIndexSymbol(indexSymbol) {
58763
58758
  if (indexSymbol.declarations) {
58764
- var indexInfos_2 = [];
58759
+ var indexInfos_4 = [];
58765
58760
  var _loop_14 = function (declaration) {
58766
58761
  if (declaration.parameters.length === 1) {
58767
58762
  var parameter = declaration.parameters[0];
58768
58763
  if (parameter.type) {
58769
58764
  forEachType(getTypeFromTypeNode(parameter.type), function (keyType) {
58770
- if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos_2, keyType)) {
58771
- indexInfos_2.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, ts.hasEffectiveModifier(declaration, 64 /* Readonly */), declaration));
58765
+ if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos_4, keyType)) {
58766
+ indexInfos_4.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, ts.hasEffectiveModifier(declaration, 64 /* Readonly */), declaration));
58772
58767
  }
58773
58768
  });
58774
58769
  }
@@ -58778,7 +58773,7 @@ var ts;
58778
58773
  var declaration = _a[_i];
58779
58774
  _loop_14(declaration);
58780
58775
  }
58781
- return indexInfos_2;
58776
+ return indexInfos_4;
58782
58777
  }
58783
58778
  return ts.emptyArray;
58784
58779
  }
@@ -59326,7 +59321,7 @@ var ts;
59326
59321
  // The expression is processed as an identifier expression (section 4.3)
59327
59322
  // or property access expression(section 4.10),
59328
59323
  // the widened type(section 3.9) of which becomes the result.
59329
- var type = ts.isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName);
59324
+ var type = checkExpressionWithTypeArguments(node);
59330
59325
  links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(type));
59331
59326
  }
59332
59327
  return links.resolvedType;
@@ -62030,7 +62025,9 @@ var ts;
62030
62025
  return result;
62031
62026
  }
62032
62027
  function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {
62033
- var declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.symbol.declarations[0];
62028
+ var declaration = type.objectFlags & 4 /* Reference */ ? type.node :
62029
+ type.objectFlags & 16777216 /* InstantiationExpressionType */ ? type.node :
62030
+ type.symbol.declarations[0];
62034
62031
  var links = getNodeLinks(declaration);
62035
62032
  var target = type.objectFlags & 4 /* Reference */ ? links.resolvedType :
62036
62033
  type.objectFlags & 64 /* Instantiated */ ? type.target : type;
@@ -62046,8 +62043,8 @@ var ts;
62046
62043
  outerTypeParameters = ts.addRange(outerTypeParameters, templateTagParameters);
62047
62044
  }
62048
62045
  typeParameters = outerTypeParameters || ts.emptyArray;
62049
- var allDeclarations_1 = type.objectFlags & 4 /* Reference */ ? [declaration] : type.symbol.declarations;
62050
- typeParameters = (target.objectFlags & 4 /* Reference */ || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ?
62046
+ var allDeclarations_1 = type.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */) ? [declaration] : type.symbol.declarations;
62047
+ typeParameters = (target.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ?
62051
62048
  ts.filter(typeParameters, function (tp) { return ts.some(allDeclarations_1, function (d) { return isTypeParameterPossiblyReferenced(tp, d); }); }) :
62052
62049
  typeParameters;
62053
62050
  links.outerTypeParameters = typeParameters;
@@ -62219,6 +62216,9 @@ var ts;
62219
62216
  mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper);
62220
62217
  freshTypeParameter.mapper = mapper;
62221
62218
  }
62219
+ if (type.objectFlags & 16777216 /* InstantiationExpressionType */) {
62220
+ result.node = type.node;
62221
+ }
62222
62222
  result.target = type;
62223
62223
  result.mapper = mapper;
62224
62224
  result.aliasSymbol = aliasSymbol || type.aliasSymbol;
@@ -62984,10 +62984,6 @@ var ts;
62984
62984
  if (sourceRestType || targetRestType) {
62985
62985
  void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers);
62986
62986
  }
62987
- if (sourceRestType && targetRestType && sourceCount !== targetCount) {
62988
- // We're not able to relate misaligned complex rest parameters
62989
- return 0 /* False */;
62990
- }
62991
62987
  var kind = target.declaration ? target.declaration.kind : 0 /* Unknown */;
62992
62988
  var strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 168 /* MethodDeclaration */ &&
62993
62989
  kind !== 167 /* MethodSignature */ && kind !== 170 /* Constructor */;
@@ -65412,8 +65408,8 @@ var ts;
65412
65408
  var indexInfos = getIndexInfosOfType(target);
65413
65409
  var targetHasStringIndex = ts.some(indexInfos, function (info) { return info.keyType === stringType; });
65414
65410
  var result = -1 /* True */;
65415
- for (var _i = 0, indexInfos_3 = indexInfos; _i < indexInfos_3.length; _i++) {
65416
- var targetInfo = indexInfos_3[_i];
65411
+ for (var _i = 0, indexInfos_5 = indexInfos; _i < indexInfos_5.length; _i++) {
65412
+ var targetInfo = indexInfos_5[_i];
65417
65413
  var related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ :
65418
65414
  isGenericMappedType(source) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source), targetInfo.type, 3 /* Both */, reportErrors) :
65419
65415
  typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState);
@@ -66020,10 +66016,10 @@ var ts;
66020
66016
  if (!(ts.getObjectFlags(type) & 4 /* Reference */) || !(ts.getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
66021
66017
  return undefined;
66022
66018
  }
66023
- if (ts.getObjectFlags(type) & 33554432 /* IdenticalBaseTypeCalculated */) {
66024
- return ts.getObjectFlags(type) & 67108864 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : undefined;
66019
+ if (ts.getObjectFlags(type) & 67108864 /* IdenticalBaseTypeCalculated */) {
66020
+ return ts.getObjectFlags(type) & 134217728 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : undefined;
66025
66021
  }
66026
- type.objectFlags |= 33554432 /* IdenticalBaseTypeCalculated */;
66022
+ type.objectFlags |= 67108864 /* IdenticalBaseTypeCalculated */;
66027
66023
  var target = type.target;
66028
66024
  if (ts.getObjectFlags(target) & 1 /* Class */) {
66029
66025
  var baseTypeNode = getBaseTypeNodeOfClass(target);
@@ -66044,7 +66040,7 @@ var ts;
66044
66040
  if (ts.length(getTypeArguments(type)) > ts.length(target.typeParameters)) {
66045
66041
  instantiatedBase = getTypeWithThisArgument(instantiatedBase, ts.last(getTypeArguments(type)));
66046
66042
  }
66047
- type.objectFlags |= 67108864 /* IdenticalBaseTypeExists */;
66043
+ type.objectFlags |= 134217728 /* IdenticalBaseTypeExists */;
66048
66044
  return type.cachedEquivalentBaseType = instantiatedBase;
66049
66045
  }
66050
66046
  function isEmptyLiteralType(type) {
@@ -66708,7 +66704,7 @@ var ts;
66708
66704
  var result = !!(type.flags & 465829888 /* Instantiable */ ||
66709
66705
  type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) ||
66710
66706
  objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations ||
66711
- objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 8388608 /* ObjectRestType */)) ||
66707
+ objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 8388608 /* ObjectRestType */ | 16777216 /* InstantiationExpressionType */)) ||
66712
66708
  type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && ts.some(type.types, couldContainTypeVariables));
66713
66709
  if (type.flags & 3899393 /* ObjectFlagsType */) {
66714
66710
  type.objectFlags |= 1048576 /* CouldContainTypeVariablesComputed */ | (result ? 2097152 /* CouldContainTypeVariables */ : 0);
@@ -67625,8 +67621,8 @@ var ts;
67625
67621
  var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32 /* Mapped */) ? 8 /* HomomorphicMappedType */ : 0;
67626
67622
  var indexInfos = getIndexInfosOfType(target);
67627
67623
  if (isObjectTypeWithInferableIndex(source)) {
67628
- for (var _i = 0, indexInfos_4 = indexInfos; _i < indexInfos_4.length; _i++) {
67629
- var targetInfo = indexInfos_4[_i];
67624
+ for (var _i = 0, indexInfos_6 = indexInfos; _i < indexInfos_6.length; _i++) {
67625
+ var targetInfo = indexInfos_6[_i];
67630
67626
  var propTypes = [];
67631
67627
  for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
67632
67628
  var prop = _b[_a];
@@ -67646,8 +67642,8 @@ var ts;
67646
67642
  }
67647
67643
  }
67648
67644
  }
67649
- for (var _e = 0, indexInfos_5 = indexInfos; _e < indexInfos_5.length; _e++) {
67650
- var targetInfo = indexInfos_5[_e];
67645
+ for (var _e = 0, indexInfos_7 = indexInfos; _e < indexInfos_7.length; _e++) {
67646
+ var targetInfo = indexInfos_7[_e];
67651
67647
  var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType);
67652
67648
  if (sourceInfo) {
67653
67649
  inferWithPriority(sourceInfo.type, targetInfo.type, priority);
@@ -70045,7 +70041,7 @@ var ts;
70045
70041
  var substituteConstraints = !(checkMode && checkMode & 2 /* Inferential */) &&
70046
70042
  someType(type, isGenericTypeWithUnionConstraint) &&
70047
70043
  (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
70048
- return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 /* Instantiable */ && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t; }) : type;
70044
+ return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOrType(t) : t; }) : type;
70049
70045
  }
70050
70046
  function isExportOrExportExpression(location) {
70051
70047
  return !!ts.findAncestor(location, function (n) {
@@ -75811,6 +75807,72 @@ var ts;
75811
75807
  return node.flags & 32 /* OptionalChain */ ? checkNonNullChain(node) :
75812
75808
  getNonNullableType(checkExpression(node.expression));
75813
75809
  }
75810
+ function checkExpressionWithTypeArguments(node) {
75811
+ checkGrammarExpressionWithTypeArguments(node);
75812
+ var exprType = node.kind === 227 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) :
75813
+ ts.isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) :
75814
+ checkExpression(node.exprName);
75815
+ var typeArguments = node.typeArguments;
75816
+ if (exprType === silentNeverType || isErrorType(exprType) || !ts.some(typeArguments)) {
75817
+ return exprType;
75818
+ }
75819
+ var hasSomeApplicableSignature = false;
75820
+ var nonApplicableType;
75821
+ var result = getInstantiatedType(exprType);
75822
+ var errorType = hasSomeApplicableSignature ? nonApplicableType : exprType;
75823
+ if (errorType) {
75824
+ diagnostics.add(ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, typeToString(errorType)));
75825
+ }
75826
+ return result;
75827
+ function getInstantiatedType(type) {
75828
+ var hasSignatures = false;
75829
+ var hasApplicableSignature = false;
75830
+ var result = getInstantiatedTypePart(type);
75831
+ hasSomeApplicableSignature || (hasSomeApplicableSignature = hasApplicableSignature);
75832
+ if (hasSignatures && !hasApplicableSignature) {
75833
+ nonApplicableType !== null && nonApplicableType !== void 0 ? nonApplicableType : (nonApplicableType = type);
75834
+ }
75835
+ return result;
75836
+ function getInstantiatedTypePart(type) {
75837
+ if (type.flags & 524288 /* Object */) {
75838
+ var resolved = resolveStructuredTypeMembers(type);
75839
+ var callSignatures = getInstantiatedSignatures(resolved.callSignatures);
75840
+ var constructSignatures = getInstantiatedSignatures(resolved.constructSignatures);
75841
+ hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
75842
+ hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
75843
+ if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
75844
+ var result_11 = createAnonymousType(undefined, resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
75845
+ result_11.objectFlags |= 16777216 /* InstantiationExpressionType */;
75846
+ result_11.node = node;
75847
+ return result_11;
75848
+ }
75849
+ }
75850
+ else if (type.flags & 58982400 /* InstantiableNonPrimitive */) {
75851
+ var constraint = getBaseConstraintOfType(type);
75852
+ if (constraint) {
75853
+ var instantiated = getInstantiatedTypePart(constraint);
75854
+ if (instantiated !== constraint) {
75855
+ return instantiated;
75856
+ }
75857
+ }
75858
+ }
75859
+ else if (type.flags & 1048576 /* Union */) {
75860
+ return mapType(type, getInstantiatedType);
75861
+ }
75862
+ else if (type.flags & 2097152 /* Intersection */) {
75863
+ return getIntersectionType(ts.sameMap(type.types, getInstantiatedTypePart));
75864
+ }
75865
+ return type;
75866
+ }
75867
+ }
75868
+ function getInstantiatedSignatures(signatures) {
75869
+ var applicableSignatures = ts.filter(signatures, function (sig) { return !!sig.typeParameters && hasCorrectTypeArgumentArity(sig, typeArguments); });
75870
+ return ts.sameMap(applicableSignatures, function (sig) {
75871
+ var typeArgumentTypes = checkTypeArguments(sig, typeArguments, /*reportErrors*/ true);
75872
+ return typeArgumentTypes ? getSignatureInstantiation(sig, typeArgumentTypes, ts.isInJSFile(sig.declaration)) : sig;
75873
+ });
75874
+ }
75875
+ }
75814
75876
  function checkMetaProperty(node) {
75815
75877
  checkGrammarMetaProperty(node);
75816
75878
  if (node.keywordToken === 103 /* NewKeyword */) {
@@ -77300,7 +77362,7 @@ var ts;
77300
77362
  if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
77301
77363
  if (operator === 55 /* AmpersandAmpersandToken */) {
77302
77364
  var parent = ts.walkUpParenthesizedExpressions(node.parent);
77303
- checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
77365
+ checkTestingKnownTruthyCallableOrAwaitableType(node.left, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
77304
77366
  }
77305
77367
  checkTruthinessOfType(leftType, node.left);
77306
77368
  }
@@ -77807,8 +77869,8 @@ var ts;
77807
77869
  return type;
77808
77870
  }
77809
77871
  function checkConditionalExpression(node, checkMode) {
77810
- var type = checkTruthinessExpression(node.condition);
77811
- checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue);
77872
+ checkTruthinessExpression(node.condition);
77873
+ checkTestingKnownTruthyCallableOrAwaitableType(node.condition, node.whenTrue);
77812
77874
  var type1 = checkExpression(node.whenTrue, checkMode);
77813
77875
  var type2 = checkExpression(node.whenFalse, checkMode);
77814
77876
  return getUnionType([type1, type2], 2 /* Subtype */);
@@ -78327,6 +78389,8 @@ var ts;
78327
78389
  return checkAssertion(node);
78328
78390
  case 229 /* NonNullExpression */:
78329
78391
  return checkNonNullAssertion(node);
78392
+ case 227 /* ExpressionWithTypeArguments */:
78393
+ return checkExpressionWithTypeArguments(node);
78330
78394
  case 230 /* MetaProperty */:
78331
78395
  return checkMetaProperty(node);
78332
78396
  case 214 /* DeleteExpression */:
@@ -79530,12 +79594,12 @@ var ts;
79530
79594
  case 264 /* ImportEqualsDeclaration */:
79531
79595
  case 267 /* NamespaceImport */:
79532
79596
  case 266 /* ImportClause */:
79533
- var result_11 = 0 /* None */;
79597
+ var result_12 = 0 /* None */;
79534
79598
  var target = resolveAlias(getSymbolOfNode(d));
79535
79599
  ts.forEach(target.declarations, function (d) {
79536
- result_11 |= getDeclarationSpaces(d);
79600
+ result_12 |= getDeclarationSpaces(d);
79537
79601
  });
79538
- return result_11;
79602
+ return result_12;
79539
79603
  case 253 /* VariableDeclaration */:
79540
79604
  case 202 /* BindingElement */:
79541
79605
  case 255 /* FunctionDeclaration */:
@@ -80962,50 +81026,59 @@ var ts;
80962
81026
  function checkIfStatement(node) {
80963
81027
  // Grammar checking
80964
81028
  checkGrammarStatementInAmbientContext(node);
80965
- var type = checkTruthinessExpression(node.expression);
80966
- checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement);
81029
+ checkTruthinessExpression(node.expression);
81030
+ checkTestingKnownTruthyCallableOrAwaitableType(node.expression, node.thenStatement);
80967
81031
  checkSourceElement(node.thenStatement);
80968
81032
  if (node.thenStatement.kind === 235 /* EmptyStatement */) {
80969
81033
  error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
80970
81034
  }
80971
81035
  checkSourceElement(node.elseStatement);
80972
81036
  }
80973
- function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, type, body) {
81037
+ function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, body) {
80974
81038
  if (!strictNullChecks)
80975
81039
  return;
80976
- if (getFalsyFlags(type))
80977
- return;
80978
- var location = ts.isBinaryExpression(condExpr) ? condExpr.right : condExpr;
80979
- if (ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression)) {
80980
- return;
80981
- }
80982
- var testedNode = ts.isIdentifier(location) ? location
80983
- : ts.isPropertyAccessExpression(location) ? location.name
80984
- : ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
80985
- : undefined;
80986
- // While it technically should be invalid for any known-truthy value
80987
- // to be tested, we de-scope to functions and Promises unreferenced in
80988
- // the block as a heuristic to identify the most common bugs. There
80989
- // are too many false positives for values sourced from type
80990
- // definitions without strictNullChecks otherwise.
80991
- var callSignatures = getSignaturesOfType(type, 0 /* Call */);
80992
- var isPromise = !!getAwaitedTypeOfPromise(type);
80993
- if (callSignatures.length === 0 && !isPromise) {
80994
- return;
80995
- }
80996
- var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
80997
- if (!testedSymbol && !isPromise) {
80998
- return;
80999
- }
81000
- var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
81001
- || testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
81002
- if (!isUsed) {
81003
- if (isPromise) {
81004
- errorAndMaybeSuggestAwait(location,
81005
- /*maybeMissingAwait*/ true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
81040
+ helper(condExpr, body);
81041
+ while (ts.isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56 /* BarBarToken */) {
81042
+ condExpr = condExpr.left;
81043
+ helper(condExpr, body);
81044
+ }
81045
+ function helper(condExpr, body) {
81046
+ var location = ts.isBinaryExpression(condExpr) &&
81047
+ (condExpr.operatorToken.kind === 56 /* BarBarToken */ || condExpr.operatorToken.kind === 55 /* AmpersandAmpersandToken */)
81048
+ ? condExpr.right
81049
+ : condExpr;
81050
+ var type = checkTruthinessExpression(location);
81051
+ var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
81052
+ if (getFalsyFlags(type) || isPropertyExpressionCast)
81053
+ return;
81054
+ // While it technically should be invalid for any known-truthy value
81055
+ // to be tested, we de-scope to functions and Promises unreferenced in
81056
+ // the block as a heuristic to identify the most common bugs. There
81057
+ // are too many false positives for values sourced from type
81058
+ // definitions without strictNullChecks otherwise.
81059
+ var callSignatures = getSignaturesOfType(type, 0 /* Call */);
81060
+ var isPromise = !!getAwaitedTypeOfPromise(type);
81061
+ if (callSignatures.length === 0 && !isPromise) {
81062
+ return;
81006
81063
  }
81007
- else {
81008
- error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
81064
+ var testedNode = ts.isIdentifier(location) ? location
81065
+ : ts.isPropertyAccessExpression(location) ? location.name
81066
+ : ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
81067
+ : undefined;
81068
+ var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
81069
+ if (!testedSymbol && !isPromise) {
81070
+ return;
81071
+ }
81072
+ var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
81073
+ || testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
81074
+ if (!isUsed) {
81075
+ if (isPromise) {
81076
+ errorAndMaybeSuggestAwait(location,
81077
+ /*maybeMissingAwait*/ true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
81078
+ }
81079
+ else {
81080
+ error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
81081
+ }
81009
81082
  }
81010
81083
  }
81011
81084
  }
@@ -82094,8 +82167,8 @@ var ts;
82094
82167
  }
82095
82168
  }
82096
82169
  if (indexInfos.length > 1) {
82097
- for (var _d = 0, indexInfos_6 = indexInfos; _d < indexInfos_6.length; _d++) {
82098
- var info = indexInfos_6[_d];
82170
+ for (var _d = 0, indexInfos_8 = indexInfos; _d < indexInfos_8.length; _d++) {
82171
+ var info = indexInfos_8[_d];
82099
82172
  checkIndexConstraintForIndexSignature(type, info);
82100
82173
  }
82101
82174
  }
@@ -82121,8 +82194,8 @@ var ts;
82121
82194
  error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
82122
82195
  }
82123
82196
  };
82124
- for (var _i = 0, indexInfos_7 = indexInfos; _i < indexInfos_7.length; _i++) {
82125
- var info = indexInfos_7[_i];
82197
+ for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
82198
+ var info = indexInfos_9[_i];
82126
82199
  _loop_27(info);
82127
82200
  }
82128
82201
  }
@@ -82144,8 +82217,8 @@ var ts;
82144
82217
  error(errorNode, ts.Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type));
82145
82218
  }
82146
82219
  };
82147
- for (var _i = 0, indexInfos_8 = indexInfos; _i < indexInfos_8.length; _i++) {
82148
- var info = indexInfos_8[_i];
82220
+ for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
82221
+ var info = indexInfos_10[_i];
82149
82222
  _loop_28(info);
82150
82223
  }
82151
82224
  }
@@ -82194,9 +82267,9 @@ var ts;
82194
82267
  var containsArguments = containsArgumentsReference(node);
82195
82268
  if (containsArguments) {
82196
82269
  var lastJSDocParam = ts.lastOrUndefined(jsdocParameters);
82197
- if (lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
82270
+ if (isJs && lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
82198
82271
  lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
82199
- errorOrSuggestion(isJs, lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
82272
+ error(lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
82200
82273
  }
82201
82274
  }
82202
82275
  else {
@@ -82206,7 +82279,9 @@ var ts;
82206
82279
  return;
82207
82280
  }
82208
82281
  if (ts.isQualifiedName(name)) {
82209
- errorOrSuggestion(isJs, name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
82282
+ if (isJs) {
82283
+ error(name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
82284
+ }
82210
82285
  }
82211
82286
  else {
82212
82287
  errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
@@ -83799,10 +83874,10 @@ var ts;
83799
83874
  }
83800
83875
  // ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
83801
83876
  // (TS Exceptions: namespaces, function overloads, enums, and interfaces)
83802
- if (flags & (1920 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) {
83877
+ if (flags & (1920 /* Namespace */ | 384 /* Enum */)) {
83803
83878
  return;
83804
83879
  }
83805
- var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverloadAndNotAccessor);
83880
+ var exportedDeclarationsCount = ts.countWhere(declarations, ts.and(isNotOverloadAndNotAccessor, ts.not(ts.isInterfaceDeclaration)));
83806
83881
  if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) {
83807
83882
  // it is legal to merge type alias with other values
83808
83883
  // so count should be either 1 (just type alias) or 2 (type alias + merged value)
@@ -87778,7 +87853,7 @@ var ts;
87778
87853
  return factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
87779
87854
  case 180 /* TypeQuery */:
87780
87855
  ts.Debug.type(node);
87781
- return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName));
87856
+ return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
87782
87857
  case 181 /* TypeLiteral */:
87783
87858
  ts.Debug.type(node);
87784
87859
  return factory.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
@@ -90670,8 +90745,8 @@ var ts;
90670
90745
  function generateClassElementDecorationExpressions(node, isStatic) {
90671
90746
  var members = getDecoratedClassElements(node, isStatic);
90672
90747
  var expressions;
90673
- for (var _i = 0, members_6 = members; _i < members_6.length; _i++) {
90674
- var member = members_6[_i];
90748
+ for (var _i = 0, members_8 = members; _i < members_8.length; _i++) {
90749
+ var member = members_8[_i];
90675
90750
  var expression = generateClassElementDecorationExpression(node, member);
90676
90751
  if (expression) {
90677
90752
  if (!expressions) {
@@ -96016,8 +96091,8 @@ var ts;
96016
96091
  function convertJsxChildrenToChildrenPropAssignment(children) {
96017
96092
  var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
96018
96093
  if (ts.length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) {
96019
- var result_12 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
96020
- return result_12 && factory.createPropertyAssignment("children", result_12);
96094
+ var result_13 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
96095
+ return result_13 && factory.createPropertyAssignment("children", result_13);
96021
96096
  }
96022
96097
  var result = ts.mapDefined(children, transformJsxChildToExpression);
96023
96098
  return ts.length(result) ? factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) : undefined;
@@ -109655,6 +109730,8 @@ var ts;
109655
109730
  return emitAsExpression(node);
109656
109731
  case 229 /* NonNullExpression */:
109657
109732
  return emitNonNullExpression(node);
109733
+ case 227 /* ExpressionWithTypeArguments */:
109734
+ return emitExpressionWithTypeArguments(node);
109658
109735
  case 230 /* MetaProperty */:
109659
109736
  return emitMetaProperty(node);
109660
109737
  case 231 /* SyntheticExpression */:
@@ -110099,6 +110176,7 @@ var ts;
110099
110176
  writeKeyword("typeof");
110100
110177
  writeSpace();
110101
110178
  emit(node.exprName);
110179
+ emitTypeArguments(node, node.typeArguments);
110102
110180
  }
110103
110181
  function emitTypeLiteral(node) {
110104
110182
  writePunctuation("{");
@@ -115072,15 +115150,15 @@ var ts;
115072
115150
  // which per above occurred during the current program creation.
115073
115151
  // Since we assume the filesystem does not change during program creation,
115074
115152
  // it is safe to reuse resolutions from the earlier call.
115075
- var result_13 = [];
115153
+ var result_14 = [];
115076
115154
  var i = 0;
115077
115155
  for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
115078
115156
  var moduleName = moduleNames_1[_i];
115079
115157
  var resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
115080
115158
  i++;
115081
- result_13.push(resolvedModule);
115159
+ result_14.push(resolvedModule);
115082
115160
  }
115083
- return result_13;
115161
+ return result_14;
115084
115162
  }
115085
115163
  // At this point, we know at least one of the following hold:
115086
115164
  // - file has local declarations for ambient modules
@@ -120198,9 +120276,9 @@ var ts;
120198
120276
  if (!preferSymlinks) {
120199
120277
  // Symlinks inside ignored paths are already filtered out of the symlink cache,
120200
120278
  // so we only need to remove them from the realpath filenames.
120201
- var result_14 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
120202
- if (result_14)
120203
- return result_14;
120279
+ var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
120280
+ if (result_15)
120281
+ return result_15;
120204
120282
  }
120205
120283
  var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
120206
120284
  var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
@@ -120220,10 +120298,10 @@ var ts;
120220
120298
  for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
120221
120299
  var symlinkDirectory = symlinkDirectories_1[_i];
120222
120300
  var option = ts.resolvePath(symlinkDirectory, relative);
120223
- var result_15 = cb(option, target === referenceRedirect);
120301
+ var result_16 = cb(option, target === referenceRedirect);
120224
120302
  shouldFilterIgnoredPaths = true; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
120225
- if (result_15)
120226
- return result_15;
120303
+ if (result_16)
120304
+ return result_16;
120227
120305
  }
120228
120306
  });
120229
120307
  });