@typescript-deploys/pr-build 5.3.0-pr-55926-3 → 5.3.0-pr-55943-2

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.20230930`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231004`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -14270,6 +14270,7 @@ function getPropertyNameForPropertyNameNode(name) {
14270
14270
  case 81 /* PrivateIdentifier */:
14271
14271
  return name.escapedText;
14272
14272
  case 11 /* StringLiteral */:
14273
+ case 15 /* NoSubstitutionTemplateLiteral */:
14273
14274
  case 9 /* NumericLiteral */:
14274
14275
  return escapeLeadingUnderscores(name.text);
14275
14276
  case 167 /* ComputedPropertyName */:
@@ -42360,10 +42361,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo
42360
42361
  importingSourceFile,
42361
42362
  host,
42362
42363
  userPreferences,
42363
- options
42364
+ options,
42365
+ /*forAutoImport*/
42366
+ false
42364
42367
  ).moduleSpecifiers;
42365
42368
  }
42366
- function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
42369
+ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
42367
42370
  let computedWithoutCache = false;
42368
42371
  const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
42369
42372
  if (ambient)
@@ -42381,11 +42384,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions
42381
42384
  return { moduleSpecifiers: emptyArray, computedWithoutCache };
42382
42385
  computedWithoutCache = true;
42383
42386
  modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
42384
- const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
42387
+ const result = computeModuleSpecifiers(
42388
+ modulePaths,
42389
+ compilerOptions,
42390
+ importingSourceFile,
42391
+ host,
42392
+ userPreferences,
42393
+ options,
42394
+ forAutoImport
42395
+ );
42385
42396
  cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
42386
42397
  return { moduleSpecifiers: result, computedWithoutCache };
42387
42398
  }
42388
- function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
42399
+ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
42389
42400
  const info = getInfo(importingSourceFile.path, host);
42390
42401
  const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
42391
42402
  const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
@@ -42442,7 +42453,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
42442
42453
  redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
42443
42454
  } else if (pathIsBareSpecifier(local)) {
42444
42455
  pathsSpecifiers = append(pathsSpecifiers, local);
42445
- } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
42456
+ } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
42446
42457
  relativeSpecifiers = append(relativeSpecifiers, local);
42447
42458
  }
42448
42459
  }
@@ -52235,9 +52246,6 @@ function createTypeChecker(host) {
52235
52246
  if (reportErrors2) {
52236
52247
  reportErrorsFromWidening(declaration, type);
52237
52248
  }
52238
- if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
52239
- type = esSymbolType;
52240
- }
52241
52249
  return getWidenedType(type);
52242
52250
  }
52243
52251
  type = isParameter(declaration) && declaration.dotDotDotToken ? anyArrayType : anyType;
@@ -66357,9 +66365,6 @@ function createTypeChecker(host) {
66357
66365
  if (type.flags & 3 /* AnyOrUnknown */) {
66358
66366
  return candidate;
66359
66367
  }
66360
- if (isTypeIdenticalTo(type, candidate)) {
66361
- return candidate;
66362
- }
66363
66368
  const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
66364
66369
  const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
66365
66370
  const narrowedType = mapType(candidate, (c) => {
@@ -68823,7 +68828,7 @@ function createTypeChecker(host) {
68823
68828
  }
68824
68829
  }
68825
68830
  const parent = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
68826
- if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
68831
+ if (parent && parent.openingElement === openingLikeElement && getSemanticJsxChildren(parent.children).length > 0) {
68827
68832
  const childrenTypes = checkJsxChildren(parent, checkMode);
68828
68833
  if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
68829
68834
  if (explicitlySpecifyChildrenAttribute) {
@@ -70446,9 +70451,11 @@ function createTypeChecker(host) {
70446
70451
  }
70447
70452
  if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
70448
70453
  names.push(arg.tupleNameSource);
70454
+ } else {
70455
+ names.push(void 0);
70449
70456
  }
70450
70457
  }
70451
- return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
70458
+ return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
70452
70459
  }
70453
70460
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
70454
70461
  const isJavascript = isInJSFile(signature.declaration);
@@ -72583,12 +72590,9 @@ function createTypeChecker(host) {
72583
72590
  types.push(restType);
72584
72591
  flags.push(8 /* Variadic */);
72585
72592
  }
72586
- const name = getNameableDeclarationAtPosition(source, i);
72587
- if (name) {
72588
- names.push(name);
72589
- }
72593
+ names.push(getNameableDeclarationAtPosition(source, i));
72590
72594
  }
72591
- return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
72595
+ return createTupleType(types, flags, readonly, names);
72592
72596
  }
72593
72597
  function getParameterCount(signature) {
72594
72598
  const length2 = signature.parameters.length;
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.20230930`;
2331
+ var version = `${versionMajorMinor}.0-insiders.20231004`;
2332
2332
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2333
2333
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2334
2334
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -18197,6 +18197,7 @@ function getPropertyNameForPropertyNameNode(name) {
18197
18197
  case 81 /* PrivateIdentifier */:
18198
18198
  return name.escapedText;
18199
18199
  case 11 /* StringLiteral */:
18200
+ case 15 /* NoSubstitutionTemplateLiteral */:
18200
18201
  case 9 /* NumericLiteral */:
18201
18202
  return escapeLeadingUnderscores(name.text);
18202
18203
  case 167 /* ComputedPropertyName */:
@@ -47072,10 +47073,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo
47072
47073
  importingSourceFile,
47073
47074
  host,
47074
47075
  userPreferences,
47075
- options
47076
+ options,
47077
+ /*forAutoImport*/
47078
+ false
47076
47079
  ).moduleSpecifiers;
47077
47080
  }
47078
- function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
47081
+ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
47079
47082
  let computedWithoutCache = false;
47080
47083
  const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
47081
47084
  if (ambient)
@@ -47093,11 +47096,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions
47093
47096
  return { moduleSpecifiers: emptyArray, computedWithoutCache };
47094
47097
  computedWithoutCache = true;
47095
47098
  modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
47096
- const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
47099
+ const result = computeModuleSpecifiers(
47100
+ modulePaths,
47101
+ compilerOptions,
47102
+ importingSourceFile,
47103
+ host,
47104
+ userPreferences,
47105
+ options,
47106
+ forAutoImport
47107
+ );
47097
47108
  cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
47098
47109
  return { moduleSpecifiers: result, computedWithoutCache };
47099
47110
  }
47100
- function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
47111
+ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
47101
47112
  const info = getInfo(importingSourceFile.path, host);
47102
47113
  const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
47103
47114
  const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
@@ -47154,7 +47165,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
47154
47165
  redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
47155
47166
  } else if (pathIsBareSpecifier(local)) {
47156
47167
  pathsSpecifiers = append(pathsSpecifiers, local);
47157
- } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
47168
+ } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
47158
47169
  relativeSpecifiers = append(relativeSpecifiers, local);
47159
47170
  }
47160
47171
  }
@@ -56947,9 +56958,6 @@ function createTypeChecker(host) {
56947
56958
  if (reportErrors2) {
56948
56959
  reportErrorsFromWidening(declaration, type);
56949
56960
  }
56950
- if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
56951
- type = esSymbolType;
56952
- }
56953
56961
  return getWidenedType(type);
56954
56962
  }
56955
56963
  type = isParameter(declaration) && declaration.dotDotDotToken ? anyArrayType : anyType;
@@ -71069,9 +71077,6 @@ function createTypeChecker(host) {
71069
71077
  if (type.flags & 3 /* AnyOrUnknown */) {
71070
71078
  return candidate;
71071
71079
  }
71072
- if (isTypeIdenticalTo(type, candidate)) {
71073
- return candidate;
71074
- }
71075
71080
  const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
71076
71081
  const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
71077
71082
  const narrowedType = mapType(candidate, (c) => {
@@ -73535,7 +73540,7 @@ function createTypeChecker(host) {
73535
73540
  }
73536
73541
  }
73537
73542
  const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
73538
- if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) {
73543
+ if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) {
73539
73544
  const childrenTypes = checkJsxChildren(parent2, checkMode);
73540
73545
  if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
73541
73546
  if (explicitlySpecifyChildrenAttribute) {
@@ -75158,9 +75163,11 @@ function createTypeChecker(host) {
75158
75163
  }
75159
75164
  if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
75160
75165
  names.push(arg.tupleNameSource);
75166
+ } else {
75167
+ names.push(void 0);
75161
75168
  }
75162
75169
  }
75163
- return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
75170
+ return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
75164
75171
  }
75165
75172
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
75166
75173
  const isJavascript = isInJSFile(signature.declaration);
@@ -77295,12 +77302,9 @@ function createTypeChecker(host) {
77295
77302
  types.push(restType);
77296
77303
  flags.push(8 /* Variadic */);
77297
77304
  }
77298
- const name = getNameableDeclarationAtPosition(source, i);
77299
- if (name) {
77300
- names.push(name);
77301
- }
77305
+ names.push(getNameableDeclarationAtPosition(source, i));
77302
77306
  }
77303
- return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
77307
+ return createTupleType(types, flags, readonly, names);
77304
77308
  }
77305
77309
  function getParameterCount(signature) {
77306
77310
  const length2 = signature.parameters.length;
@@ -143084,7 +143088,7 @@ function doChange7(sourceFile, changes, declaration, typeNode) {
143084
143088
  function getInfo4(context) {
143085
143089
  if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind))
143086
143090
  return;
143087
- const token = getTokenAtPosition(context.file, context.startPosition);
143091
+ const token = getTouchingPropertyName(context.file, context.startPosition);
143088
143092
  const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n));
143089
143093
  if (!declaration || !declaration.body || declaration.type) {
143090
143094
  return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) };
@@ -150094,7 +150098,18 @@ function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUs
150094
150098
  const getChecker = createGetChecker(program, host);
150095
150099
  const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
150096
150100
  const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution);
150097
- const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences);
150101
+ const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
150102
+ moduleSymbol,
150103
+ checker,
150104
+ compilerOptions,
150105
+ sourceFile,
150106
+ moduleSpecifierResolutionHost,
150107
+ preferences,
150108
+ /*options*/
150109
+ void 0,
150110
+ /*forAutoImport*/
150111
+ true
150112
+ );
150098
150113
  let computedWithoutCacheCount = 0;
150099
150114
  const fixes = flatMap(exportInfo, (exportInfo2, i) => {
150100
150115
  const checker = getChecker(exportInfo2.isFromPackageJson);
@@ -158306,7 +158321,7 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId,
158306
158321
  return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */);
158307
158322
  }
158308
158323
  case "cases": {
158309
- const { entry, importAdder } = getExhaustiveCaseSnippets(
158324
+ const snippets = getExhaustiveCaseSnippets(
158310
158325
  contextToken.parent,
158311
158326
  sourceFile,
158312
158327
  preferences,
@@ -158316,7 +158331,8 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId,
158316
158331
  /*formatContext*/
158317
158332
  void 0
158318
158333
  );
158319
- if (importAdder.hasFixes()) {
158334
+ if (snippets == null ? void 0 : snippets.importAdder.hasFixes()) {
158335
+ const { entry, importAdder } = snippets;
158320
158336
  const changes = ts_textChanges_exports.ChangeTracker.with(
158321
158337
  { host, formatContext, preferences },
158322
158338
  importAdder.writeFixes
@@ -158334,7 +158350,7 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId,
158334
158350
  };
158335
158351
  }
158336
158352
  return {
158337
- name: entry.name,
158353
+ name,
158338
158354
  kind: "" /* unknown */,
158339
158355
  kindModifiers: "",
158340
158356
  displayParts: [],
@@ -164286,6 +164302,7 @@ function provideInlayHints(context) {
164286
164302
  const { file, program, span, cancellationToken, preferences } = context;
164287
164303
  const sourceFileText = file.text;
164288
164304
  const compilerOptions = program.getCompilerOptions();
164305
+ const quotePreference = getQuotePreference(file, preferences);
164289
164306
  const checker = program.getTypeChecker();
164290
164307
  const result = [];
164291
164308
  visitor(file);
@@ -164593,6 +164610,10 @@ function provideInlayHints(context) {
164593
164610
  parts.push({ text: tokenString });
164594
164611
  return;
164595
164612
  }
164613
+ if (isLiteralExpression(node)) {
164614
+ parts.push({ text: getLiteralText2(node) });
164615
+ return;
164616
+ }
164596
164617
  switch (node.kind) {
164597
164618
  case 80 /* Identifier */:
164598
164619
  const identifier = node;
@@ -164604,12 +164625,6 @@ function provideInlayHints(context) {
164604
164625
  parts.push({ text: identifierText });
164605
164626
  }
164606
164627
  break;
164607
- case 9 /* NumericLiteral */:
164608
- parts.push({ text: node.text });
164609
- break;
164610
- case 11 /* StringLiteral */:
164611
- parts.push({ text: `"${node.text}"` });
164612
- break;
164613
164628
  case 166 /* QualifiedName */:
164614
164629
  const qualifiedName = node;
164615
164630
  visitForDisplayParts(qualifiedName.left);
@@ -164865,6 +164880,12 @@ function provideInlayHints(context) {
164865
164880
  visitForDisplayParts(node);
164866
164881
  });
164867
164882
  }
164883
+ function getLiteralText2(node) {
164884
+ if (isStringLiteral(node)) {
164885
+ return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
164886
+ }
164887
+ return node.text;
164888
+ }
164868
164889
  }
164869
164890
  function isUndefined(name) {
164870
164891
  return name === "undefined";
@@ -4976,7 +4976,7 @@ declare namespace ts {
4976
4976
  readonly right: Identifier;
4977
4977
  }
4978
4978
  type EntityName = Identifier | QualifiedName;
4979
- type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
4979
+ type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
4980
4980
  type MemberName = Identifier | PrivateIdentifier;
4981
4981
  type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression;
4982
4982
  interface Declaration extends Node {
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.20230930`;
38
+ version = `${versionMajorMinor}.0-insiders.20231004`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -15566,6 +15566,7 @@ ${lanes.join("\n")}
15566
15566
  case 81 /* PrivateIdentifier */:
15567
15567
  return name.escapedText;
15568
15568
  case 11 /* StringLiteral */:
15569
+ case 15 /* NoSubstitutionTemplateLiteral */:
15569
15570
  case 9 /* NumericLiteral */:
15570
15571
  return escapeLeadingUnderscores(name.text);
15571
15572
  case 167 /* ComputedPropertyName */:
@@ -44937,10 +44938,12 @@ ${lanes.join("\n")}
44937
44938
  importingSourceFile,
44938
44939
  host,
44939
44940
  userPreferences,
44940
- options
44941
+ options,
44942
+ /*forAutoImport*/
44943
+ false
44941
44944
  ).moduleSpecifiers;
44942
44945
  }
44943
- function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
44946
+ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
44944
44947
  let computedWithoutCache = false;
44945
44948
  const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
44946
44949
  if (ambient)
@@ -44958,11 +44961,19 @@ ${lanes.join("\n")}
44958
44961
  return { moduleSpecifiers: emptyArray, computedWithoutCache };
44959
44962
  computedWithoutCache = true;
44960
44963
  modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
44961
- const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options);
44964
+ const result = computeModuleSpecifiers(
44965
+ modulePaths,
44966
+ compilerOptions,
44967
+ importingSourceFile,
44968
+ host,
44969
+ userPreferences,
44970
+ options,
44971
+ forAutoImport
44972
+ );
44962
44973
  cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result);
44963
44974
  return { moduleSpecifiers: result, computedWithoutCache };
44964
44975
  }
44965
- function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) {
44976
+ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
44966
44977
  const info = getInfo(importingSourceFile.path, host);
44967
44978
  const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
44968
44979
  const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
@@ -45019,7 +45030,7 @@ ${lanes.join("\n")}
45019
45030
  redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
45020
45031
  } else if (pathIsBareSpecifier(local)) {
45021
45032
  pathsSpecifiers = append(pathsSpecifiers, local);
45022
- } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
45033
+ } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
45023
45034
  relativeSpecifiers = append(relativeSpecifiers, local);
