@typescript-deploys/pr-build 5.2.0-pr-54647-2 → 5.2.0-pr-54477-10

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.2";
21
- var version = `${versionMajorMinor}.0-insiders.20230616`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230619`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -2315,7 +2315,7 @@ var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
2315
2315
  var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
2316
2316
  var buildPartRegExp = /^[a-z0-9-]+$/i;
2317
2317
  var numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
2318
- var _Version = class {
2318
+ var _Version = class _Version {
2319
2319
  constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") {
2320
2320
  if (typeof major === "string") {
2321
2321
  const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
@@ -2379,8 +2379,8 @@ var _Version = class {
2379
2379
  return result;
2380
2380
  }
2381
2381
  };
2382
+ _Version.zero = new _Version(0, 0, 0, ["0"]);
2382
2383
  var Version = _Version;
2383
- Version.zero = new _Version(0, 0, 0, ["0"]);
2384
2384
  function tryParseComponents(text) {
2385
2385
  const match = versionRegExp.exec(text);
2386
2386
  if (!match)
@@ -2427,14 +2427,14 @@ function comparePrereleaseIdentifiers(left, right) {
2427
2427
  }
2428
2428
  return compareValues(left.length, right.length);
2429
2429
  }
2430
- var VersionRange = class {
2430
+ var VersionRange = class _VersionRange {
2431
2431
  constructor(spec) {
2432
2432
  this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray;
2433
2433
  }
2434
2434
  static tryParse(text) {
2435
2435
  const sets = parseRange(text);
2436
2436
  if (sets) {
2437
- const range = new VersionRange("");
2437
+ const range = new _VersionRange("");
2438
2438
  range._alternatives = sets;
2439
2439
  return range;
2440
2440
  }
@@ -7699,7 +7699,7 @@ var Diagnostics = {
7699
7699
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
7700
7700
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
7701
7701
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
7702
- Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
7702
+ Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
7703
7703
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
7704
7704
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
7705
7705
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -74222,16 +74222,19 @@ function createTypeChecker(host) {
74222
74222
  }
74223
74223
  }
74224
74224
  }
74225
- function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
74225
+ function getNonGenericReturnTypeOfSingleCallSignature(funcType) {
74226
74226
  const signature = getSingleCallSignature(funcType);
74227
- if (signature && !signature.typeParameters) {
74228
- return getReturnTypeOfSignature(signature);
74227
+ if (signature) {
74228
+ const returnType = getReturnTypeOfSignature(signature);
74229
+ if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
74230
+ return returnType;
74231
+ }
74229
74232
  }
74230
74233
  }
74231
74234
  function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
74232
74235
  const funcType = checkExpression(expr.expression);
74233
74236
  const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
74234
- const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
74237
+ const returnType = getNonGenericReturnTypeOfSingleCallSignature(funcType);
74235
74238
  return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
74236
74239
  }
74237
74240
  function getTypeOfExpression(node) {
@@ -74276,7 +74279,7 @@ function createTypeChecker(host) {
74276
74279
  /*requireStringLiteralLikeArgument*/
74277
74280
  true
74278
74281
  ) && !isSymbolOrSymbolForCall(expr)) {
74279
- return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
74282
+ return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getNonGenericReturnTypeOfSingleCallSignature(checkNonNullExpression(expr.expression));
74280
74283
  } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
74281
74284
  return getTypeFromTypeNode(expr.type);
74282
74285
  } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
@@ -83358,13 +83361,13 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) {
83358
83361
  readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0
83359
83362
  };
83360
83363
  }
83361
- var SymbolTrackerImpl = class {
83364
+ var SymbolTrackerImpl = class _SymbolTrackerImpl {
83362
83365
  constructor(context, tracker, moduleResolverHost) {
83363
83366
  this.moduleResolverHost = void 0;
83364
83367
  this.inner = void 0;
83365
83368
  this.disableTrackSymbol = false;
83366
83369
  var _a;
83367
- while (tracker instanceof SymbolTrackerImpl) {
83370
+ while (tracker instanceof _SymbolTrackerImpl) {
83368
83371
  tracker = tracker.inner;
83369
83372
  }
83370
83373
  this.inner = tracker;
package/lib/tsserver.js CHANGED
@@ -2305,7 +2305,7 @@ module.exports = __toCommonJS(server_exports);
2305
2305
 
2306
2306
  // src/compiler/corePublic.ts
2307
2307
  var versionMajorMinor = "5.2";
2308
- var version = `${versionMajorMinor}.0-insiders.20230616`;
2308
+ var version = `${versionMajorMinor}.0-insiders.20230619`;
2309
2309
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2310
2310
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2311
2311
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4998,7 +4998,7 @@ var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
4998
4998
  var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
4999
4999
  var buildPartRegExp = /^[a-z0-9-]+$/i;
5000
5000
  var numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
5001
- var _Version = class {
5001
+ var _Version = class _Version {
5002
5002
  constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") {
5003
5003
  if (typeof major === "string") {
5004
5004
  const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
@@ -5062,8 +5062,8 @@ var _Version = class {
5062
5062
  return result;
5063
5063
  }
5064
5064
  };
5065
+ _Version.zero = new _Version(0, 0, 0, ["0"]);
5065
5066
  var Version = _Version;
5066
- Version.zero = new _Version(0, 0, 0, ["0"]);
5067
5067
  function tryParseComponents(text) {
5068
5068
  const match = versionRegExp.exec(text);
5069
5069
  if (!match)
@@ -5110,14 +5110,14 @@ function comparePrereleaseIdentifiers(left, right) {
5110
5110
  }
5111
5111
  return compareValues(left.length, right.length);
5112
5112
  }
5113
- var VersionRange = class {
5113
+ var VersionRange = class _VersionRange {
5114
5114
  constructor(spec) {
5115
5115
  this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray;
5116
5116
  }
5117
5117
  static tryParse(text) {
5118
5118
  const sets = parseRange(text);
5119
5119
  if (sets) {
5120
- const range = new VersionRange("");
5120
+ const range = new _VersionRange("");
5121
5121
  range._alternatives = sets;
5122
5122
  return range;
5123
5123
  }
@@ -11197,7 +11197,7 @@ var Diagnostics = {
11197
11197
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
11198
11198
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
11199
11199
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
11200
- Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
11200
+ Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
11201
11201
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
11202
11202
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
11203
11203
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -78863,16 +78863,19 @@ function createTypeChecker(host) {
78863
78863
  }
78864
78864
  }
78865
78865
  }
78866
- function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
78866
+ function getNonGenericReturnTypeOfSingleCallSignature(funcType) {
78867
78867
  const signature = getSingleCallSignature(funcType);
78868
- if (signature && !signature.typeParameters) {
78869
- return getReturnTypeOfSignature(signature);
78868
+ if (signature) {
78869
+ const returnType = getReturnTypeOfSignature(signature);
78870
+ if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
78871
+ return returnType;
78872
+ }
78870
78873
  }
78871
78874
  }
78872
78875
  function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
78873
78876
  const funcType = checkExpression(expr.expression);
78874
78877
  const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
78875
- const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
78878
+ const returnType = getNonGenericReturnTypeOfSingleCallSignature(funcType);
78876
78879
  return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
78877
78880
  }
78878
78881
  function getTypeOfExpression(node) {
@@ -78917,7 +78920,7 @@ function createTypeChecker(host) {
78917
78920
  /*requireStringLiteralLikeArgument*/
78918
78921
  true
78919
78922
  ) && !isSymbolOrSymbolForCall(expr)) {
78920
- return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
78923
+ return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getNonGenericReturnTypeOfSingleCallSignature(checkNonNullExpression(expr.expression));
78921
78924
  } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
78922
78925
  return getTypeFromTypeNode(expr.type);
78923
78926
  } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
@@ -87999,13 +88002,13 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) {
87999
88002
  readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0
88000
88003
  };
88001
88004
  }
88002
- var SymbolTrackerImpl = class {
88005
+ var SymbolTrackerImpl = class _SymbolTrackerImpl {
88003
88006
  constructor(context, tracker, moduleResolverHost) {
88004
88007
  this.moduleResolverHost = void 0;
88005
88008
  this.inner = void 0;
88006
88009
  this.disableTrackSymbol = false;
88007
88010
  var _a;
88008
- while (tracker instanceof SymbolTrackerImpl) {
88011
+ while (tracker instanceof _SymbolTrackerImpl) {
88009
88012
  tracker = tracker.inner;
88010
88013
  }
88011
88014
  this.inner = tracker;
@@ -138737,18 +138740,14 @@ function getRefactorActionsToConvertToTemplateString(context) {
138737
138740
  const { file, startPosition } = context;
138738
138741
  const node = getNodeOrParentOfParentheses(file, startPosition);
138739
138742
  const maybeBinary = getParentBinaryExpression(node);
138740
- const nodeIsStringLiteral = isStringLiteral(maybeBinary);
138741
138743
  const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
138742
- if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
138743
- return emptyArray;
138744
- }
138745
- if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
138744
+ if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
138746
138745
  refactorInfo.actions.push(convertStringAction);
138747
138746
  return [refactorInfo];
138748
138747
  } else if (context.preferences.provideRefactorNotApplicableReason) {
138749
138748
  refactorInfo.actions.push({
138750
138749
  ...convertStringAction,
138751
- notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
138750
+ notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation)
138752
138751
  });
138753
138752
  return [refactorInfo];
138754
138753
  }
@@ -166247,7 +166246,7 @@ function isSeparator(node, candidate) {
166247
166246
  function isThisTypeAnnotatable(containingFunction) {
166248
166247
  return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction);
166249
166248
  }
166250
- var ChangeTracker = class {
166249
+ var ChangeTracker = class _ChangeTracker {
166251
166250
  /** Public for tests only. Other callers should use `ChangeTracker.with`. */
166252
166251
  constructor(newLineCharacter, formatContext) {
166253
166252
  this.newLineCharacter = newLineCharacter;
@@ -166258,10 +166257,10 @@ var ChangeTracker = class {
166258
166257
  this.deletedNodes = [];
166259
166258
  }
166260
166259
  static fromContext(context) {
166261
- return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166260
+ return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166262
166261
  }
166263
166262
  static with(context, cb) {
166264
- const tracker = ChangeTracker.fromContext(context);
166263
+ const tracker = _ChangeTracker.fromContext(context);
166265
166264
  cb(tracker);
166266
166265
  return tracker.getChanges();
166267
166266
  }
@@ -173072,7 +173071,7 @@ function createSortedArray2() {
173072
173071
  }
173073
173072
 
173074
173073
  // src/server/utilities.ts
173075
- var ThrottledOperations = class {
173074
+ var ThrottledOperations = class _ThrottledOperations {
173076
173075
  constructor(host, logger) {
173077
173076
  this.host = host;
173078
173077
  this.pendingTimeouts = /* @__PURE__ */ new Map();
@@ -173089,7 +173088,7 @@ var ThrottledOperations = class {
173089
173088
  if (pendingTimeout) {
173090
173089
  this.host.clearTimeout(pendingTimeout);
173091
173090
  }
173092
- this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, operationId, this, cb));
173091
+ this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb));
173093
173092
  if (this.logger) {
173094
173093
  this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`);
