@typescript-deploys/pr-build 5.8.0-pr-60454-3 → 5.8.0-pr-60950-9

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.
package/lib/_tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.8";
21
- var version = `${versionMajorMinor}.0-insiders.20250117`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250121`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -18875,7 +18875,7 @@ function isValidBigIntString(s, roundTripOnly) {
18875
18875
  return success && result === 10 /* BigIntLiteral */ && scanner.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) }));
18876
18876
  }
18877
18877
  function isValidTypeOnlyAliasUseSite(useSite) {
18878
- return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
18878
+ return !!(useSite.flags & 33554432 /* Ambient */) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
18879
18879
  }
18880
18880
  function isShorthandPropertyNameUseSite(useSite) {
18881
18881
  return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
@@ -35209,6 +35209,7 @@ var Parser;
35209
35209
  const node = factory2.createExpressionWithTypeArguments(expression, typeArguments);
35210
35210
  const res = finishNode(node, pos);
35211
35211
  if (usedBrace) {
35212
+ skipWhitespace();
35212
35213
  parseExpected(20 /* CloseBraceToken */);
35213
35214
  }
35214
35215
  return res;
@@ -42865,13 +42866,16 @@ function createBinder() {
42865
42866
  function bindForStatement(node) {
42866
42867
  const preLoopLabel = setContinueTarget(node, createLoopLabel());
42867
42868
  const preBodyLabel = createBranchLabel();
42869
+ const preIncrementorLabel = createBranchLabel();
42868
42870
  const postLoopLabel = createBranchLabel();
42869
42871
  bind(node.initializer);
42870
42872
  addAntecedent(preLoopLabel, currentFlow);
42871
42873
  currentFlow = preLoopLabel;
42872
42874
  bindCondition(node.condition, preBodyLabel, postLoopLabel);
42873
42875
  currentFlow = finishFlowLabel(preBodyLabel);
42874
- bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
42876
+ bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel);
42877
+ addAntecedent(preIncrementorLabel, currentFlow);
42878
+ currentFlow = finishFlowLabel(preIncrementorLabel);
42875
42879
  bind(node.incrementor);
42876
42880
  addAntecedent(preLoopLabel, currentFlow);
42877
42881
  currentFlow = finishFlowLabel(postLoopLabel);
@@ -46455,6 +46459,7 @@ function createTypeChecker(host) {
46455
46459
  getNumberLiteralType,
46456
46460
  getBigIntType: () => bigintType,
46457
46461
  getBigIntLiteralType,
46462
+ getUnknownType: () => unknownType,
46458
46463
  createPromiseType,
46459
46464
  createArrayType,
46460
46465
  getElementTypeOfArrayType,
@@ -73123,7 +73128,6 @@ function createTypeChecker(host) {
73123
73128
  return links.immediateTarget;
73124
73129
  }
73125
73130
  function checkObjectLiteral(node, checkMode = 0 /* Normal */) {
73126
- var _a;
73127
73131
  const inDestructuringPattern = isAssignmentTarget(node);
73128
73132
  checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
73129
73133
  const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;
@@ -73197,14 +73201,6 @@ function createTypeChecker(host) {
73197
73201
  prop.links.target = member;
73198
73202
  member = prop;
73199
73203
  allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
73200
- if (contextualType) {
73201
- forEach((_a = getPropertyOfType(contextualType, member.escapedName)) == null ? void 0 : _a.declarations, (declaration) => {
73202
- const symbol = getSymbolOfDeclaration(declaration);
73203
- if (isDeprecatedSymbol(symbol) && symbol.declarations && isTypeAssignableTo(type, getTypeOfSymbol(symbol))) {
73204
- addDeprecatedSuggestion(memberDecl.name, symbol.declarations, member.escapedName);
73205
- }
73206
- });
73207
- }
73208
73204
  if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
73209
73205
  const inferenceContext = getInferenceContext(node);
73210
73206
  Debug.assert(inferenceContext);
@@ -112832,11 +112828,7 @@ function createGetIsolatedDeclarationErrors(resolver) {
112832
112828
  if (isSetAccessor(node.parent)) {
112833
112829
  return createAccessorTypeError(node.parent);
112834
112830
  }
112835
- const addUndefined = resolver.requiresAddingImplicitUndefined(
112836
- node,
112837
- /*enclosingDeclaration*/
112838
- void 0
112839
- );
112831
+ const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
112840
112832
  if (!addUndefined && node.initializer) {
112841
112833
  return createExpressionError(node.initializer);
112842
112834
  }
@@ -6288,6 +6288,7 @@ declare namespace ts {
6288
6288
  getBigIntType(): Type;
6289
6289
  getBigIntLiteralType(value: PseudoBigInt): BigIntLiteralType;
6290
6290
  getBooleanType(): Type;
6291
+ getUnknownType(): Type;
6291
6292
  getFalseType(): Type;
6292
6293
  getTrueType(): Type;
6293
6294
  getVoidType(): Type;
package/lib/typescript.js CHANGED
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2285
2285
 
2286
2286
  // src/compiler/corePublic.ts
2287
2287
  var versionMajorMinor = "5.8";
2288
- var version = `${versionMajorMinor}.0-insiders.20250117`;
2288
+ var version = `${versionMajorMinor}.0-insiders.20250121`;
2289
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -22865,7 +22865,7 @@ function isValidBigIntString(s, roundTripOnly) {
22865
22865
  return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
22866
22866
  }
22867
22867
  function isValidTypeOnlyAliasUseSite(useSite) {
22868
- return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
22868
+ return !!(useSite.flags & 33554432 /* Ambient */) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
22869
22869
  }
22870
22870
  function isShorthandPropertyNameUseSite(useSite) {
22871
22871
  return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
@@ -39469,6 +39469,7 @@ var Parser;
39469
39469
  const node = factory2.createExpressionWithTypeArguments(expression, typeArguments);
39470
39470
  const res = finishNode(node, pos);
39471
39471
  if (usedBrace) {
39472
+ skipWhitespace();
39472
39473
  parseExpected(20 /* CloseBraceToken */);
39473
39474
  }
39474
39475
  return res;
@@ -47375,13 +47376,16 @@ function createBinder() {
47375
47376
  function bindForStatement(node) {
47376
47377
  const preLoopLabel = setContinueTarget(node, createLoopLabel());
47377
47378
  const preBodyLabel = createBranchLabel();
47379
+ const preIncrementorLabel = createBranchLabel();
47378
47380
  const postLoopLabel = createBranchLabel();
47379
47381
  bind(node.initializer);
47380
47382
  addAntecedent(preLoopLabel, currentFlow);
47381
47383
  currentFlow = preLoopLabel;
47382
47384
  bindCondition(node.condition, preBodyLabel, postLoopLabel);
47383
47385
  currentFlow = finishFlowLabel(preBodyLabel);
47384
- bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
47386
+ bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel);
47387
+ addAntecedent(preIncrementorLabel, currentFlow);
47388
+ currentFlow = finishFlowLabel(preIncrementorLabel);
47385
47389
  bind(node.incrementor);
47386
47390
  addAntecedent(preLoopLabel, currentFlow);
47387
47391
  currentFlow = finishFlowLabel(postLoopLabel);
@@ -51065,6 +51069,7 @@ function createTypeChecker(host) {
51065
51069
  getNumberLiteralType,
51066
51070
  getBigIntType: () => bigintType,
51067
51071
  getBigIntLiteralType,
51072
+ getUnknownType: () => unknownType,
51068
51073
  createPromiseType,
51069
51074
  createArrayType,
51070
51075
  getElementTypeOfArrayType,
@@ -77733,7 +77738,6 @@ function createTypeChecker(host) {
77733
77738
  return links.immediateTarget;
77734
77739
  }
77735
77740
  function checkObjectLiteral(node, checkMode = 0 /* Normal */) {
77736
- var _a;
77737
77741
  const inDestructuringPattern = isAssignmentTarget(node);
77738
77742
  checkGrammarObjectLiteralExpression(node, inDestructuringPattern);
77739
77743
  const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0;
@@ -77807,14 +77811,6 @@ function createTypeChecker(host) {
77807
77811
  prop.links.target = member;
77808
77812
  member = prop;
77809
77813
  allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
77810
- if (contextualType) {
77811
- forEach((_a = getPropertyOfType(contextualType, member.escapedName)) == null ? void 0 : _a.declarations, (declaration) => {
77812
- const symbol = getSymbolOfDeclaration(declaration);
77813
- if (isDeprecatedSymbol(symbol) && symbol.declarations && isTypeAssignableTo(type, getTypeOfSymbol(symbol))) {
77814
- addDeprecatedSuggestion(memberDecl.name, symbol.declarations, member.escapedName);
77815
- }
77816
- });
77817
- }
77818
77814
  if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) {
77819
77815
  const inferenceContext = getInferenceContext(node);
77820
77816
  Debug.assert(inferenceContext);
@@ -117624,11 +117620,7 @@ function createGetIsolatedDeclarationErrors(resolver) {
117624
117620
  if (isSetAccessor(node.parent)) {
117625
117621
  return createAccessorTypeError(node.parent);
117626
117622
  }
117627
- const addUndefined = resolver.requiresAddingImplicitUndefined(
117628
- node,
117629
- /*enclosingDeclaration*/
117630
- void 0
117631
- );
117623
+ const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
117632
117624
  if (!addUndefined && node.initializer) {
117633
117625
  return createExpressionError(node.initializer);
117634
117626
  }
@@ -161646,6 +161638,8 @@ registerCodeFix({
161646
161638
  break;
161647
161639
  } else if (canDeleteEntireVariableStatement(sourceFile, token)) {
161648
161640
  deleteEntireVariableStatement(changes, sourceFile, token.parent);
161641
+ } else if (isIdentifier(token) && isFunctionDeclaration(token.parent)) {
161642
+ deleteFunctionLikeDeclaration(changes, sourceFile, token.parent);
161649
161643
  } else {
161650
161644
  tryDeleteDeclaration(
161651
161645
  sourceFile,
@@ -173135,7 +173129,7 @@ var Core;
173135
173129
  } else {
173136
173130
  addIfImplementation(body);
173137
173131
  }
173138
- } else if (isAssertionExpression(typeHavingNode)) {
173132
+ } else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression(typeHavingNode)) {
173139
173133
  addIfImplementation(typeHavingNode.expression);
173140
173134
  }
173141
173135
  }
@@ -174367,22 +174361,24 @@ function provideInlayHints(context) {
174367
174361
  if (!signature) {
174368
174362
  return;
174369
174363
  }
174370
- for (let i = 0; i < node.parameters.length && i < signature.parameters.length; ++i) {
174371
- const param = node.parameters[i];
174372
- if (!isHintableDeclaration(param)) {
174373
- continue;
174374
- }
174375
- const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(param);
174376
- if (effectiveTypeAnnotation) {
174377
- continue;
174364
+ let pos = 0;
174365
+ for (const param of node.parameters) {
174366
+ if (isHintableDeclaration(param)) {
174367
+ addParameterTypeHint(param, parameterIsThisKeyword(param) ? signature.thisParameter : signature.parameters[pos]);
174378
174368
  }
174379
- const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]);
174380
- if (!typeHints) {
174369
+ if (parameterIsThisKeyword(param)) {
174381
174370
  continue;
174382
174371
  }
174383
- addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end);
174372
+ pos++;
174384
174373
  }
174385
174374
  }
174375
+ function addParameterTypeHint(node, symbol) {
174376
+ const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(node);
174377
+ if (effectiveTypeAnnotation || symbol === void 0) return;
174378
+ const typeHints = getParameterDeclarationTypeHints(symbol);
174379
+ if (typeHints === void 0) return;
174380
+ addTypeHints(typeHints, node.questionToken ? node.questionToken.end : node.name.end);
174381
+ }
174386
174382
  function getParameterDeclarationTypeHints(symbol) {
174387
174383
  const valueDeclaration = symbol.valueDeclaration;
174388
174384
  if (!valueDeclaration || !isParameter(valueDeclaration)) {
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": "5.8.0-pr-60454-3",
5
+ "version": "5.8.0-pr-60950-9",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [