@typescript-deploys/pr-build 4.6.0-pr-47550-2 → 4.6.0-pr-47552-4

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-insiders.20220121";
92
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220122";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -9456,6 +9456,8 @@ var ts;
9456
9456
  Remove_unused_declarations_for_Colon_0: diag(90041, ts.DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"),
9457
9457
  Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."),
9458
9458
  Includes_imports_of_types_referenced_by_0: diag(90054, ts.DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"),
9459
+ Remove_type_from_import_declaration_from_0: diag(90055, ts.DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""),
9460
+ Remove_type_from_import_of_0_from_1: diag(90056, ts.DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""),
9459
9461
  Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"),
9460
9462
  Convert_0_to_1_in_0: diag(95003, ts.DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"),
9461
9463
  Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"),
@@ -33355,7 +33357,7 @@ var ts;
33355
33357
  function parseInitializer() {
33356
33358
  return parseOptional(63 /* EqualsToken */) ? parseAssignmentExpressionOrHigher() : undefined;
33357
33359
  }
33358
- function parseAssignmentExpressionOrHigher(parsingConditionalTrueSide) {
33360
+ function parseAssignmentExpressionOrHigher() {
33359
33361
  // AssignmentExpression[in,yield]:
33360
33362
  // 1) ConditionalExpression[?in,?yield]
33361
33363
  // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield]
@@ -33381,7 +33383,7 @@ var ts;
33381
33383
  // If we do successfully parse arrow-function, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is
33382
33384
  // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done
33383
33385
  // with AssignmentExpression if we see one.
33384
- var arrowExpression = tryParseParenthesizedArrowFunctionExpression(parsingConditionalTrueSide) || tryParseAsyncSimpleArrowFunctionExpression();
33386
+ var arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression();
33385
33387
  if (arrowExpression) {
33386
33388
  return arrowExpression;
33387
33389
  }
@@ -33400,7 +33402,7 @@ var ts;
33400
33402
  // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single
33401
33403
  // identifier and the current token is an arrow.
33402
33404
  if (expr.kind === 79 /* Identifier */ && token() === 38 /* EqualsGreaterThanToken */) {
33403
- return parseSimpleArrowFunctionExpression(pos, expr, /*asyncModifier*/ undefined, parsingConditionalTrueSide);
33405
+ return parseSimpleArrowFunctionExpression(pos, expr, /*asyncModifier*/ undefined);
33404
33406
  }
33405
33407
  // Now see if we might be in cases '2' or '3'.
33406
33408
  // If the expression was a LHS expression, and we have an assignment operator, then
@@ -33460,7 +33462,7 @@ var ts;
33460
33462
  return finishNode(factory.createYieldExpression(/*asteriskToken*/ undefined, /*expression*/ undefined), pos);
33461
33463
  }
33462
33464
  }
33463
- function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier, parsingConditionalTrueSide) {
33465
+ function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
33464
33466
  ts.Debug.assert(token() === 38 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
33465
33467
  var parameter = factory.createParameterDeclaration(
33466
33468
  /*decorators*/ undefined,
@@ -33472,11 +33474,11 @@ var ts;
33472
33474
  finishNode(parameter, identifier.pos);
33473
33475
  var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
33474
33476
  var equalsGreaterThanToken = parseExpectedToken(38 /* EqualsGreaterThanToken */);
33475
- var body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier, parsingConditionalTrueSide);
33477
+ var body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier);
33476
33478
  var node = factory.createArrowFunction(asyncModifier, /*typeParameters*/ undefined, parameters, /*type*/ undefined, equalsGreaterThanToken, body);
33477
33479
  return addJSDocComment(finishNode(node, pos));
33478
33480
  }
33479
- function tryParseParenthesizedArrowFunctionExpression(parsingConditionalTrueSide) {
33481
+ function tryParseParenthesizedArrowFunctionExpression() {
33480
33482
  var triState = isParenthesizedArrowFunctionExpression();
33481
33483
  if (triState === 0 /* False */) {
33482
33484
  // It's definitely not a parenthesized arrow function expression.
@@ -33487,8 +33489,8 @@ var ts;
33487
33489
  // it out, but don't allow any ambiguity, and return 'undefined' if this could be an
33488
33490
  // expression instead.
33489
33491
  return triState === 1 /* True */ ?
33490
- parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ true, parsingConditionalTrueSide) :
33491
- tryParse(function () { return parsePossibleParenthesizedArrowFunctionExpression(parsingConditionalTrueSide); });
33492
+ parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ true) :
33493
+ tryParse(parsePossibleParenthesizedArrowFunctionExpression);
33492
33494
  }
33493
33495
  // True -> We definitely expect a parenthesized arrow function here.
33494
33496
  // False -> There *cannot* be a parenthesized arrow function here.
@@ -33618,25 +33620,25 @@ var ts;
33618
33620
  return 2 /* Unknown */;
33619
33621
  }
33620
33622
  }
33621
- function parsePossibleParenthesizedArrowFunctionExpression(parsingConditionalTrueSide) {
33623
+ function parsePossibleParenthesizedArrowFunctionExpression() {
33622
33624
  var tokenPos = scanner.getTokenPos();
33623
33625
  if (notParenthesizedArrow === null || notParenthesizedArrow === void 0 ? void 0 : notParenthesizedArrow.has(tokenPos)) {
33624
33626
  return undefined;
33625
33627
  }
33626
- var result = parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ false, parsingConditionalTrueSide);
33628
+ var result = parseParenthesizedArrowFunctionExpression(/*allowAmbiguity*/ false);
33627
33629
  if (!result) {
33628
33630
  (notParenthesizedArrow || (notParenthesizedArrow = new ts.Set())).add(tokenPos);
33629
33631
  }
33630
33632
  return result;
33631
33633
  }
33632
- function tryParseAsyncSimpleArrowFunctionExpression(parsingConditionalTrueSide) {
33634
+ function tryParseAsyncSimpleArrowFunctionExpression() {
33633
33635
  // We do a check here so that we won't be doing unnecessarily call to "lookAhead"
33634
33636
  if (token() === 131 /* AsyncKeyword */) {
33635
33637
  if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) {
33636
33638
  var pos = getNodePos();
33637
33639
  var asyncModifier = parseModifiersForArrowFunction();
33638
33640
  var expr = parseBinaryExpressionOrHigher(0 /* Lowest */);
33639
- return parseSimpleArrowFunctionExpression(pos, expr, asyncModifier, parsingConditionalTrueSide);
33641
+ return parseSimpleArrowFunctionExpression(pos, expr, asyncModifier);
33640
33642
  }
33641
33643
  }
33642
33644
  return undefined;
@@ -33660,7 +33662,7 @@ var ts;
33660
33662
  }
33661
33663
  return 0 /* False */;
33662
33664
  }
33663
- function parseParenthesizedArrowFunctionExpression(allowAmbiguity, parsingConditionalTrueSide) {
33665
+ function parseParenthesizedArrowFunctionExpression(allowAmbiguity) {
33664
33666
  var pos = getNodePos();
33665
33667
  var hasJSDoc = hasPrecedingJSDocComment();
33666
33668
  var modifiers = parseModifiersForArrowFunction();
@@ -33686,18 +33688,6 @@ var ts;
33686
33688
  return undefined;
33687
33689
  }
33688
33690
  }
33689
- // Given:
33690
- // x ? y => ({ y }) : z => ({ z })
33691
- // We try to parse the body of the first arrow function by looking at:
33692
- // ({ y }) : z => ({ z })
33693
- // This is a valid arrow function with "z" as the return type.
33694
- //
33695
- // But, if we're in the true side of a conditional expression, this colon
33696
- // terminates the true side, so cannot be the return type.
33697
- if (parsingConditionalTrueSide && token() === 58 /* ColonToken */) {
33698
- ts.Debug.assert(!allowAmbiguity);
33699
- return undefined;
33700
- }
33701
33691
  var type = parseReturnType(58 /* ColonToken */, /*isType*/ false);
33702
33692
  if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) {
33703
33693
  return undefined;
@@ -33731,7 +33721,7 @@ var ts;
33731
33721
  var node = factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body);
33732
33722
  return withJSDoc(finishNode(node, pos), hasJSDoc);
33733
33723
  }
33734
- function parseArrowFunctionExpressionBody(isAsync, parsingConditionalTrueSide) {
33724
+ function parseArrowFunctionExpressionBody(isAsync) {
33735
33725
  if (token() === 18 /* OpenBraceToken */) {
33736
33726
  return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */);
33737
33727
  }
@@ -33759,8 +33749,8 @@ var ts;
33759
33749
  var savedTopLevel = topLevel;
33760
33750
  topLevel = false;
33761
33751
  var node = isAsync
33762
- ? doInAwaitContext(function () { return parseAssignmentExpressionOrHigher(parsingConditionalTrueSide); })
33763
- : doOutsideOfAwaitContext(function () { return parseAssignmentExpressionOrHigher(parsingConditionalTrueSide); });
33752
+ ? doInAwaitContext(parseAssignmentExpressionOrHigher)
33753
+ : doOutsideOfAwaitContext(parseAssignmentExpressionOrHigher);
33764
33754
  topLevel = savedTopLevel;
33765
33755
  return node;
33766
33756
  }
@@ -33773,8 +33763,8 @@ var ts;
33773
33763
  // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and
33774
33764
  // we do not that for the 'whenFalse' part.
33775
33765
  var colonToken;
33776
- return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, function () { return parseAssignmentExpressionOrHigher(/*parsingConditionalTrueSide*/ true); }), colonToken = parseExpectedToken(58 /* ColonToken */), ts.nodeIsPresent(colonToken)
33777
- ? parseAssignmentExpressionOrHigher(/*parsingConditionalTrueSide*/ false)
33766
+ return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(58 /* ColonToken */), ts.nodeIsPresent(colonToken)
33767
+ ? parseAssignmentExpressionOrHigher()
33778
33768
  : createMissingNode(79 /* Identifier */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, ts.tokenToString(58 /* ColonToken */))), pos);
33779
33769
  }
33780
33770
  function parseBinaryExpressionOrHigher(precedence) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.6.0-pr-47550-2",
5
+ "version": "4.6.0-pr-47552-4",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [