@typescript-deploys/pr-build 6.0.0-pr-62243-10 → 6.0.0-pr-62275-3

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 = "6.0";
21
- var version = `${versionMajorMinor}.0-insiders.20250811`;
21
+ var version = `${versionMajorMinor}.0-insiders.20250812`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -14265,15 +14265,12 @@ function forEachYieldExpression(body, visitor) {
14265
14265
  function traverse(node) {
14266
14266
  switch (node.kind) {
14267
14267
  case 230 /* YieldExpression */:
14268
- const value = visitor(node);
14269
- if (value) {
14270
- return value;
14271
- }
14268
+ visitor(node);
14272
14269
  const operand = node.expression;
14273
- if (!operand) {
14274
- return;
14270
+ if (operand) {
14271
+ traverse(operand);
14275
14272
  }
14276
- return traverse(operand);
14273
+ return;
14277
14274
  case 267 /* EnumDeclaration */:
14278
14275
  case 265 /* InterfaceDeclaration */:
14279
14276
  case 268 /* ModuleDeclaration */:
@@ -14282,10 +14279,11 @@ function forEachYieldExpression(body, visitor) {
14282
14279
  default:
14283
14280
  if (isFunctionLike(node)) {
14284
14281
  if (node.name && node.name.kind === 168 /* ComputedPropertyName */) {
14285
- return traverse(node.name.expression);
14282
+ traverse(node.name.expression);
14283
+ return;
14286
14284
  }
14287
14285
  } else if (!isPartOfTypeNode(node)) {
14288
- return forEachChild(node, traverse);
14286
+ forEachChild(node, traverse);
14289
14287
  }
14290
14288
  }
14291
14289
  }
@@ -19135,7 +19133,7 @@ function hasContextSensitiveParameters(node) {
19135
19133
  if (node.kind !== 220 /* ArrowFunction */) {
19136
19134
  const parameter = firstOrUndefined(node.parameters);
19137
19135
  if (!(parameter && parameterIsThisKeyword(parameter))) {
19138
- return !!(node.flags & 256 /* ContainsThis */);
19136
+ return true;
19139
19137
  }
19140
19138
  }
19141
19139
  }
@@ -42649,7 +42647,6 @@ function createBinder() {
42649
42647
  const saveExceptionTarget = currentExceptionTarget;
42650
42648
  const saveActiveLabelList = activeLabelList;
42651
42649
  const saveHasExplicitReturn = hasExplicitReturn;
42652
- const saveSeenThisKeyword = seenThisKeyword;
42653
42650
  const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 176 /* ClassStaticBlockDeclaration */;
42654
42651
  if (!isImmediatelyInvoked) {
42655
42652
  currentFlow = createFlowNode(
@@ -42669,17 +42666,13 @@ function createBinder() {
42669
42666
  currentContinueTarget = void 0;
42670
42667
  activeLabelList = void 0;
42671
42668
  hasExplicitReturn = false;
42672
- seenThisKeyword = false;
42673
42669
  bindChildren(node);
42674
- node.flags &= ~(5632 /* ReachabilityAndEmitFlags */ | 256 /* ContainsThis */);
42670
+ node.flags &= ~5632 /* ReachabilityAndEmitFlags */;
42675
42671
  if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) {
42676
42672
  node.flags |= 512 /* HasImplicitReturn */;
42677
42673
  if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */;
42678
42674
  node.endFlowNode = currentFlow;
42679
42675
  }
42680
- if (seenThisKeyword) {
42681
- node.flags |= 256 /* ContainsThis */;
42682
- }
42683
42676
  if (node.kind === 308 /* SourceFile */) {
42684
42677
  node.flags |= emitFlags;
42685
42678
  node.endFlowNode = currentFlow;
@@ -42700,14 +42693,11 @@ function createBinder() {
42700
42693
  currentExceptionTarget = saveExceptionTarget;
42701
42694
  activeLabelList = saveActiveLabelList;
42702
42695
  hasExplicitReturn = saveHasExplicitReturn;
42703
- seenThisKeyword = node.kind === 220 /* ArrowFunction */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
42704
42696
  } else if (containerFlags & 64 /* IsInterface */) {
42705
- const saveSeenThisKeyword = seenThisKeyword;
42706
42697
  seenThisKeyword = false;
42707
42698
  bindChildren(node);
42708
42699
  Debug.assertNotNode(node, isIdentifier);
42709
42700
  node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */;
42710
- seenThisKeyword = saveSeenThisKeyword;
42711
42701
  } else {
42712
42702
  bindChildren(node);
42713
42703
  }
@@ -44195,9 +44185,6 @@ function createBinder() {
44195
44185
  }
44196
44186
  // falls through
44197
44187
  case 110 /* ThisKeyword */:
44198
- if (node.kind === 110 /* ThisKeyword */) {
44199
- seenThisKeyword = true;
44200
- }
44201
44188
  if (currentFlow && (isExpression(node) || parent.kind === 305 /* ShorthandPropertyAssignment */)) {
44202
44189
  node.flowNode = currentFlow;
44203
44190
  }
@@ -45120,8 +45107,6 @@ function getContainerFlags(node) {
45120
45107
  // falls through
45121
45108
  case 177 /* Constructor */:
45122
45109
  case 263 /* FunctionDeclaration */:
45123
- case 176 /* ClassStaticBlockDeclaration */:
45124
- return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
45125
45110
  case 174 /* MethodSignature */:
45126
45111
  case 180 /* CallSignature */:
45127
45112
  case 324 /* JSDocSignature */:
@@ -45129,14 +45114,17 @@ function getContainerFlags(node) {
45129
45114
  case 185 /* FunctionType */:
45130
45115
  case 181 /* ConstructSignature */:
45131
45116
  case 186 /* ConstructorType */:
45132
- return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
45117
+ case 176 /* ClassStaticBlockDeclaration */:
45118
+ return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
45133
45119
  case 352 /* JSDocImportTag */:
45134
- return 1 /* IsContainer */ | 32 /* HasLocals */;
45120
+ return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
45135
45121
  case 219 /* FunctionExpression */:
45136
45122
  case 220 /* ArrowFunction */:
45137
45123
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
45138
45124
  case 269 /* ModuleBlock */:
45139
45125
  return 4 /* IsControlFlowContainer */;
45126
+ case 173 /* PropertyDeclaration */:
45127
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
45140
45128
  case 300 /* CatchClause */:
45141
45129
  case 249 /* ForStatement */:
45142
45130
  case 250 /* ForInStatement */:
@@ -63750,8 +63738,7 @@ function createTypeChecker(host) {
63750
63738
  const { initializer } = node;
63751
63739
  return !!initializer && isContextSensitive(initializer);
63752
63740
  }
63753
- case 295 /* JsxExpression */:
63754
- case 230 /* YieldExpression */: {
63741
+ case 295 /* JsxExpression */: {
63755
63742
  const { expression } = node;
63756
63743
  return !!expression && isContextSensitive(expression);
63757
63744
  }
@@ -63759,7 +63746,7 @@ function createTypeChecker(host) {
63759
63746
  return false;
63760
63747
  }
63761
63748
  function isContextSensitiveFunctionLikeDeclaration(node) {
63762
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
63749
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
63763
63750
  }
63764
63751
  function hasContextSensitiveReturnExpression(node) {
63765
63752
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -67145,7 +67132,7 @@ function createTypeChecker(host) {
67145
67132
  }
67146
67133
  function discriminateTypeByDiscriminableItems(target, discriminators, related) {
67147
67134
  const types = target.types;
67148
- const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */);
67135
+ const include = types.map((t) => t.flags & 402784252 /* Primitive */ || getReducedType(t).flags & 131072 /* Never */ ? 0 /* False */ : -1 /* True */);
67149
67136
  for (const [getDiscriminatingType, propertyName] of discriminators) {
67150
67137
  let matched = false;
67151
67138
  for (let i = 0; i < types.length; i++) {
@@ -73301,10 +73288,7 @@ function createTypeChecker(host) {
73301
73288
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
73302
73289
  const inferenceContext = getInferenceContext(node);
73303
73290
  if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
73304
- const type = instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
73305
- if (!(type.flags & 3 /* AnyOrUnknown */)) {
73306
- return type;
73307
- }
73291
+ return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
73308
73292
  }
73309
73293
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
73310
73294
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
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 = "6.0";
2288
- var version = `${versionMajorMinor}.0-insiders.20250811`;
2288
+ var version = `${versionMajorMinor}.0-insiders.20250812`;
2289
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17952,15 +17952,12 @@ function forEachYieldExpression(body, visitor) {
17952
17952
  function traverse(node) {
17953
17953
  switch (node.kind) {
17954
17954
  case 230 /* YieldExpression */:
17955
- const value = visitor(node);
17956
- if (value) {
17957
- return value;
17958
- }
17955
+ visitor(node);
17959
17956
  const operand = node.expression;
17960
- if (!operand) {
17961
- return;
17957
+ if (operand) {
17958
+ traverse(operand);
17962
17959
  }
17963
- return traverse(operand);
17960
+ return;
17964
17961
  case 267 /* EnumDeclaration */:
17965
17962
  case 265 /* InterfaceDeclaration */:
17966
17963
  case 268 /* ModuleDeclaration */:
@@ -17969,10 +17966,11 @@ function forEachYieldExpression(body, visitor) {
17969
17966
  default:
17970
17967
  if (isFunctionLike(node)) {
17971
17968
  if (node.name && node.name.kind === 168 /* ComputedPropertyName */) {
17972
- return traverse(node.name.expression);
17969
+ traverse(node.name.expression);
17970
+ return;
17973
17971
  }
17974
17972
  } else if (!isPartOfTypeNode(node)) {
17975
- return forEachChild(node, traverse);
17973
+ forEachChild(node, traverse);
17976
17974
  }
17977
17975
  }
17978
17976
  }
@@ -23123,7 +23121,7 @@ function hasContextSensitiveParameters(node) {
23123
23121
  if (node.kind !== 220 /* ArrowFunction */) {
23124
23122
  const parameter = firstOrUndefined(node.parameters);
23125
23123
  if (!(parameter && parameterIsThisKeyword(parameter))) {
23126
- return !!(node.flags & 256 /* ContainsThis */);
23124
+ return true;
23127
23125
  }
23128
23126
  }
23129
23127
  }
@@ -47157,7 +47155,6 @@ function createBinder() {
47157
47155
  const saveExceptionTarget = currentExceptionTarget;
47158
47156
  const saveActiveLabelList = activeLabelList;
47159
47157
  const saveHasExplicitReturn = hasExplicitReturn;
47160
- const saveSeenThisKeyword = seenThisKeyword;
47161
47158
  const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 176 /* ClassStaticBlockDeclaration */;
47162
47159
  if (!isImmediatelyInvoked) {
47163
47160
  currentFlow = createFlowNode(
@@ -47177,17 +47174,13 @@ function createBinder() {
47177
47174
  currentContinueTarget = void 0;
47178
47175
  activeLabelList = void 0;
47179
47176
  hasExplicitReturn = false;
47180
- seenThisKeyword = false;
47181
47177
  bindChildren(node);
47182
- node.flags &= ~(5632 /* ReachabilityAndEmitFlags */ | 256 /* ContainsThis */);
47178
+ node.flags &= ~5632 /* ReachabilityAndEmitFlags */;
47183
47179
  if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) {
47184
47180
  node.flags |= 512 /* HasImplicitReturn */;
47185
47181
  if (hasExplicitReturn) node.flags |= 1024 /* HasExplicitReturn */;
47186
47182
  node.endFlowNode = currentFlow;
47187
47183
  }
47188
- if (seenThisKeyword) {
47189
- node.flags |= 256 /* ContainsThis */;
47190
- }
47191
47184
  if (node.kind === 308 /* SourceFile */) {
47192
47185
  node.flags |= emitFlags;
47193
47186
  node.endFlowNode = currentFlow;
@@ -47208,14 +47201,11 @@ function createBinder() {
47208
47201
  currentExceptionTarget = saveExceptionTarget;
47209
47202
  activeLabelList = saveActiveLabelList;
47210
47203
  hasExplicitReturn = saveHasExplicitReturn;
47211
- seenThisKeyword = node.kind === 220 /* ArrowFunction */ ? saveSeenThisKeyword || seenThisKeyword : saveSeenThisKeyword;
47212
47204
  } else if (containerFlags & 64 /* IsInterface */) {
47213
- const saveSeenThisKeyword = seenThisKeyword;
47214
47205
  seenThisKeyword = false;
47215
47206
  bindChildren(node);
47216
47207
  Debug.assertNotNode(node, isIdentifier);
47217
47208
  node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */;
47218
- seenThisKeyword = saveSeenThisKeyword;
47219
47209
  } else {
47220
47210
  bindChildren(node);
47221
47211
  }
@@ -48703,9 +48693,6 @@ function createBinder() {
48703
48693
  }
48704
48694
  // falls through
48705
48695
  case 110 /* ThisKeyword */:
48706
- if (node.kind === 110 /* ThisKeyword */) {
48707
- seenThisKeyword = true;
48708
- }
48709
48696
  if (currentFlow && (isExpression(node) || parent2.kind === 305 /* ShorthandPropertyAssignment */)) {
48710
48697
  node.flowNode = currentFlow;
48711
48698
  }
@@ -49628,8 +49615,6 @@ function getContainerFlags(node) {
49628
49615
  // falls through
49629
49616
  case 177 /* Constructor */:
49630
49617
  case 263 /* FunctionDeclaration */:
49631
- case 176 /* ClassStaticBlockDeclaration */:
49632
- return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
49633
49618
  case 174 /* MethodSignature */:
49634
49619
  case 180 /* CallSignature */:
49635
49620
  case 324 /* JSDocSignature */:
@@ -49637,14 +49622,17 @@ function getContainerFlags(node) {
49637
49622
  case 185 /* FunctionType */:
49638
49623
  case 181 /* ConstructSignature */:
49639
49624
  case 186 /* ConstructorType */:
49640
- return 1 /* IsContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
49625
+ case 176 /* ClassStaticBlockDeclaration */:
49626
+ return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */;
49641
49627
  case 352 /* JSDocImportTag */:
49642
- return 1 /* IsContainer */ | 32 /* HasLocals */;
49628
+ return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */;
49643
49629
  case 219 /* FunctionExpression */:
49644
49630
  case 220 /* ArrowFunction */:
49645
49631
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */;
49646
49632
  case 269 /* ModuleBlock */:
49647
49633
  return 4 /* IsControlFlowContainer */;
49634
+ case 173 /* PropertyDeclaration */:
49635
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0;
49648
49636
  case 300 /* CatchClause */:
49649
49637
  case 249 /* ForStatement */:
49650
49638
  case 250 /* ForInStatement */:
@@ -68358,8 +68346,7 @@ function createTypeChecker(host) {
68358
68346
  const { initializer } = node;
68359
68347
  return !!initializer && isContextSensitive(initializer);
68360
68348
  }
68361
- case 295 /* JsxExpression */:
68362
- case 230 /* YieldExpression */: {
68349
+ case 295 /* JsxExpression */: {
68363
68350
  const { expression } = node;
68364
68351
  return !!expression && isContextSensitive(expression);
68365
68352
  }
@@ -68367,7 +68354,7 @@ function createTypeChecker(host) {
68367
68354
  return false;
68368
68355
  }
68369
68356
  function isContextSensitiveFunctionLikeDeclaration(node) {
68370
- return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node) || !!(getFunctionFlags(node) & 1 /* Generator */ && node.body && forEachYieldExpression(node.body, isContextSensitive));
68357
+ return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
68371
68358
  }
68372
68359
  function hasContextSensitiveReturnExpression(node) {
68373
68360
  if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) {
@@ -71753,7 +71740,7 @@ function createTypeChecker(host) {
71753
71740
  }
71754
71741
  function discriminateTypeByDiscriminableItems(target, discriminators, related) {
71755
71742
  const types = target.types;
71756
- const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */);
71743
+ const include = types.map((t) => t.flags & 402784252 /* Primitive */ || getReducedType(t).flags & 131072 /* Never */ ? 0 /* False */ : -1 /* True */);
71757
71744
  for (const [getDiscriminatingType, propertyName] of discriminators) {
71758
71745
  let matched = false;
71759
71746
  for (let i = 0; i < types.length; i++) {
@@ -77909,10 +77896,7 @@ function createTypeChecker(host) {
77909
77896
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
77910
77897
  const inferenceContext = getInferenceContext(node);
77911
77898
  if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
77912
- const type = instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
77913
- if (!(type.flags & 3 /* AnyOrUnknown */)) {
77914
- return type;
77915
- }
77899
+ return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
77916
77900
  }
77917
77901
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
77918
77902
  const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper);
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": "6.0.0-pr-62243-10",
5
+ "version": "6.0.0-pr-62275-3",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [