@typescript-deploys/pr-build 5.3.0-pr-55779-6 → 5.3.0-pr-55793-6

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.3";
21
- var version = `${versionMajorMinor}.0-insiders.20230919`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230920`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -16423,7 +16423,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
16423
16423
  return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
16424
16424
  }
16425
16425
  function getCompilerOptionValue(options, option) {
16426
- return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
16426
+ return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
16427
16427
  }
16428
16428
  function getJSXTransformEnabled(options) {
16429
16429
  const jsx = options.jsx;
@@ -34183,7 +34183,8 @@ var commandOptionsWithoutBuild = [
34183
34183
  {
34184
34184
  name: "allowJs",
34185
34185
  type: "boolean",
34186
- affectsModuleResolution: true,
34186
+ allowJsFlag: true,
34187
+ affectsBuildInfo: true,
34187
34188
  showInSimplifiedHelpView: true,
34188
34189
  category: Diagnostics.JavaScript_Support,
34189
34190
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
@@ -34193,6 +34194,8 @@ var commandOptionsWithoutBuild = [
34193
34194
  name: "checkJs",
34194
34195
  type: "boolean",
34195
34196
  affectsModuleResolution: true,
34197
+ affectsSemanticDiagnostics: true,
34198
+ affectsBuildInfo: true,
34196
34199
  showInSimplifiedHelpView: true,
34197
34200
  category: Diagnostics.JavaScript_Support,
34198
34201
  description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
@@ -34205,6 +34208,10 @@ var commandOptionsWithoutBuild = [
34205
34208
  affectsEmit: true,
34206
34209
  affectsBuildInfo: true,
34207
34210
  affectsModuleResolution: true,
34211
+ // The checker emits an error when it sees JSX but this option is not set in compilerOptions.
34212
+ // This is effectively a semantic error, so mark this option as affecting semantic diagnostics
34213
+ // so we know to refresh errors when this option is changed.
34214
+ affectsSemanticDiagnostics: true,
34208
34215
  paramType: Diagnostics.KIND,
34209
34216
  showInSimplifiedHelpView: true,
34210
34217
  category: Diagnostics.Language_and_Environment,
@@ -39922,7 +39929,7 @@ function createBinder() {
39922
39929
  case 36 /* ExclamationEqualsToken */:
39923
39930
  case 37 /* EqualsEqualsEqualsToken */:
39924
39931
  case 38 /* ExclamationEqualsEqualsToken */:
39925
- return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
39932
+ return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right));
39926
39933
  case 104 /* InstanceOfKeyword */:
39927
39934
  return isNarrowableOperand(expr.left);
39928
39935
  case 103 /* InKeyword */:
@@ -59697,8 +59704,16 @@ function createTypeChecker(host) {
59697
59704
  const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
59698
59705
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
59699
59706
  for (let i = 0; i < paramCount; i++) {
59700
- const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
59701
- const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
59707
+ const sourceType = i === restIndex ? getMutableArrayOrTupleType(
59708
+ getRestTypeAtPosition(source, i),
59709
+ /*forceVariadic*/
59710
+ false
59711
+ ) : tryGetTypeAtPosition(source, i);
59712
+ const targetType = i === restIndex ? getMutableArrayOrTupleType(
59713
+ getRestTypeAtPosition(target, i),
59714
+ /*forceVariadic*/
59715
+ false
59716
+ ) : tryGetTypeAtPosition(target, i);
59702
59717
  if (sourceType && targetType) {
59703
59718
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
59704
59719
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -65807,6 +65822,10 @@ function createTypeChecker(host) {
65807
65822
  }
65808
65823
  return type;
65809
65824
  }
65825
+ function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {
65826
+ assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);
65827
+ return narrowType(type, expr, assumeTrue);
65828
+ }
65810
65829
  function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
65811
65830
  switch (expr.operatorToken.kind) {
65812
65831
  case 64 /* EqualsToken */:
@@ -65854,6 +65873,12 @@ function createTypeChecker(host) {
65854
65873
  if (isMatchingConstructorReference(right)) {
65855
65874
  return narrowTypeByConstructor(type, operator, left, assumeTrue);
65856
65875
  }
65876
+ if (isBooleanLiteral(right)) {
65877
+ return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);
65878
+ }
65879
+ if (isBooleanLiteral(left)) {
65880
+ return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);
65881
+ }
65857
65882
  break;
65858
65883
  case 104 /* InstanceOfKeyword */:
65859
65884
  return narrowTypeByInstanceof(type, expr, assumeTrue);
@@ -70208,14 +70233,14 @@ function createTypeChecker(host) {
70208
70233
  }
70209
70234
  return getInferredTypes(context);
70210
70235
  }
70211
- function getMutableArrayOrTupleType(type) {
70212
- return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
70236
+ function getMutableArrayOrTupleType(type, forceVariadic) {
70237
+ return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
70213
70238
  getElementTypes(type),
70214
70239
  type.target.elementFlags,
70215
70240
  /*readonly*/
70216
70241
  false,
70217
70242
  type.target.labeledElementDeclarations
70218
- ) : createTupleType([type], [8 /* Variadic */]);
70243
+ ) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
70219
70244
  }
70220
70245
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
70221
70246
  const inConstContext = isConstTypeVariable(restType);
@@ -70224,7 +70249,11 @@ function createTypeChecker(host) {
70224
70249
  if (isSpreadArgument(arg)) {
70225
70250
  const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
70226
70251
  if (isArrayLikeType(spreadType)) {
70227
- return getMutableArrayOrTupleType(spreadType);
70252
+ return getMutableArrayOrTupleType(
70253
+ spreadType,
70254
+ /*forceVariadic*/
70255
+ true
70256
+ );
70228
70257
  }
70229
70258
  return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
70230
70259
  }
package/lib/tsserver.js CHANGED
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
2328
2328
 
2329
2329
  // src/compiler/corePublic.ts
2330
2330
  var versionMajorMinor = "5.3";
2331
- var version = `${versionMajorMinor}.0-insiders.20230919`;
2331
+ var version = `${versionMajorMinor}.0-insiders.20230920`;
2332
2332
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2333
2333
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2334
2334
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -20572,7 +20572,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) {
20572
20572
  return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
20573
20573
  }
20574
20574
  function getCompilerOptionValue(options, option) {
20575
- return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
20575
+ return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
20576
20576
  }
20577
20577
  function getJSXTransformEnabled(options) {
20578
20578
  const jsx = options.jsx;
@@ -38577,7 +38577,8 @@ var commandOptionsWithoutBuild = [
38577
38577
  {
38578
38578
  name: "allowJs",
38579
38579
  type: "boolean",
38580
- affectsModuleResolution: true,
38580
+ allowJsFlag: true,
38581
+ affectsBuildInfo: true,
38581
38582
  showInSimplifiedHelpView: true,
38582
38583
  category: Diagnostics.JavaScript_Support,
38583
38584
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
@@ -38587,6 +38588,8 @@ var commandOptionsWithoutBuild = [
38587
38588
  name: "checkJs",
38588
38589
  type: "boolean",
38589
38590
  affectsModuleResolution: true,
38591
+ affectsSemanticDiagnostics: true,
38592
+ affectsBuildInfo: true,
38590
38593
  showInSimplifiedHelpView: true,
38591
38594
  category: Diagnostics.JavaScript_Support,
38592
38595
  description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
@@ -38599,6 +38602,10 @@ var commandOptionsWithoutBuild = [
38599
38602
  affectsEmit: true,
38600
38603
  affectsBuildInfo: true,
38601
38604
  affectsModuleResolution: true,
38605
+ // The checker emits an error when it sees JSX but this option is not set in compilerOptions.
38606
+ // This is effectively a semantic error, so mark this option as affecting semantic diagnostics
38607
+ // so we know to refresh errors when this option is changed.
38608
+ affectsSemanticDiagnostics: true,
38602
38609
  paramType: Diagnostics.KIND,
38603
38610
  showInSimplifiedHelpView: true,
38604
38611
  category: Diagnostics.Language_and_Environment,
@@ -44577,7 +44584,7 @@ function createBinder() {
44577
44584
  case 36 /* ExclamationEqualsToken */:
44578
44585
  case 37 /* EqualsEqualsEqualsToken */:
44579
44586
  case 38 /* ExclamationEqualsEqualsToken */:
44580
- return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
44587
+ return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right));
44581
44588
  case 104 /* InstanceOfKeyword */:
44582
44589
  return isNarrowableOperand(expr.left);
44583
44590
  case 103 /* InKeyword */:
@@ -64397,8 +64404,16 @@ function createTypeChecker(host) {
64397
64404
  const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
64398
64405
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
64399
64406
  for (let i = 0; i < paramCount; i++) {
64400
- const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
64401
- const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
64407
+ const sourceType = i === restIndex ? getMutableArrayOrTupleType(
64408
+ getRestTypeAtPosition(source, i),
64409
+ /*forceVariadic*/
64410
+ false
64411
+ ) : tryGetTypeAtPosition(source, i);
64412
+ const targetType = i === restIndex ? getMutableArrayOrTupleType(
64413
+ getRestTypeAtPosition(target, i),
64414
+ /*forceVariadic*/
64415
+ false
64416
+ ) : tryGetTypeAtPosition(target, i);
64402
64417
  if (sourceType && targetType) {
64403
64418
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
64404
64419
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -70507,6 +70522,10 @@ function createTypeChecker(host) {
70507
70522
  }
70508
70523
  return type;
70509
70524
  }
70525
+ function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {
70526
+ assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);
70527
+ return narrowType(type, expr, assumeTrue);
70528
+ }
70510
70529
  function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
70511
70530
  switch (expr.operatorToken.kind) {
70512
70531
  case 64 /* EqualsToken */:
@@ -70554,6 +70573,12 @@ function createTypeChecker(host) {
70554
70573
  if (isMatchingConstructorReference(right)) {
70555
70574
  return narrowTypeByConstructor(type, operator, left, assumeTrue);
70556
70575
  }
70576
+ if (isBooleanLiteral(right)) {
70577
+ return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);
70578
+ }
70579
+ if (isBooleanLiteral(left)) {
70580
+ return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);
70581
+ }
70557
70582
  break;
70558
70583
  case 104 /* InstanceOfKeyword */:
70559
70584
  return narrowTypeByInstanceof(type, expr, assumeTrue);
@@ -74908,14 +74933,14 @@ function createTypeChecker(host) {
74908
74933
  }
74909
74934
  return getInferredTypes(context);
74910
74935
  }
74911
- function getMutableArrayOrTupleType(type) {
74912
- return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
74936
+ function getMutableArrayOrTupleType(type, forceVariadic) {
74937
+ return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
74913
74938
  getElementTypes(type),
74914
74939
  type.target.elementFlags,
74915
74940
  /*readonly*/
74916
74941
  false,
74917
74942
  type.target.labeledElementDeclarations
74918
- ) : createTupleType([type], [8 /* Variadic */]);
74943
+ ) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
74919
74944
  }
74920
74945
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
74921
74946
  const inConstContext = isConstTypeVariable(restType);
@@ -74924,7 +74949,11 @@ function createTypeChecker(host) {
74924
74949
  if (isSpreadArgument(arg)) {
74925
74950
  const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
74926
74951
  if (isArrayLikeType(spreadType)) {
74927
- return getMutableArrayOrTupleType(spreadType);
74952
+ return getMutableArrayOrTupleType(
74953
+ spreadType,
74954
+ /*forceVariadic*/
74955
+ true
74956
+ );
74928
74957
  }
74929
74958
  return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
74930
74959
  }
@@ -165327,6 +165356,11 @@ function getJsDocTagsFromDeclarations(declarations, checker) {
165327
165356
  }
165328
165357
  for (const tag of tags) {
165329
165358
  infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });
165359
+ if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) {
165360
+ forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => {
165361
+ infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) });
165362
+ });
165363
+ }
165330
165364
  }
165331
165365
  });
165332
165366
  return infos;
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230919`;
38
+ version = `${versionMajorMinor}.0-insiders.20230920`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17860,7 +17860,7 @@ ${lanes.join("\n")}
17860
17860
  return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations);
17861
17861
  }
17862
17862
  function getCompilerOptionValue(options, option) {
17863
- return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name];
17863
+ return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name];
17864
17864
  }
17865
17865
  function getJSXTransformEnabled(options) {
17866
17866
  const jsx = options.jsx;
@@ -38060,7 +38060,8 @@ ${lanes.join("\n")}
38060
38060
  {
38061
38061
  name: "allowJs",
38062
38062
  type: "boolean",
38063
- affectsModuleResolution: true,
38063
+ allowJsFlag: true,
38064
+ affectsBuildInfo: true,
38064
38065
  showInSimplifiedHelpView: true,
38065
38066
  category: Diagnostics.JavaScript_Support,
38066
38067
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
@@ -38070,6 +38071,8 @@ ${lanes.join("\n")}
38070
38071
  name: "checkJs",
38071
38072
  type: "boolean",
38072
38073
  affectsModuleResolution: true,
38074
+ affectsSemanticDiagnostics: true,
38075
+ affectsBuildInfo: true,
38073
38076
  showInSimplifiedHelpView: true,
38074
38077
  category: Diagnostics.JavaScript_Support,
38075
38078
  description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
@@ -38082,6 +38085,10 @@ ${lanes.join("\n")}
38082
38085
  affectsEmit: true,
38083
38086
  affectsBuildInfo: true,
38084
38087
  affectsModuleResolution: true,
38088
+ // The checker emits an error when it sees JSX but this option is not set in compilerOptions.
38089
+ // This is effectively a semantic error, so mark this option as affecting semantic diagnostics
38090
+ // so we know to refresh errors when this option is changed.
38091
+ affectsSemanticDiagnostics: true,
38085
38092
  paramType: Diagnostics.KIND,
38086
38093
  showInSimplifiedHelpView: true,
38087
38094
  category: Diagnostics.Language_and_Environment,
@@ -42424,7 +42431,7 @@ ${lanes.join("\n")}
42424
42431
  case 36 /* ExclamationEqualsToken */:
42425
42432
  case 37 /* EqualsEqualsEqualsToken */:
42426
42433
  case 38 /* ExclamationEqualsEqualsToken */:
42427
- return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
42434
+ return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right));
42428
42435
  case 104 /* InstanceOfKeyword */:
42429
42436
  return isNarrowableOperand(expr.left);
42430
42437
  case 103 /* InKeyword */:
@@ -62163,8 +62170,16 @@ ${lanes.join("\n")}
62163
62170
  const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
62164
62171
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
62165
62172
  for (let i = 0; i < paramCount; i++) {
62166
- const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
62167
- const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
62173
+ const sourceType = i === restIndex ? getMutableArrayOrTupleType(
62174
+ getRestTypeAtPosition(source, i),
62175
+ /*forceVariadic*/
62176
+ false
62177
+ ) : tryGetTypeAtPosition(source, i);
62178
+ const targetType = i === restIndex ? getMutableArrayOrTupleType(
62179
+ getRestTypeAtPosition(target, i),
62180
+ /*forceVariadic*/
62181
+ false
62182
+ ) : tryGetTypeAtPosition(target, i);
62168
62183
  if (sourceType && targetType) {
62169
62184
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
62170
62185
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -68273,6 +68288,10 @@ ${lanes.join("\n")}
68273
68288
  }
68274
68289
  return type;
68275
68290
  }
68291
+ function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) {
68292
+ assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */);
68293
+ return narrowType(type, expr, assumeTrue);
68294
+ }
68276
68295
  function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
68277
68296
  switch (expr.operatorToken.kind) {
68278
68297
  case 64 /* EqualsToken */:
@@ -68320,6 +68339,12 @@ ${lanes.join("\n")}
68320
68339
  if (isMatchingConstructorReference(right)) {
68321
68340
  return narrowTypeByConstructor(type, operator, left, assumeTrue);
68322
68341
  }
68342
+ if (isBooleanLiteral(right)) {
68343
+ return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue);
68344
+ }
68345
+ if (isBooleanLiteral(left)) {
68346
+ return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue);
68347
+ }
68323
68348
  break;
