@typescript-deploys/pr-build 5.3.0-pr-55718-6 → 5.3.0-pr-55727-5

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.20230912`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230913`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -36691,7 +36691,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e
36691
36691
  return false;
36692
36692
  }
36693
36693
  for (const ext of extensionGroup) {
36694
- if (fileExtensionIs(file, ext)) {
36694
+ if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
36695
36695
  return false;
36696
36696
  }
36697
36697
  const higherPriorityPath = keyMapper(changeExtension(file, ext));
@@ -53489,13 +53489,14 @@ function createTypeChecker(host) {
53489
53489
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
53490
53490
  const paramSymbol = createSymbol(
53491
53491
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
53492
- paramName || `arg${i}`
53492
+ paramName || `arg${i}`,
53493
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
53493
53494
  );
53494
53495
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
53495
53496
  params[i] = paramSymbol;
53496
53497
  }
53497
53498
  if (needsExtraRestElement) {
53498
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
53499
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
53499
53500
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
53500
53501
  if (shorter === right) {
53501
53502
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -64445,7 +64446,7 @@ function createTypeChecker(host) {
64445
64446
  function hasMatchingArgument(expression, reference) {
64446
64447
  if (expression.arguments) {
64447
64448
  for (const argument of expression.arguments) {
64448
- if (isOrContainsMatchingReference(reference, argument)) {
64449
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
64449
64450
  return true;
64450
64451
  }
64451
64452
  }
@@ -66085,7 +66086,7 @@ function createTypeChecker(host) {
66085
66086
  false
66086
66087
  );
66087
66088
  }
66088
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
66089
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
66089
66090
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
66090
66091
  }
66091
66092
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -73972,11 +73973,7 @@ function createTypeChecker(host) {
73972
73973
  error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
73973
73974
  }
73974
73975
  checkNaNEquality(errorNode, operator, left, right);
73975
- if (isUnitType(leftType) && isUnitType(rightType) && isTypeIdenticalTo(leftType, rightType)) {
73976
- error(errorNode, Diagnostics.This_condition_will_always_return_0, operator === 37 /* EqualsEqualsEqualsToken */ || operator === 35 /* EqualsEqualsToken */ ? "true" : "false");
73977
- } else {
73978
- reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
73979
- }
73976
+ reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
73980
73977
  }
73981
73978
  return booleanType;
73982
73979
  case 104 /* InstanceOfKeyword */:
@@ -81958,11 +81955,11 @@ function createTypeChecker(host) {
81958
81955
  if (fileToDirective.has(file.path))
81959
81956
  return;
81960
81957
  fileToDirective.set(file.path, [key, mode]);
81961
- for (const { fileName, resolutionMode } of file.referencedFiles) {
81958
+ for (const { fileName } of file.referencedFiles) {
81962
81959
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
81963
81960
  const referencedFile = host.getSourceFile(resolvedFile);
81964
81961
  if (referencedFile) {
81965
- addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
81962
+ addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
81966
81963
  }
81967
81964
  }
81968
81965
  }
@@ -114472,7 +114469,8 @@ function isIgnoredFileFromWildCardWatching({
114472
114469
  currentDirectory,
114473
114470
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
114474
114471
  writeLog,
114475
- toPath: toPath3
114472
+ toPath: toPath3,
114473
+ getScriptKind
114476
114474
  }) {
114477
114475
  const newPath = removeIgnoredPath(fileOrDirectoryPath);
114478
114476
  if (!newPath) {
@@ -114482,7 +114480,7 @@ function isIgnoredFileFromWildCardWatching({
114482
114480
  fileOrDirectoryPath = newPath;
114483
114481
  if (fileOrDirectoryPath === watchedDirPath)
114484
114482
  return false;
114485
- if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
114483
+ if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
114486
114484
  writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
114487
114485
  return true;
114488
114486
  }
@@ -114511,6 +114509,25 @@ function isIgnoredFileFromWildCardWatching({
114511
114509
  function hasSourceFile(file) {
114512
114510
  return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
114513
114511
  }
114512
+ function isSupportedScriptKind() {
114513
+ if (!getScriptKind)
114514
+ return false;
114515
+ const scriptKind = getScriptKind(fileOrDirectory);
114516
+ switch (scriptKind) {
114517
+ case 3 /* TS */:
114518
+ case 4 /* TSX */:
114519
+ case 7 /* Deferred */:
114520
+ case 5 /* External */:
114521
+ return true;
114522
+ case 1 /* JS */:
114523
+ case 2 /* JSX */:
114524
+ return getAllowJSCompilerOption(options);
114525
+ case 6 /* JSON */:
114526
+ return getResolveJsonModule(options);
114527
+ case 0 /* Unknown */:
114528
+ return false;
114529
+ }
114530
+ }
114514
114531
  }
114515
114532
  function isBuilderProgram(program) {
114516
114533
  return !!program.getState;
package/lib/tsserver.js CHANGED
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
2327
2327
 
2328
2328
  // src/compiler/corePublic.ts
2329
2329
  var versionMajorMinor = "5.3";
2330
- var version = `${versionMajorMinor}.0-insiders.20230912`;
2330
+ var version = `${versionMajorMinor}.0-insiders.20230913`;
2331
2331
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2332
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2333
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -41122,7 +41122,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e
41122
41122
  return false;
41123
41123
  }
41124
41124
  for (const ext of extensionGroup) {
41125
- if (fileExtensionIs(file, ext)) {
41125
+ if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
41126
41126
  return false;
41127
41127
  }
41128
41128
  const higherPriorityPath = keyMapper(changeExtension(file, ext));
@@ -58191,13 +58191,14 @@ function createTypeChecker(host) {
58191
58191
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
58192
58192
  const paramSymbol = createSymbol(
58193
58193
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
58194
- paramName || `arg${i}`
58194
+ paramName || `arg${i}`,
58195
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
58195
58196
  );
58196
58197
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
58197
58198
  params[i] = paramSymbol;
58198
58199
  }
58199
58200
  if (needsExtraRestElement) {
58200
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
58201
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
58201
58202
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
58202
58203
  if (shorter === right) {
58203
58204
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -69147,7 +69148,7 @@ function createTypeChecker(host) {
69147
69148
  function hasMatchingArgument(expression, reference) {
69148
69149
  if (expression.arguments) {
69149
69150
  for (const argument of expression.arguments) {
69150
- if (isOrContainsMatchingReference(reference, argument)) {
69151
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
69151
69152
  return true;
69152
69153
  }
69153
69154
  }
@@ -70787,7 +70788,7 @@ function createTypeChecker(host) {
70787
70788
  false
70788
70789
  );
70789
70790
  }
70790
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
70791
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
70791
70792
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
70792
70793
  }
70793
70794
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -78674,11 +78675,7 @@ function createTypeChecker(host) {
78674
78675
  error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
78675
78676
  }
78676
78677
  checkNaNEquality(errorNode, operator, left, right);
78677
- if (isUnitType(leftType) && isUnitType(rightType) && isTypeIdenticalTo(leftType, rightType)) {
78678
- error2(errorNode, Diagnostics.This_condition_will_always_return_0, operator === 37 /* EqualsEqualsEqualsToken */ || operator === 35 /* EqualsEqualsToken */ ? "true" : "false");
78679
- } else {
78680
- reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
78681
- }
78678
+ reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
78682
78679
  }
78683
78680
  return booleanType;
78684
78681
  case 104 /* InstanceOfKeyword */:
@@ -86660,11 +86657,11 @@ function createTypeChecker(host) {
86660
86657
  if (fileToDirective.has(file.path))
86661
86658
  return;
86662
86659
  fileToDirective.set(file.path, [key, mode]);
86663
- for (const { fileName, resolutionMode } of file.referencedFiles) {
86660
+ for (const { fileName } of file.referencedFiles) {
86664
86661
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
86665
86662
  const referencedFile = host.getSourceFile(resolvedFile);
86666
86663
  if (referencedFile) {
86667
- addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
86664
+ addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
86668
86665
  }
86669
86666
  }
86670
86667
  }
@@ -119373,7 +119370,8 @@ function isIgnoredFileFromWildCardWatching({
119373
119370
  currentDirectory,
119374
119371
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
119375
119372
  writeLog,
119376
- toPath: toPath3
119373
+ toPath: toPath3,
119374
+ getScriptKind: getScriptKind2
119377
119375
  }) {
119378
119376
  const newPath = removeIgnoredPath(fileOrDirectoryPath);
119379
119377
  if (!newPath) {
@@ -119383,7 +119381,7 @@ function isIgnoredFileFromWildCardWatching({
119383
119381
  fileOrDirectoryPath = newPath;
119384
119382
  if (fileOrDirectoryPath === watchedDirPath)
119385
119383
  return false;
119386
- if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
119384
+ if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
119387
119385
  writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
119388
119386
  return true;
119389
119387
  }
@@ -119412,6 +119410,25 @@ function isIgnoredFileFromWildCardWatching({
119412
119410
  function hasSourceFile(file) {
119413
119411
  return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
119414
119412
  }
119413
+ function isSupportedScriptKind() {
119414
+ if (!getScriptKind2)
119415
+ return false;
119416
+ const scriptKind = getScriptKind2(fileOrDirectory);
119417
+ switch (scriptKind) {
119418
+ case 3 /* TS */:
119419
+ case 4 /* TSX */:
119420
+ case 7 /* Deferred */:
119421
+ case 5 /* External */:
119422
+ return true;
119423
+ case 1 /* JS */:
119424
+ case 2 /* JSX */:
119425
+ return getAllowJSCompilerOption(options);
119426
+ case 6 /* JSON */:
119427
+ return getResolveJsonModule(options);
119428
+ case 0 /* Unknown */:
119429
+ return false;
119430
+ }
119431
+ }
119415
119432
  }
119416
119433
  function isBuilderProgram(program) {
119417
119434
  return !!program.getState;
@@ -133307,7 +133324,7 @@ function createCacheableExportInfoMap(host) {
133307
133324
  }
133308
133325
  };
133309
133326
  if (Debug.isDebugging) {
133310
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
133327
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
133311
133328
  }
133312
133329
  return cache;
133313
133330
  function rehydrateCachedInfo(info) {
@@ -133345,11 +133362,15 @@ function createCacheableExportInfoMap(host) {
133345
133362
  }
133346
133363
  function key(importedName, symbol, ambientModuleName, checker) {
133347
133364
  const moduleKey = ambientModuleName || "";
133348
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
133365
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
133349
133366
  }
133350
133367
  function parseKey(key2) {
133351
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
133352
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
133368
+ const firstSpace = key2.indexOf(" ");
133369
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
133370
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
133371
+ const data = key2.substring(secondSpace + 1);
133372
+ const symbolName2 = data.substring(0, symbolNameLength);
133373
+ const moduleKey = data.substring(symbolNameLength + 1);
133353
133374
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
133354
133375
  return { symbolName: symbolName2, ambientModuleName };
133355
133376
  }
@@ -169698,7 +169719,7 @@ function getAllRules() {
169698
169719
  // insert space after '?' only when it is used in conditional operator
169699
169720
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
169700
169721
  // in other cases there should be no space between '?' and next token
169701
- rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169722
+ rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),
169702
169723
  rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),
169703
169724
  rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169704
169725
  rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),
@@ -170043,6 +170064,12 @@ function isTypeAnnotationContext(context) {
170043
170064
  const contextKind = context.contextNode.kind;
170044
170065
  return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);
170045
170066
  }
170067
+ function isOptionalPropertyContext(context) {
170068
+ return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;
170069
+ }
170070
+ function isNonOptionalPropertyContext(context) {
170071
+ return !isOptionalPropertyContext(context);
170072
+ }
170046
170073
  function isConditionalOperatorContext(context) {
170047
170074
  return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;
170048
170075
  }
@@ -176190,7 +176217,7 @@ var Project3 = class _Project {
176190
176217
  return scriptInfo;
176191
176218
  }
176192
176219
  getScriptKind(fileName) {
176193
- const info = this.getOrCreateScriptInfoAndAttachToProject(fileName);
176220
+ const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));
176194
176221
  return info && info.scriptKind;
176195
176222
  }
176196
176223
  getScriptVersion(filename) {
@@ -179007,7 +179034,8 @@ var _ProjectService = class _ProjectService {
179007
179034
  program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
179008
179035
  useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
179009
179036
  writeLog: (s) => this.logger.info(s),
179010
- toPath: (s) => this.toPath(s)
179037
+ toPath: (s) => this.toPath(s),
179038
+ getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0
179011
179039
  }))
179012
179040
  return;
179013
179041
  if (config.reloadLevel !== 2 /* Full */)
@@ -11040,7 +11040,7 @@ declare namespace ts {
11040
11040
  * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default.
11041
11041
  */
11042
11042
  exportName: string;
11043
- exportMapKey?: string;
11043
+ exportMapKey?: ExportMapInfoKey;
11044
11044
  moduleSpecifier?: string;
11045
11045
  /** The file name declaring the export's module symbol, if it was an external module */
11046
11046
  fileName?: string;
@@ -11050,7 +11050,7 @@ declare namespace ts {
11050
11050
  isPackageJsonImport?: true;
11051
11051
  }
11052
11052
  interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport {
11053
- exportMapKey: string;
11053
+ exportMapKey: ExportMapInfoKey;
11054
11054
  }
11055
11055
  interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport {
11056
11056
  moduleSpecifier: string;
@@ -11365,6 +11365,9 @@ declare namespace ts {
11365
11365
  span: TextSpan;
11366
11366
  preferences: UserPreferences;
11367
11367
  }
11368
+ type ExportMapInfoKey = string & {
11369
+ __exportInfoKey: void;
11370
+ };
11368
11371
  /** The classifier is used for syntactic highlighting in editors via the TSServer */
11369
11372
  function createClassifier(): Classifier;
11370
11373
  interface DocumentHighlights {
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.20230912`;
38
+ version = `${versionMajorMinor}.0-insiders.20230913`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -37443,7 +37443,7 @@ ${lanes.join("\n")}
37443
37443
  return false;
37444
37444
  }
37445
37445
  for (const ext of extensionGroup) {
37446
- if (fileExtensionIs(file, ext)) {
37446
+ if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) {
37447
37447
  return false;
37448
37448
  }
37449
37449
  const higherPriorityPath = keyMapper(changeExtension(file, ext));
@@ -55958,13 +55958,14 @@ ${lanes.join("\n")}
55958
55958
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
55959
55959
  const paramSymbol = createSymbol(
55960
55960
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
55961
- paramName || `arg${i}`
55961
+ paramName || `arg${i}`,
55962
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
55962
55963
  );
55963
55964
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
55964
55965
  params[i] = paramSymbol;
55965
55966
  }
55966
55967
  if (needsExtraRestElement) {
55967
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
55968
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
55968
55969
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
55969
55970
  if (shorter === right) {
55970
55971
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -66914,7 +66915,7 @@ ${lanes.join("\n")}
66914
66915
  function hasMatchingArgument(expression, reference) {
66915
66916
  if (expression.arguments) {
66916
66917
  for (const argument of expression.arguments) {
66917
- if (isOrContainsMatchingReference(reference, argument)) {
66918
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
66918
66919
  return true;
66919
66920
  }
66920
66921
  }
@@ -68554,7 +68555,7 @@ ${lanes.join("\n")}
68554
68555
  false
68555
68556
  );
68556
68557
  }
68557
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
68558
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
68558
68559
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
68559
68560
  }
68560
68561
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -76441,11 +76442,7 @@ ${lanes.join("\n")}
76441
76442
  error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
76442
76443
  }
76443
76444
  checkNaNEquality(errorNode, operator, left, right);
76444
- if (isUnitType(leftType) && isUnitType(rightType) && isTypeIdenticalTo(leftType, rightType)) {
76445
- error2(errorNode, Diagnostics.This_condition_will_always_return_0, operator === 37 /* EqualsEqualsEqualsToken */ || operator === 35 /* EqualsEqualsToken */ ? "true" : "false");
76446
- } else {
76447
- reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
76448
- }
76445
+ reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2));
76449
76446
  }
76450
76447
  return booleanType;
76451
76448
  case 104 /* InstanceOfKeyword */:
@@ -84427,11 +84424,11 @@ ${lanes.join("\n")}
84427
84424
  if (fileToDirective.has(file.path))
84428
84425
  return;
84429
84426
  fileToDirective.set(file.path, [key, mode]);
84430
- for (const { fileName, resolutionMode } of file.referencedFiles) {
84427
+ for (const { fileName } of file.referencedFiles) {
84431
84428
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
84432
84429
  const referencedFile = host.getSourceFile(resolvedFile);
84433
84430
  if (referencedFile) {
84434
- addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
84431
+ addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
84435
84432
  }
84436
84433
  }
84437
84434
  }
@@ -117470,7 +117467,8 @@ ${lanes.join("\n")}
117470
117467
  currentDirectory,
117471
117468
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
117472
117469
  writeLog,
117473
- toPath: toPath3
117470
+ toPath: toPath3,
117471
+ getScriptKind: getScriptKind2
117474
117472
  }) {
117475
117473
  const newPath = removeIgnoredPath(fileOrDirectoryPath);
117476
117474
  if (!newPath) {
@@ -117480,7 +117478,7 @@ ${lanes.join("\n")}
117480
117478
  fileOrDirectoryPath = newPath;
117481
117479
  if (fileOrDirectoryPath === watchedDirPath)
117482
117480
  return false;
117483
- if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
117481
+ if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) {
117484
117482
  writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`);
117485
117483
  return true;
117486
117484
  }
@@ -117509,6 +117507,25 @@ ${lanes.join("\n")}
117509
117507
  function hasSourceFile(file) {
117510
117508
  return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file);
117511
117509
  }
117510
+ function isSupportedScriptKind() {
117511
+ if (!getScriptKind2)
117512
+ return false;
117513
+ const scriptKind = getScriptKind2(fileOrDirectory);
117514
+ switch (scriptKind) {
117515
+ case 3 /* TS */:
117516
+ case 4 /* TSX */:
117517
+ case 7 /* Deferred */:
117518
+ case 5 /* External */:
117519
+ return true;
117520
+ case 1 /* JS */:
117521
+ case 2 /* JSX */:
117522
+ return getAllowJSCompilerOption(options);
117523
+ case 6 /* JSON */:
117524
+ return getResolveJsonModule(options);
117525
+ case 0 /* Unknown */:
117526
+ return false;
117527
+ }
117528
+ }
117512
117529
  }
117513
117530
  function isBuilderProgram(program) {
117514
117531
  return !!program.getState;
@@ -131608,7 +131625,7 @@ ${lanes.join("\n")}
131608
131625
  }
131609
131626
  };
131610
131627
  if (Debug.isDebugging) {
131611
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
131628
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
131612
131629
  }
131613
131630
  return cache;
131614
131631
  function rehydrateCachedInfo(info) {
@@ -131646,11 +131663,15 @@ ${lanes.join("\n")}
131646
131663
  }
131647
131664
  function key(importedName, symbol, ambientModuleName, checker) {
131648
131665
  const moduleKey = ambientModuleName || "";
131649
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
131666
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
131650
131667
  }
131651
131668
  function parseKey(key2) {
131652
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
131653
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
131669
+ const firstSpace = key2.indexOf(" ");
131670
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
131671
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
131672
+ const data = key2.substring(secondSpace + 1);
131673
+ const symbolName2 = data.substring(0, symbolNameLength);
131674
+ const moduleKey = data.substring(symbolNameLength + 1);
131654
131675
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
131655
131676
  return { symbolName: symbolName2, ambientModuleName };
131656
131677
  }
@@ -169170,7 +169191,7 @@ ${options.prefix}` : "\n" : options.prefix
169170
169191
  // insert space after '?' only when it is used in conditional operator
169171
169192
  rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */),
169172
169193
  // in other cases there should be no space between '?' and next token
169173
- rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169194
+ rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */),
169174
169195
  rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */),
169175
169196
  rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
169176
169197
  rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */),
@@ -169515,6 +169536,12 @@ ${options.prefix}` : "\n" : options.prefix
169515
169536
  const contextKind = context.contextNode.kind;
169516
169537
  return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind);
169517
169538
  }
169539
+ function isOptionalPropertyContext(context) {
169540
+ return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken;
169541
+ }
169542
+ function isNonOptionalPropertyContext(context) {
169543
+ return !isOptionalPropertyContext(context);
169544
+ }
169518
169545
  function isConditionalOperatorContext(context) {
169519
169546
  return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */;
169520
169547
  }
@@ -173532,7 +173559,7 @@ ${options.prefix}` : "\n" : options.prefix
173532
173559
  return scriptInfo;
173533
173560
  }
173534
173561
  getScriptKind(fileName) {
173535
- const info = this.getOrCreateScriptInfoAndAttachToProject(fileName);
173562
+ const info = this.projectService.getScriptInfoForPath(this.toPath(fileName));
173536
173563
  return info && info.scriptKind;
173537
173564
  }
173538
173565
  getScriptVersion(filename) {
@@ -176353,7 +176380,8 @@ ${options.prefix}` : "\n" : options.prefix
176353
176380
  program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
176354
176381
  useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
176355
176382
  writeLog: (s) => this.logger.info(s),
176356
- toPath: (s) => this.toPath(s)
176383
+ toPath: (s) => this.toPath(s),
176384
+ getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0
176357
176385
  }))
176358
176386
  return;
176359
176387
  if (config.reloadLevel !== 2 /* Full */)
@@ -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.20230912`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230913`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
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-55718-6",
5
+ "version": "5.3.0-pr-55727-5",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "3746c7e4e22e0b0b56c18c3463f73aef5e0faa52"
116
+ "gitHead": "0166f0aec71c4c4395daae79d37217259c5952fd"
117
117
  }