45024
45035
  }
45025
45036
  }
@@ -54714,9 +54725,6 @@ ${lanes.join("\n")}
54714
54725
  if (reportErrors2) {
54715
54726
  reportErrorsFromWidening(declaration, type);
54716
54727
  }
54717
- if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) {
54718
- type = esSymbolType;
54719
- }
54720
54728
  return getWidenedType(type);
54721
54729
  }
54722
54730
  type = isParameter(declaration) && declaration.dotDotDotToken ? anyArrayType : anyType;
@@ -68836,9 +68844,6 @@ ${lanes.join("\n")}
68836
68844
  if (type.flags & 3 /* AnyOrUnknown */) {
68837
68845
  return candidate;
68838
68846
  }
68839
- if (isTypeIdenticalTo(type, candidate)) {
68840
- return candidate;
68841
- }
68842
68847
  const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
68843
68848
  const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
68844
68849
  const narrowedType = mapType(candidate, (c) => {
@@ -71302,7 +71307,7 @@ ${lanes.join("\n")}
71302
71307
  }
71303
71308
  }
71304
71309
  const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0;
71305
- if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) {
71310
+ if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) {
71306
71311
  const childrenTypes = checkJsxChildren(parent2, checkMode);
71307
71312
  if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
71308
71313
  if (explicitlySpecifyChildrenAttribute) {
@@ -72925,9 +72930,11 @@ ${lanes.join("\n")}
72925
72930
  }
72926
72931
  if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) {
72927
72932
  names.push(arg.tupleNameSource);
72933
+ } else {
72934
+ names.push(void 0);
72928
72935
  }
72929
72936
  }
72930
- return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
72937
+ return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names);
72931
72938
  }
72932
72939
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
72933
72940
  const isJavascript = isInJSFile(signature.declaration);
@@ -75062,12 +75069,9 @@ ${lanes.join("\n")}
75062
75069
  types.push(restType);
75063
75070
  flags.push(8 /* Variadic */);
75064
75071
  }
75065
- const name = getNameableDeclarationAtPosition(source, i);
75066
- if (name) {
75067
- names.push(name);
75068
- }
75072
+ names.push(getNameableDeclarationAtPosition(source, i));
75069
75073
  }
75070
- return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
75074
+ return createTupleType(types, flags, readonly, names);
75071
75075
  }
75072
75076
  function getParameterCount(signature) {
75073
75077
  const length2 = signature.parameters.length;
@@ -141600,7 +141604,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141600
141604
  function getInfo4(context) {
141601
141605
  if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind))
141602
141606
  return;
141603
- const token = getTokenAtPosition(context.file, context.startPosition);
141607
+ const token = getTouchingPropertyName(context.file, context.startPosition);
141604
141608
  const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n));
141605
141609
  if (!declaration || !declaration.body || declaration.type) {
141606
141610
  return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) };
@@ -148814,7 +148818,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148814
148818
  const getChecker = createGetChecker(program, host);
148815
148819
  const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
148816
148820
  const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution);