68324
68349
  case 104 /* InstanceOfKeyword */:
68325
68350
  return narrowTypeByInstanceof(type, expr, assumeTrue);
@@ -72674,14 +72699,14 @@ ${lanes.join("\n")}
72674
72699
  }
72675
72700
  return getInferredTypes(context);
72676
72701
  }
72677
- function getMutableArrayOrTupleType(type) {
72678
- return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
72702
+ function getMutableArrayOrTupleType(type, forceVariadic) {
72703
+ return type.flags & 1048576 /* Union */ ? mapType(type, (t) => getMutableArrayOrTupleType(t, forceVariadic)) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType(
72679
72704
  getElementTypes(type),
72680
72705
  type.target.elementFlags,
72681
72706
  /*readonly*/
72682
72707
  false,
72683
72708
  type.target.labeledElementDeclarations
72684
- ) : createTupleType([type], [8 /* Variadic */]);
72709
+ ) : forceVariadic ? createTupleType([type], [8 /* Variadic */]) : type;
72685
72710
  }
72686
72711
  function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) {
72687
72712
  const inConstContext = isConstTypeVariable(restType);
@@ -72690,7 +72715,11 @@ ${lanes.join("\n")}
72690
72715
  if (isSpreadArgument(arg)) {
72691
72716
  const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode);
72692
72717
  if (isArrayLikeType(spreadType)) {
72693
- return getMutableArrayOrTupleType(spreadType);
72718
+ return getMutableArrayOrTupleType(
72719
+ spreadType,
72720
+ /*forceVariadic*/
72721
+ true
72722
+ );
72694
72723
  }
72695
72724
  return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext);