173095
173094
  }
@@ -173112,7 +173111,7 @@ var ThrottledOperations = class {
173112
173111
  (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
173113
173112
  }
173114
173113
  };
173115
- var GcTimer = class {
173114
+ var GcTimer = class _GcTimer {
173116
173115
  constructor(host, delay, logger) {
173117
173116
  this.host = host;
173118
173117
  this.delay = delay;
@@ -173122,7 +173121,7 @@ var GcTimer = class {
173122
173121
  if (!this.host.gc || this.timerId !== void 0) {
173123
173122
  return;
173124
173123
  }
173125
- this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
173124
+ this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this);
173126
173125
  }
173127
173126
  static run(self) {
173128
173127
  var _a, _b;
@@ -174073,7 +174072,7 @@ function hasNoTypeScriptSource(fileNames) {
174073
174072
  function isGeneratedFileWatcher(watch) {
174074
174073
  return watch.generatedFilePath !== void 0;
174075
174074
  }
174076
- var Project3 = class {
174075
+ var Project3 = class _Project {
174077
174076
  /** @internal */
174078
174077
  constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) {
174079
174078
  this.projectKind = projectKind;
@@ -174190,7 +174189,7 @@ var Project3 = class {
174190
174189
  return hasOneOrMoreJsAndNoTsFiles(this);
174191
174190
  }
174192
174191
  static resolveModule(moduleName, initialDir, host, log) {
174193
- return Project3.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule;
174192
+ return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule;
174194
174193
  }
174195
174194
  /** @internal */
174196
174195
  static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) {
@@ -175795,7 +175794,7 @@ var AuxiliaryProject = class extends Project3 {
175795
175794
  return;
175796
175795
  }
175797
175796
  };
175798
- var _AutoImportProviderProject = class extends Project3 {
175797
+ var _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 {
175799
175798
  /** @internal */
175800
175799
  constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) {
175801
175800
  super(
@@ -176019,11 +176018,10 @@ var _AutoImportProviderProject = class extends Project3 {
176019
176018
  return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache();
176020
176019
  }
176021
176020
  };
176022
- var AutoImportProviderProject = _AutoImportProviderProject;
176023
176021
  /** @internal */
176024
- AutoImportProviderProject.maxDependencies = 10;
176022
+ _AutoImportProviderProject.maxDependencies = 10;
176025
176023
  /** @internal */
176026
- AutoImportProviderProject.compilerOptionsOverrides = {
176024
+ _AutoImportProviderProject.compilerOptionsOverrides = {
176027
176025
  diagnostics: false,
176028
176026
  skipLibCheck: true,
176029
176027
  sourceMap: false,
@@ -176031,6 +176029,7 @@ AutoImportProviderProject.compilerOptionsOverrides = {
176031
176029
  lib: emptyArray,
176032
176030
  noLib: true
176033
176031
  };
176032
+ var AutoImportProviderProject = _AutoImportProviderProject;
176034
176033
  var ConfiguredProject2 = class extends Project3 {
176035
176034
  /** @internal */
176036
176035
  constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) {
@@ -176592,7 +176591,7 @@ function createProjectNameFactoryWithCounter(nameFactory) {
176592
176591
  let nextId = 1;
176593
176592
  return () => nameFactory(nextId++);
176594
176593
  }
176595
- var _ProjectService = class {
176594
+ var _ProjectService = class _ProjectService {
176596
176595
  constructor(opts) {
176597
176596
  /**
176598
176597
  * Container of all known scripts
@@ -179575,9 +179574,9 @@ Dynamic files must always be opened with service's current directory or service
179575
179574
  return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache());
179576
179575
  }
179577
179576
  };
179578
- var ProjectService3 = _ProjectService;
179579
179577
  /** Makes a filename safe to insert in a RegExp */
179580
- ProjectService3.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
179578
+ _ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
179579
+ var ProjectService3 = _ProjectService;
179581
179580
  function createIncompleteCompletionsCache() {
179582
179581
  let info;
179583
179582
  return {
@@ -180244,7 +180243,7 @@ var invalidSyntacticModeCommands = [
180244
180243
  "documentHighlights" /* DocumentHighlights */,
180245
180244
  "documentHighlights-full" /* DocumentHighlightsFull */
180246
180245
  ];
180247
- var Session3 = class {
180246
+ var Session3 = class _Session {
180248
180247
  constructor(opts) {
180249
180248
  this.changeSeq = 0;
180250
180249
  this.handlers = new Map(Object.entries({
@@ -181347,7 +181346,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181347
181346
  const { file, project } = this.getFileAndProject(args);
181348
181347
  const position = this.getPositionInFile(args, file);
181349
181348
  const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project);
181350
- return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(Session3.mapToOriginalLocation);
181349
+ return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation);
181351
181350
  }
181352
181351
  mapDefinitionInfoLocations(definitions, project) {
181353
181352
  return definitions.map((info) => {
@@ -181384,7 +181383,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181384
181383
  };
181385
181384
  }
181386
181385
  return {
181387
- definitions: definitions.map(Session3.mapToOriginalLocation),
181386
+ definitions: definitions.map(_Session.mapToOriginalLocation),
181388
181387
  textSpan
181389
181388
  };
181390
181389
  }
@@ -181641,7 +181640,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181641
181640
  const { file, project } = this.getFileAndProject(args);
181642
181641
  const position = this.getPositionInFile(args, file);
181643
181642
  const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project);
181644
- return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(Session3.mapToOriginalLocation);
181643
+ return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation);
181645
181644
  }
181646
181645
  getSyntacticDiagnosticsSync(args) {
181647
181646
  const { configFile } = this.getConfigFileAndProject(args);
@@ -183265,7 +183264,7 @@ var TextChange9 = class {
183265
183264
  );
183266
183265
  }
183267
183266
  };
183268
- var _ScriptVersionCache = class {
183267
+ var _ScriptVersionCache = class _ScriptVersionCache {
183269
183268
  constructor() {
183270
183269
  this.changes = [];
183271
183270
  this.versions = new Array(_ScriptVersionCache.maxVersions);
@@ -183357,11 +183356,11 @@ var _ScriptVersionCache = class {
183357
183356
  return svc;
183358
183357
  }
183359
183358
  };
183359
+ _ScriptVersionCache.changeNumberThreshold = 8;
183360
+ _ScriptVersionCache.changeLengthThreshold = 256;
183361
+ _ScriptVersionCache.maxVersions = 8;
183360
183362
  var ScriptVersionCache = _ScriptVersionCache;
183361
- ScriptVersionCache.changeNumberThreshold = 8;
183362
- ScriptVersionCache.changeLengthThreshold = 256;
183363
- ScriptVersionCache.maxVersions = 8;
183364
- var LineIndexSnapshot = class {
183363
+ var LineIndexSnapshot = class _LineIndexSnapshot {
183365
183364
  constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) {
183366
183365
  this.version = version2;
183367
183366
  this.cache = cache;
@@ -183375,7 +183374,7 @@ var LineIndexSnapshot = class {
183375
183374
  return this.index.getLength();
183376
183375
  }
183377
183376
  getChangeRange(oldSnapshot) {
183378
- if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) {
183377
+ if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) {
183379
183378
  if (this.version <= oldSnapshot.version) {
183380
183379
  return unchangedTextChangeRange;
183381
183380
  } else {
@@ -183384,7 +183383,7 @@ var LineIndexSnapshot = class {
183384
183383
  }
183385
183384
  }
183386
183385
  };
183387
- var LineIndex = class {
183386
+ var LineIndex = class _LineIndex {
183388
183387
  constructor() {
183389
183388
  // set this to true to check each edit for accuracy
183390
183389
  this.checkEdits = false;
@@ -183417,7 +183416,7 @@ var LineIndex = class {
183417
183416
  for (let i = 0; i < lines.length; i++) {
183418
183417
  leaves[i] = new LineLeaf(lines[i]);
183419
183418
  }
183420
- this.root = LineIndex.buildTreeFromBottom(leaves);
183419
+ this.root = _LineIndex.buildTreeFromBottom(leaves);
183421
183420
  } else {
183422
183421
  this.root = new LineNode();
183423
183422
  }
@@ -183461,7 +183460,7 @@ var LineIndex = class {
183461
183460
  if (this.root.charCount() === 0) {
183462
183461
  Debug.assert(deleteLength === 0);
183463
183462
  if (newText !== void 0) {
183464
- this.load(LineIndex.linesFromText(newText).lines);
183463
+ this.load(_LineIndex.linesFromText(newText).lines);
183465
183464
  return this;
183466
183465
  }
183467
183466
  return void 0;
@@ -183532,7 +183531,7 @@ var LineIndex = class {
183532
183531
  return { lines, lineMap };
183533
183532
  }
183534
183533
  };
183535
- var LineNode = class {
183534
+ var LineNode = class _LineNode {
183536
183535
  constructor(children = []) {
183537
183536
  this.children = children;
183538
183537
  this.totalChars = 0;
@@ -183664,7 +183663,7 @@ var LineNode = class {
183664
183663
  childIndex++;
183665
183664
  const endLength = childIndex;
183666
183665
  if (childIndex < clen) {
183667
- splitNode = new LineNode();
183666
+ splitNode = new _LineNode();
183668
183667
  while (childIndex < clen) {
183669
183668
  splitNode.add(this.children[childIndex]);
183670
183669
  childIndex++;
@@ -183713,7 +183712,7 @@ var LineNode = class {
183713
183712
  splitNodes = new Array(splitNodeCount);
183714
183713
  let splitNodeIndex = 0;
183715
183714
  for (let i = 0; i < splitNodeCount; i++) {
183716
- splitNodes[i] = new LineNode();
183715
+ splitNodes[i] = new _LineNode();
183717
183716
  }
183718
183717
  let splitNode = splitNodes[0];
183719
183718
  while (nodeIndex < nodeCount) {
@@ -184196,7 +184195,7 @@ function startNodeSession(options, logger, cancellationToken) {
184196
184195
  output: process.stdout,
184197
184196
  terminal: false
184198
184197
  });
184199
- const _NodeTypingsInstaller = class {
184198
+ const _NodeTypingsInstaller = class _NodeTypingsInstaller {
184200
184199
  constructor(telemetryEnabled2, logger2, host, globalTypingsCacheLocation, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, event) {
184201
184200
  this.telemetryEnabled = telemetryEnabled2;
184202
184201
  this.logger = logger2;
@@ -184404,14 +184403,14 @@ function startNodeSession(options, logger, cancellationToken) {
184404
184403
  this.host.setTimeout(request.operation, _NodeTypingsInstaller.requestDelayMillis);
184405
184404
  }
184406
184405
  };
184407
- let NodeTypingsInstaller = _NodeTypingsInstaller;
184408
184406
  // This number is essentially arbitrary. Processing more than one typings request
184409
184407
  // at a time makes sense, but having too many in the pipe results in a hang
184410
184408
  // (see https://github.com/nodejs/node/issues/7657).
184411
184409
  // It would be preferable to base our limit on the amount of space left in the
184412
184410
  // buffer, but we have yet to find a way to retrieve that value.
184413
- NodeTypingsInstaller.maxActiveRequestCount = 10;
184414
- NodeTypingsInstaller.requestDelayMillis = 100;
184411
+ _NodeTypingsInstaller.maxActiveRequestCount = 10;
184412
+ _NodeTypingsInstaller.requestDelayMillis = 100;
184413
+ let NodeTypingsInstaller = _NodeTypingsInstaller;
184415
184414
  class IOSession extends Session3 {
184416
184415
  constructor() {
184417
184416
  const event = (body, eventName) => {
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230616`;
38
+ version = `${versionMajorMinor}.0-insiders.20230619`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -2942,7 +2942,7 @@ ${lanes.join("\n")}
2942
2942
  buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
2943
2943
  buildPartRegExp = /^[a-z0-9-]+$/i;
2944
2944
  numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
2945
- _Version = class {
2945
+ _Version = class _Version {
2946
2946
  constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") {
2947
2947
  if (typeof major === "string") {
2948
2948
  const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
@@ -3006,16 +3006,16 @@ ${lanes.join("\n")}
3006
3006
  return result;
3007
3007
  }
3008
3008
  };
3009
+ _Version.zero = new _Version(0, 0, 0, ["0"]);
3009
3010
  Version = _Version;
3010
- Version.zero = new _Version(0, 0, 0, ["0"]);
3011
- VersionRange = class {
3011
+ VersionRange = class _VersionRange {
3012
3012
  constructor(spec) {
3013
3013
  this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray;
3014
3014
  }
3015
3015
  static tryParse(text) {
3016
3016
  const sets = parseRange(text);
3017
3017
  if (sets) {
3018
- const range = new VersionRange("");
3018
+ const range = new _VersionRange("");
3019
3019
  range._alternatives = sets;
3020
3020
  return range;
3021
3021
  }
@@ -9002,7 +9002,7 @@ ${lanes.join("\n")}
9002
9002
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
9003
9003
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
9004
9004
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
9005
- Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
9005
+ Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
9006
9006
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
9007
9007
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
9008
9008
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -76652,16 +76652,19 @@ ${lanes.join("\n")}
76652
76652
  }
76653
76653
  }
76654
76654
  }
76655
- function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
76655
+ function getNonGenericReturnTypeOfSingleCallSignature(funcType) {
76656
76656
  const signature = getSingleCallSignature(funcType);
76657
- if (signature && !signature.typeParameters) {
76658
- return getReturnTypeOfSignature(signature);
76657
+ if (signature) {
76658
+ const returnType = getReturnTypeOfSignature(signature);
76659
+ if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
76660
+ return returnType;
76661
+ }
76659
76662
  }
76660
76663
  }
76661
76664
  function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
76662
76665
  const funcType = checkExpression(expr.expression);
76663
76666
  const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
76664
- const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
76667
+ const returnType = getNonGenericReturnTypeOfSingleCallSignature(funcType);
76665
76668
  return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
76666
76669
  }
76667
76670
  function getTypeOfExpression(node) {
@@ -76706,7 +76709,7 @@ ${lanes.join("\n")}
76706
76709
  /*requireStringLiteralLikeArgument*/
76707
76710
  true
76708
76711
  ) && !isSymbolOrSymbolForCall(expr)) {
76709
- return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
76712
+ return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getNonGenericReturnTypeOfSingleCallSignature(checkNonNullExpression(expr.expression));
76710
76713
  } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
76711
76714
  return getTypeFromTypeNode(expr.type);
76712
76715
  } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
@@ -85920,13 +85923,13 @@ ${lanes.join("\n")}
85920
85923
  JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes";
85921
85924
  JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes";
85922
85925
  })(JsxNames || (JsxNames = {}));
85923
- SymbolTrackerImpl = class {
85926
+ SymbolTrackerImpl = class _SymbolTrackerImpl {
85924
85927
  constructor(context, tracker, moduleResolverHost) {
85925
85928
  this.moduleResolverHost = void 0;
85926
85929
  this.inner = void 0;
85927
85930
  this.disableTrackSymbol = false;
85928
85931
  var _a;
85929
- while (tracker instanceof SymbolTrackerImpl) {
85932
+ while (tracker instanceof _SymbolTrackerImpl) {
85930
85933
  tracker = tracker.inner;
85931
85934
  }
85932
85935
  this.inner = tracker;
@@ -137206,18 +137209,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
137206
137209
  const { file, startPosition } = context;
137207
137210
  const node = getNodeOrParentOfParentheses(file, startPosition);
137208
137211
  const maybeBinary = getParentBinaryExpression(node);
137209
- const nodeIsStringLiteral = isStringLiteral(maybeBinary);
137210
137212
  const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
137211
- if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
137212
- return emptyArray;
137213
- }
137214
- if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
137213
+ if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
137215
137214
  refactorInfo.actions.push(convertStringAction);
137216
137215
  return [refactorInfo];
137217
137216
  } else if (context.preferences.provideRefactorNotApplicableReason) {
137218
137217
  refactorInfo.actions.push({
137219
137218
  ...convertStringAction,
137220
- notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
137219
+ notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation)
137221
137220
  });
137222
137221
  return [refactorInfo];
137223
137222
  }
@@ -166125,7 +166124,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166125
166124
  leadingTriviaOption: 0 /* Exclude */,
166126
166125
  trailingTriviaOption: 0 /* Exclude */
166127
166126
  };
166128
- ChangeTracker = class {
166127
+ ChangeTracker = class _ChangeTracker {
166129
166128
  /** Public for tests only. Other callers should use `ChangeTracker.with`. */
166130
166129
  constructor(newLineCharacter, formatContext) {
166131
166130
  this.newLineCharacter = newLineCharacter;
@@ -166136,10 +166135,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166136
166135
  this.deletedNodes = [];
166137
166136
  }
166138
166137
  static fromContext(context) {
166139
- return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166138
+ return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166140
166139
  }
166141
166140
  static with(context, cb) {
166142
- const tracker = ChangeTracker.fromContext(context);
166141
+ const tracker = _ChangeTracker.fromContext(context);
166143
166142
  cb(tracker);
166144
166143
  return tracker.getChanges();
166145
166144
  }
@@ -170398,7 +170397,7 @@ ${options.prefix}` : "\n" : options.prefix
170398
170397
  "use strict";
170399
170398
  init_ts7();
170400
170399
  init_ts_server3();
170401
- ThrottledOperations = class {
170400
+ ThrottledOperations = class _ThrottledOperations {
170402
170401
  constructor(host, logger) {
170403
170402
  this.host = host;
170404
170403
  this.pendingTimeouts = /* @__PURE__ */ new Map();
@@ -170415,7 +170414,7 @@ ${options.prefix}` : "\n" : options.prefix
170415
170414
  if (pendingTimeout) {
170416
170415
  this.host.clearTimeout(pendingTimeout);
170417
170416
  }
170418
- this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, operationId, this, cb));
170417
+ this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb));
170419
170418
  if (this.logger) {
170420
170419
  this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`);
170421
170420
  }
@@ -170438,7 +170437,7 @@ ${options.prefix}` : "\n" : options.prefix
170438
170437
  (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation();
170439
170438
  }
170440
170439
  };
170441
- GcTimer = class {
170440
+ GcTimer = class _GcTimer {
170442
170441
  constructor(host, delay, logger) {
170443
170442
  this.host = host;
170444
170443
  this.delay = delay;
@@ -170448,7 +170447,7 @@ ${options.prefix}` : "\n" : options.prefix
170448
170447
  if (!this.host.gc || this.timerId !== void 0) {
170449
170448
  return;
170450
170449
  }
170451
- this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this);
170450
+ this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this);
170452
170451
  }
170453
170452
  static run(self) {
170454
170453
  var _a, _b;
@@ -171444,7 +171443,7 @@ ${options.prefix}` : "\n" : options.prefix
171444
171443
  ProjectKind2[ProjectKind2["Auxiliary"] = 4] = "Auxiliary";
171445
171444
  return ProjectKind2;
171446
171445
  })(ProjectKind || {});
171447
- Project3 = class {
171446
+ Project3 = class _Project {
171448
171447
  /** @internal */
171449
171448
  constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) {
171450
171449
  this.projectKind = projectKind;
@@ -171561,7 +171560,7 @@ ${options.prefix}` : "\n" : options.prefix
171561
171560
  return hasOneOrMoreJsAndNoTsFiles(this);
171562
171561
  }
171563
171562
  static resolveModule(moduleName, initialDir, host, log) {
171564
- return Project3.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule;
171563
+ return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule;
171565
171564
  }
171566
171565
  /** @internal */
171567
171566
  static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) {
@@ -173144,7 +173143,7 @@ ${options.prefix}` : "\n" : options.prefix
173144
173143
  return;
173145
173144
  }
173146
173145
  };
173147
- _AutoImportProviderProject = class extends Project3 {
173146
+ _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 {
173148
173147
  /** @internal */
173149
173148
  constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) {
173150
173149
  super(
@@ -173368,11 +173367,10 @@ ${options.prefix}` : "\n" : options.prefix
173368
173367
  return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache();
173369
173368
  }
173370
173369
  };
173371
- AutoImportProviderProject = _AutoImportProviderProject;
173372
173370
  /** @internal */
173373
- AutoImportProviderProject.maxDependencies = 10;
173371
+ _AutoImportProviderProject.maxDependencies = 10;
173374
173372
  /** @internal */
173375
- AutoImportProviderProject.compilerOptionsOverrides = {
173373
+ _AutoImportProviderProject.compilerOptionsOverrides = {
173376
173374
  diagnostics: false,
173377
173375
  skipLibCheck: true,
173378
173376
  sourceMap: false,
@@ -173380,6 +173378,7 @@ ${options.prefix}` : "\n" : options.prefix
173380
173378
  lib: emptyArray,
173381
173379
  noLib: true
173382
173380
  };
173381
+ AutoImportProviderProject = _AutoImportProviderProject;
173383
173382
  ConfiguredProject2 = class extends Project3 {
173384
173383
  /** @internal */
173385
173384
  constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) {
@@ -173967,7 +173966,7 @@ ${options.prefix}` : "\n" : options.prefix
173967
173966
  ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreateLoad"] = 2] = "FindCreateLoad";
173968
173967
  return ProjectReferenceProjectLoadKind2;
173969
173968
  })(ProjectReferenceProjectLoadKind || {});
173970
- _ProjectService = class {
173969
+ _ProjectService = class _ProjectService {
173971
173970
  constructor(opts) {
173972
173971
  /**
173973
173972
  * Container of all known scripts
@@ -176950,9 +176949,9 @@ Dynamic files must always be opened with service's current directory or service
176950
176949
  return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache());
176951
176950
  }
176952
176951
  };
176953
- ProjectService3 = _ProjectService;
176954
176952
  /** Makes a filename safe to insert in a RegExp */
176955
- ProjectService3.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
176953
+ _ProjectService.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g;
176954
+ ProjectService3 = _ProjectService;
176956
176955
  }
176957
176956
  });
176958
176957
 
@@ -177688,7 +177687,7 @@ ${json}${newLine}`;
177688
177687
  "documentHighlights" /* DocumentHighlights */,
177689
177688
  "documentHighlights-full" /* DocumentHighlightsFull */
177690
177689
  ];
177691
- Session3 = class {
177690
+ Session3 = class _Session {
177692
177691
  constructor(opts) {
177693
177692
  this.changeSeq = 0;
177694
177693
  this.handlers = new Map(Object.entries({
@@ -178791,7 +178790,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
178791
178790
  const { file, project } = this.getFileAndProject(args);
178792
178791
  const position = this.getPositionInFile(args, file);
178793
178792
  const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project);
178794
- return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(Session3.mapToOriginalLocation);
178793
+ return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation);
178795
178794
  }
178796
178795
  mapDefinitionInfoLocations(definitions, project) {
178797
178796
  return definitions.map((info) => {
@@ -178828,7 +178827,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
178828
178827
  };
178829
178828
  }
178830
178829
  return {
178831
- definitions: definitions.map(Session3.mapToOriginalLocation),
178830
+ definitions: definitions.map(_Session.mapToOriginalLocation),
178832
178831
  textSpan
178833
178832
  };
178834
178833
  }
@@ -179085,7 +179084,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
179085
179084
  const { file, project } = this.getFileAndProject(args);
179086
179085
  const position = this.getPositionInFile(args, file);
179087
179086
  const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project);
179088
- return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(Session3.mapToOriginalLocation);
179087
+ return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation);
179089
179088
  }
179090
179089
  getSyntacticDiagnosticsSync(args) {
179091
179090
  const { configFile } = this.getConfigFileAndProject(args);
@@ -180642,7 +180641,7 @@ ${e.message}`;
180642
180641
  );
180643
180642
  }
180644
180643
  };
180645
- _ScriptVersionCache = class {
180644
+ _ScriptVersionCache = class _ScriptVersionCache {
180646
180645
  constructor() {
180647
180646
  this.changes = [];
180648
180647
  this.versions = new Array(_ScriptVersionCache.maxVersions);
@@ -180734,11 +180733,11 @@ ${e.message}`;
180734
180733
  return svc;
180735
180734
  }
180736
180735
  };
180736
+ _ScriptVersionCache.changeNumberThreshold = 8;
180737
+ _ScriptVersionCache.changeLengthThreshold = 256;
180738
+ _ScriptVersionCache.maxVersions = 8;
180737
180739
  ScriptVersionCache = _ScriptVersionCache;
180738
- ScriptVersionCache.changeNumberThreshold = 8;
180739
- ScriptVersionCache.changeLengthThreshold = 256;
180740
- ScriptVersionCache.maxVersions = 8;
180741
- LineIndexSnapshot = class {
180740
+ LineIndexSnapshot = class _LineIndexSnapshot {
180742
180741
  constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) {
180743
180742
  this.version = version2;
180744
180743
  this.cache = cache;
@@ -180752,7 +180751,7 @@ ${e.message}`;
180752
180751
  return this.index.getLength();
180753
180752
  }
180754
180753
  getChangeRange(oldSnapshot) {
180755
- if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) {
180754
+ if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) {
180756
180755
  if (this.version <= oldSnapshot.version) {
180757
180756
  return unchangedTextChangeRange;
180758
180757
  } else {
@@ -180761,7 +180760,7 @@ ${e.message}`;
180761
180760
  }
180762
180761
  }
180763
180762
  };
180764
- LineIndex = class {
180763
+ LineIndex = class _LineIndex {
180765
180764
  constructor() {
180766
180765
  // set this to true to check each edit for accuracy
180767
180766
  this.checkEdits = false;
@@ -180794,7 +180793,7 @@ ${e.message}`;
180794
180793
  for (let i = 0; i < lines.length; i++) {
180795
180794
  leaves[i] = new LineLeaf(lines[i]);
180796
180795
  }
180797
- this.root = LineIndex.buildTreeFromBottom(leaves);
180796
+ this.root = _LineIndex.buildTreeFromBottom(leaves);
180798
180797
  } else {
180799
180798
  this.root = new LineNode();
180800
180799
  }
@@ -180838,7 +180837,7 @@ ${e.message}`;
180838
180837
  if (this.root.charCount() === 0) {
180839
180838
  Debug.assert(deleteLength === 0);
180840
180839
  if (newText !== void 0) {
180841
- this.load(LineIndex.linesFromText(newText).lines);
180840
+ this.load(_LineIndex.linesFromText(newText).lines);
180842
180841
  return this;
180843
180842
  }
180844
180843
  return void 0;
@@ -180909,7 +180908,7 @@ ${e.message}`;
180909
180908
  return { lines, lineMap };
180910
180909
  }
180911
180910
  };
180912
- LineNode = class {
180911
+ LineNode = class _LineNode {
180913
180912
  constructor(children = []) {
180914
180913
  this.children = children;
180915
180914
  this.totalChars = 0;
@@ -181041,7 +181040,7 @@ ${e.message}`;
181041
181040
  childIndex++;
181042
181041
  const endLength = childIndex;
181043
181042
  if (childIndex < clen) {
181044
- splitNode = new LineNode();
181043
+ splitNode = new _LineNode();
181045
181044
  while (childIndex < clen) {
181046
181045
  splitNode.add(this.children[childIndex]);
181047
181046
  childIndex++;
@@ -181090,7 +181089,7 @@ ${e.message}`;
181090
181089
  splitNodes = new Array(splitNodeCount);
181091
181090
  let splitNodeIndex = 0;
181092
181091
  for (let i = 0; i < splitNodeCount; i++) {
181093
- splitNodes[i] = new LineNode();
181092
+ splitNodes[i] = new _LineNode();
181094
181093
  }
181095
181094
  let splitNode = splitNodes[0];
181096
181095
  while (nodeIndex < nodeCount) {
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.2";
38
- version = `${versionMajorMinor}.0-insiders.20230616`;
38
+ version = `${versionMajorMinor}.0-insiders.20230619`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -2942,7 +2942,7 @@ ${lanes.join("\n")}
2942
2942
  buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
2943
2943
  buildPartRegExp = /^[a-z0-9-]+$/i;
2944
2944
  numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
2945
- _Version = class {
2945
+ _Version = class _Version {
2946
2946
  constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") {
2947
2947
  if (typeof major === "string") {
2948
2948
  const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
@@ -3006,16 +3006,16 @@ ${lanes.join("\n")}
3006
3006
  return result;
3007
3007
  }
3008
3008
  };
3009
+ _Version.zero = new _Version(0, 0, 0, ["0"]);
3009
3010
  Version = _Version;
3010
- Version.zero = new _Version(0, 0, 0, ["0"]);
3011
- VersionRange = class {
3011
+ VersionRange = class _VersionRange {
3012
3012
  constructor(spec) {
3013
3013
  this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray;
3014
3014
  }
3015
3015
  static tryParse(text) {
3016
3016
  const sets = parseRange(text);
3017
3017
  if (sets) {
3018
- const range = new VersionRange("");
3018
+ const range = new _VersionRange("");
3019
3019
  range._alternatives = sets;
3020
3020
  return range;
3021
3021
  }
@@ -9002,7 +9002,7 @@ ${lanes.join("\n")}
9002
9002
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
9003
9003
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
9004
9004
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
9005
- Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
9005
+ Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
9006
9006
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
9007
9007
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
9008
9008
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -76652,16 +76652,19 @@ ${lanes.join("\n")}
76652
76652
  }
76653
76653
  }
76654
76654
  }
76655
- function getReturnTypeOfSingleNonGenericCallSignature(funcType) {
76655
+ function getNonGenericReturnTypeOfSingleCallSignature(funcType) {
76656
76656
  const signature = getSingleCallSignature(funcType);
76657
- if (signature && !signature.typeParameters) {
76658
- return getReturnTypeOfSignature(signature);
76657
+ if (signature) {
76658
+ const returnType = getReturnTypeOfSignature(signature);
76659
+ if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
76660
+ return returnType;
76661
+ }
76659
76662
  }
76660
76663
  }
76661
76664
  function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
76662
76665
  const funcType = checkExpression(expr.expression);
76663
76666
  const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
76664
- const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType);
76667
+ const returnType = getNonGenericReturnTypeOfSingleCallSignature(funcType);
76665
76668
  return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
76666
76669
  }
76667
76670
  function getTypeOfExpression(node) {
@@ -76706,7 +76709,7 @@ ${lanes.join("\n")}
76706
76709
  /*requireStringLiteralLikeArgument*/
76707
76710
  true
76708
76711
  ) && !isSymbolOrSymbolForCall(expr)) {
76709
- return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
76712
+ return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getNonGenericReturnTypeOfSingleCallSignature(checkNonNullExpression(expr.expression));
76710
76713
  } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
76711
76714
  return getTypeFromTypeNode(expr.type);
76712
76715
  } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
@@ -85920,13 +85923,13 @@ ${lanes.join("\n")}
85920
85923
  JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes";
85921
85924
  JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes";
85922
85925
  })(JsxNames || (JsxNames = {}));
85923
- SymbolTrackerImpl = class {
85926
+ SymbolTrackerImpl = class _SymbolTrackerImpl {
85924
85927
  constructor(context, tracker, moduleResolverHost) {
85925
85928
  this.moduleResolverHost = void 0;
85926
85929
  this.inner = void 0;
85927
85930
  this.disableTrackSymbol = false;
85928
85931
  var _a;
85929
- while (tracker instanceof SymbolTrackerImpl) {
85932
+ while (tracker instanceof _SymbolTrackerImpl) {
85930
85933
  tracker = tracker.inner;
85931
85934
  }
85932
85935
  this.inner = tracker;
@@ -137221,18 +137224,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
137221
137224
  const { file, startPosition } = context;
137222
137225
  const node = getNodeOrParentOfParentheses(file, startPosition);
137223
137226
  const maybeBinary = getParentBinaryExpression(node);
137224
- const nodeIsStringLiteral = isStringLiteral(maybeBinary);
137225
137227
  const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
137226
- if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
137227
- return emptyArray;
137228
- }
137229
- if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
137228
+ if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
137230
137229
  refactorInfo.actions.push(convertStringAction);
137231
137230
  return [refactorInfo];
137232
137231
  } else if (context.preferences.provideRefactorNotApplicableReason) {
137233
137232
  refactorInfo.actions.push({
137234
137233
  ...convertStringAction,
137235
- notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
137234
+ notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation)
137236
137235
  });
137237
137236
  return [refactorInfo];
137238
137237
  }
@@ -166140,7 +166139,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166140
166139
  leadingTriviaOption: 0 /* Exclude */,
166141
166140
  trailingTriviaOption: 0 /* Exclude */
166142
166141
  };
166143
- ChangeTracker = class {
166142
+ ChangeTracker = class _ChangeTracker {
166144
166143
  /** Public for tests only. Other callers should use `ChangeTracker.with`. */
166145
166144
  constructor(newLineCharacter, formatContext) {
166146
166145
  this.newLineCharacter = newLineCharacter;
@@ -166151,10 +166150,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
166151
166150
  this.deletedNodes = [];
166152
166151
  }
166153
166152
  static fromContext(context) {
166154
- return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166153
+ return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext);
166155
166154
  }
166156
166155
  static with(context, cb) {
166157
- const tracker = ChangeTracker.fromContext(context);
166156
+ const tracker = _ChangeTracker.fromContext(context);
166158
166157
  cb(tracker);
166159
166158
  return tracker.getChanges();
166160
166159
  }
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-insiders.20230616`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230619`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -1856,7 +1856,7 @@ var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
1856
1856
  var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
1857
1857
  var buildPartRegExp = /^[a-z0-9-]+$/i;
1858
1858
  var numericIdentifierRegExp = /^(0|[1-9]\d*)$/;
1859
- var _Version = class {
1859
+ var _Version = class _Version {
1860
1860
  constructor(major, minor = 0, patch = 0, prerelease = "", build = "") {
1861
1861
  if (typeof major === "string") {
1862
1862
  const result = Debug.checkDefined(tryParseComponents(major), "Invalid version");
@@ -1920,8 +1920,8 @@ var _Version = class {
1920
1920
  return result;
1921
1921
  }
1922
1922
  };
1923
+ _Version.zero = new _Version(0, 0, 0, ["0"]);
1923
1924
  var Version = _Version;
1924
- Version.zero = new _Version(0, 0, 0, ["0"]);
1925
1925
  function tryParseComponents(text) {
1926
1926
  const match = versionRegExp.exec(text);
1927
1927
  if (!match)
@@ -1968,14 +1968,14 @@ function comparePrereleaseIdentifiers(left, right) {
1968
1968
  }
1969
1969
  return compareValues(left.length, right.length);
1970
1970
  }
1971
- var VersionRange = class {
1971
+ var VersionRange = class _VersionRange {
1972
1972
  constructor(spec) {
1973
1973
  this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray;
1974
1974
  }
1975
1975
  static tryParse(text) {
1976
1976
  const sets = parseRange(text);
1977
1977
  if (sets) {
1978
- const range = new VersionRange("");
1978
+ const range = new _VersionRange("");
1979
1979
  range._alternatives = sets;
1980
1980
  return range;
1981
1981
  }
@@ -7073,7 +7073,7 @@ var Diagnostics = {
7073
7073
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
7074
7074
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
7075
7075
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
7076
- Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
7076
+ Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
7077
7077
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
7078
7078
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
7079
7079
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
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.2.0-pr-54647-2",
5
+ "version": "5.2.0-pr-54477-10",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "4a58fe91bad1aa6dca65eba3ecd2f26e05cd9a14"
118
+ "gitHead": "34d289ed91d6d5fe33db36a73407a2cb75cd9ef6"
119
119
  }