148817
- const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences);
148821
+ const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(
148822
+ moduleSymbol,
148823
+ checker,
148824
+ compilerOptions,
148825
+ sourceFile,
148826
+ moduleSpecifierResolutionHost,
148827
+ preferences,
148828
+ /*options*/
148829
+ void 0,
148830
+ /*forAutoImport*/
148831
+ true
148832
+ );
148818
148833
  let computedWithoutCacheCount = 0;
148819
148834
  const fixes = flatMap(exportInfo, (exportInfo2, i) => {
148820
148835
  const checker = getChecker(exportInfo2.isFromPackageJson);
@@ -157530,7 +157545,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157530
157545
  return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */);
157531
157546
  }
157532
157547
  case "cases": {
157533
- const { entry, importAdder } = getExhaustiveCaseSnippets(
157548
+ const snippets = getExhaustiveCaseSnippets(
157534
157549
  contextToken.parent,
157535
157550
  sourceFile,
157536
157551
  preferences,
@@ -157540,7 +157555,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157540
157555
  /*formatContext*/
157541
157556
  void 0
157542
157557
  );
157543
- if (importAdder.hasFixes()) {
157558
+ if (snippets == null ? void 0 : snippets.importAdder.hasFixes()) {
157559
+ const { entry, importAdder } = snippets;
157544
157560
  const changes = ts_textChanges_exports.ChangeTracker.with(
157545
157561
  { host, formatContext, preferences },
157546
157562
  importAdder.writeFixes
@@ -157558,7 +157574,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157558
157574
  };
157559
157575
  }
157560
157576
  return {
157561
- name: entry.name,
157577
+ name,
157562
157578
  kind: "" /* unknown */,
157563
157579
  kindModifiers: "",
157564
157580
  displayParts: [],
@@ -163631,6 +163647,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
163631
163647
  const { file, program, span, cancellationToken, preferences } = context;
163632
163648
  const sourceFileText = file.text;
163633
163649
  const compilerOptions = program.getCompilerOptions();
163650
+ const quotePreference = getQuotePreference(file, preferences);
163634
163651
  const checker = program.getTypeChecker();
163635
163652
  const result = [];
163636
163653
  visitor(file);
@@ -163938,6 +163955,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
163938
163955
  parts.push({ text: tokenString });
163939
163956
  return;
163940
163957
  }
163958
+ if (isLiteralExpression(node)) {
163959
+ parts.push({ text: getLiteralText2(node) });
163960
+ return;
163961
+ }
163941
163962
  switch (node.kind) {
163942
163963
  case 80 /* Identifier */:
163943
163964
  const identifier = node;
@@ -163949,12 +163970,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
163949
163970
  parts.push({ text: identifierText });
163950
163971
  }
163951
163972
  break;
163952
- case 9 /* NumericLiteral */:
163953
- parts.push({ text: node.text });
163954
- break;
163955
- case 11 /* StringLiteral */:
163956
- parts.push({ text: `"${node.text}"` });
163957
- break;
163958
163973
  case 166 /* QualifiedName */:
163959
163974
  const qualifiedName = node;
163960
163975
  visitForDisplayParts(qualifiedName.left);
@@ -164210,6 +164225,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164210
164225
  visitForDisplayParts(node);
164211
164226
  });
164212
164227
  }
164228
+ function getLiteralText2(node) {
164229
+ if (isStringLiteral(node)) {
164230
+ return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
164231
+ }
164232
+ return node.text;
164233
+ }
164213
164234
  }
164214
164235
  function isUndefined(name) {
164215
164236
  return name === "undefined";
@@ -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.20230930`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231004`;
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-55926-3",
5
+ "version": "5.3.0-pr-55943-2",
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": "0aae977155b035922037ff0c16e828184a47f8c9"
117
+ "gitHead": "8205dde71f0b85f0eb2c7e1de4c7533999e92e49"
118
118
  }