72696
72725
  }
@@ -164600,6 +164629,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164600
164629
  }
164601
164630
  for (const tag of tags) {
164602
164631
  infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) });
164632
+ if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) {
164633
+ forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => {
164634
+ infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) });
164635
+ });
164636
+ }
164603
164637
  }
164604
164638
  });
164605
164639
  return infos;
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.3";
57
- var version = `${versionMajorMinor}.0-insiders.20230919`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230920`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -26005,7 +26005,8 @@ var commandOptionsWithoutBuild = [
26005
26005
  {
26006
26006
  name: "allowJs",
26007
26007
  type: "boolean",
26008
- affectsModuleResolution: true,
26008
+ allowJsFlag: true,
26009
+ affectsBuildInfo: true,
26009
26010
  showInSimplifiedHelpView: true,
26010
26011
  category: Diagnostics.JavaScript_Support,
26011
26012
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
@@ -26015,6 +26016,8 @@ var commandOptionsWithoutBuild = [
26015
26016
  name: "checkJs",
26016
26017
  type: "boolean",
26017
26018
  affectsModuleResolution: true,
26019
+ affectsSemanticDiagnostics: true,
26020
+ affectsBuildInfo: true,
26018
26021
  showInSimplifiedHelpView: true,
26019
26022
  category: Diagnostics.JavaScript_Support,
26020
26023
  description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
@@ -26027,6 +26030,10 @@ var commandOptionsWithoutBuild = [
26027
26030
  affectsEmit: true,
26028
26031
  affectsBuildInfo: true,
26029
26032
  affectsModuleResolution: true,
26033
+ // The checker emits an error when it sees JSX but this option is not set in compilerOptions.
26034
+ // This is effectively a semantic error, so mark this option as affecting semantic diagnostics
26035
+ // so we know to refresh errors when this option is changed.
26036
+ affectsSemanticDiagnostics: true,
26030
26037
  paramType: Diagnostics.KIND,
26031
26038
  showInSimplifiedHelpView: true,
26032
26039
  category: Diagnostics.Language_and_Environment,
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.3.0-pr-55779-6",
5
+ "version": "5.3.0-pr-55793-6",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "1bd6193dd17b73a073ca88599548ec08e4db3f2f"
117
+ "gitHead": "090f760a7fea5adf2a8e4d1e6483f7140cdf90a2"
118
118
  }