typescript 5.5.0-dev.20240325 → 5.5.0-dev.20240326

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.5";
21
- var version = `${versionMajorMinor}.0-dev.20240325`;
21
+ var version = `${versionMajorMinor}.0-dev.20240326`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -4136,14 +4136,17 @@ function createDynamicPriorityPollingWatchFile(host) {
4136
4136
  pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
4137
4137
  }
4138
4138
  }
4139
- function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
4139
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
4140
4140
  const fileWatcherCallbacks = createMultiMap();
4141
+ const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
4141
4142
  const dirWatchers = /* @__PURE__ */ new Map();
4142
4143
  const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
4143
4144
  return nonPollingWatchFile;
4144
4145
  function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
4145
4146
  const filePath = toCanonicalName(fileName);
4146
- fileWatcherCallbacks.add(filePath, callback);
4147
+ if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
4148
+ fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);
4149
+ }
4147
4150
  const dirPath = getDirectoryPath(filePath) || ".";
4148
4151
  const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
4149
4152
  watcher.referenceCount++;
@@ -4163,14 +4166,31 @@ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFi
4163
4166
  const watcher = fsWatch(
4164
4167
  dirName,
4165
4168
  1 /* Directory */,
4166
- (_eventName, relativeFileName, modifiedTime) => {
4169
+ (eventName, relativeFileName) => {
4167
4170
  if (!isString(relativeFileName))
4168
4171
  return;
4169
4172
  const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
4170
- const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
4173
+ const filePath = toCanonicalName(fileName);
4174
+ const callbacks = fileName && fileWatcherCallbacks.get(filePath);
4171
4175
  if (callbacks) {
4176
+ let currentModifiedTime;
4177
+ let eventKind = 1 /* Changed */;
4178
+ if (fileTimestamps) {
4179
+ const existingTime = fileTimestamps.get(filePath);
4180
+ if (eventName === "change") {
4181
+ currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;
4182
+ if (currentModifiedTime.getTime() === existingTime.getTime())
4183
+ return;
4184
+ }
4185
+ currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);
4186
+ fileTimestamps.set(filePath, currentModifiedTime);
4187
+ if (existingTime === missingFileModifiedTime)
4188
+ eventKind = 0 /* Created */;
4189
+ else if (currentModifiedTime === missingFileModifiedTime)
4190
+ eventKind = 2 /* Deleted */;
4191
+ }
4172
4192
  for (const fileCallback of callbacks) {
4173
- fileCallback(fileName, 1 /* Changed */, modifiedTime);
4193
+ fileCallback(fileName, eventKind, currentModifiedTime);
4174
4194
  }
4175
4195
  }
4176
4196
  },
@@ -4564,7 +4584,7 @@ function createSystemWatchFunctions({
4564
4584
  );
4565
4585
  case 5 /* UseFsEventsOnParentDirectory */:
4566
4586
  if (!nonPollingWatchFile) {
4567
- nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
4587
+ nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
4568
4588
  }
4569
4589
  return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
4570
4590
  default:
@@ -4739,7 +4759,7 @@ function createSystemWatchFunctions({
4739
4759
  return watchPresentFileSystemEntryWithFsWatchFile();
4740
4760
  }
4741
4761
  try {
4742
- const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
4762
+ const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
4743
4763
  fileOrDirectory,
4744
4764
  recursive,
4745
4765
  inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
@@ -4841,7 +4861,6 @@ var sys = (() => {
4841
4861
  }
4842
4862
  let activeSession;
4843
4863
  let profilePath = "./profile.cpuprofile";
4844
- const Buffer = require("buffer").Buffer;
4845
4864
  const isMacOs = process.platform === "darwin";
4846
4865
  const isLinuxOrMacOs = process.platform === "linux" || isMacOs;
4847
4866
  const platform = _os.platform();
@@ -4959,9 +4978,8 @@ var sys = (() => {
4959
4978
  handle.setBlocking(true);
4960
4979
  }
4961
4980
  },
4962
- bufferFrom,
4963
- base64decode: (input) => bufferFrom(input, "base64").toString("utf8"),
4964
- base64encode: (input) => bufferFrom(input).toString("base64"),
4981
+ base64decode: (input) => Buffer.from(input, "base64").toString("utf8"),
4982
+ base64encode: (input) => Buffer.from(input).toString("base64"),
4965
4983
  require: (baseDir, moduleName) => {
4966
4984
  try {
4967
4985
  const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem);
@@ -5050,9 +5068,6 @@ var sys = (() => {
5050
5068
  return false;
5051
5069
  }
5052
5070
  }
5053
- function bufferFrom(input, encoding) {
5054
- return Buffer.from && Buffer.from !== Int8Array.from ? Buffer.from(input, encoding) : new Buffer(input, encoding);
5055
- }
5056
5071
  function isFileSystemCaseSensitive() {
5057
5072
  if (platform === "win32" || platform === "win64") {
5058
5073
  return false;
@@ -6187,7 +6202,6 @@ var Diagnostics = {
6187
6202
  _0_and_1_index_signatures_are_incompatible: diag(2330, 1 /* Error */, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."),
6188
6203
  this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, 1 /* Error */, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."),
6189
6204
  this_cannot_be_referenced_in_current_location: diag(2332, 1 /* Error */, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."),
6190
- this_cannot_be_referenced_in_constructor_arguments: diag(2333, 1 /* Error */, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."),
6191
6205
  this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, 1 /* Error */, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."),
6192
6206
  super_can_only_be_referenced_in_a_derived_class: diag(2335, 1 /* Error */, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."),
6193
6207
  super_cannot_be_referenced_in_constructor_arguments: diag(2336, 1 /* Error */, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."),
@@ -44668,11 +44682,11 @@ function createTypeChecker(host) {
44668
44682
  } else if (declaration.kind === 260 /* VariableDeclaration */) {
44669
44683
  return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
44670
44684
  } else if (isClassLike(declaration)) {
44671
- const container = findAncestor(usage, (n) => n === declaration ? "quit" : isComputedPropertyName(n) ? n.parent.parent === declaration : isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration));
44685
+ const container = findAncestor(usage, (n) => n === declaration ? "quit" : isComputedPropertyName(n) ? n.parent.parent === declaration : !legacyDecorators && isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration));
44672
44686
  if (!container) {
44673
44687
  return true;
44674
44688
  }
44675
- if (isDecorator(container)) {
44689
+ if (!legacyDecorators && isDecorator(container)) {
44676
44690
  return !!findAncestor(usage, (n) => n === container ? "quit" : isFunctionLike(n) && !getImmediatelyInvokedFunctionExpression(n));
44677
44691
  }
44678
44692
  return false;
@@ -67747,11 +67761,6 @@ function createTypeChecker(host) {
67747
67761
  case 266 /* EnumDeclaration */:
67748
67762
  error(node, Diagnostics.this_cannot_be_referenced_in_current_location);
67749
67763
  break;
67750
- case 176 /* Constructor */:
67751
- if (isInConstructorArgumentInitializer(node, container)) {
67752
- error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
67753
- }
67754
- break;
67755
67764
  }
67756
67765
  }
67757
67766
  if (!isNodeInTypeQuery && capturedByArrowFunction && languageVersion < 2 /* ES2015 */) {
@@ -121714,7 +121723,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
121714
121723
  newProgram == null ? void 0 : newProgram.getSourceFiles().forEach((newFile) => {
121715
121724
  var _a;
121716
121725
  const expected = isExternalOrCommonJsModule(newFile) ? ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0 : 0;
121717
- const existing = impliedFormatPackageJsons.get(newFile.path) ?? emptyArray;
121726
+ const existing = impliedFormatPackageJsons.get(newFile.resolvedPath) ?? emptyArray;
121718
121727
  for (let i = existing.length; i < expected; i++) {
121719
121728
  createFileWatcherOfAffectingLocation(
121720
121729
  newFile.packageJsonLocations[i],
@@ -121728,9 +121737,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
121728
121737
  }
121729
121738
  }
121730
121739
  if (expected)
121731
- impliedFormatPackageJsons.set(newFile.path, newFile.packageJsonLocations);
121740
+ impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
121732
121741
  else
121733
- impliedFormatPackageJsons.delete(newFile.path);
121742
+ impliedFormatPackageJsons.delete(newFile.resolvedPath);
121734
121743
  });
121735
121744
  impliedFormatPackageJsons.forEach((existing, path) => {
121736
121745
  if (!(newProgram == null ? void 0 : newProgram.getSourceFileByPath(path))) {
package/lib/tsserver.js CHANGED
@@ -191,7 +191,7 @@ function initializeNodeSystem() {
191
191
  }
192
192
  write(s, _type) {
193
193
  if (this.fd >= 0) {
194
- const buf = sys4.bufferFrom(s);
194
+ const buf = Buffer.from(s);
195
195
  fs.writeSync(
196
196
  this.fd,
197
197
  buf,
@@ -269,7 +269,7 @@ function initializeNodeSystem() {
269
269
  } else {
270
270
  sys4.watchDirectory = watchDirectorySwallowingException;
271
271
  }
272
- sys4.write = (s) => writeMessage(sys4.bufferFrom(s, "utf8"));
272
+ sys4.write = (s) => writeMessage(Buffer.from(s, "utf8"));
273
273
  sys4.setTimeout = setTimeout;
274
274
  sys4.clearTimeout = clearTimeout;
275
275
  sys4.setImmediate = setImmediate;
package/lib/typescript.js CHANGED
@@ -2326,7 +2326,7 @@ module.exports = __toCommonJS(typescript_exports);
2326
2326
 
2327
2327
  // src/compiler/corePublic.ts
2328
2328
  var versionMajorMinor = "5.5";
2329
- var version = `${versionMajorMinor}.0-dev.20240325`;
2329
+ var version = `${versionMajorMinor}.0-dev.20240326`;
2330
2330
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2331
2331
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2332
2332
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7667,14 +7667,17 @@ function createDynamicPriorityPollingWatchFile(host) {
7667
7667
  pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
7668
7668
  }
7669
7669
  }
7670
- function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
7670
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
7671
7671
  const fileWatcherCallbacks = createMultiMap();
7672
+ const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
7672
7673
  const dirWatchers = /* @__PURE__ */ new Map();
7673
7674
  const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
7674
7675
  return nonPollingWatchFile;
7675
7676
  function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
7676
7677
  const filePath = toCanonicalName(fileName);
7677
- fileWatcherCallbacks.add(filePath, callback);
7678
+ if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
7679
+ fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);
7680
+ }
7678
7681
  const dirPath = getDirectoryPath(filePath) || ".";
7679
7682
  const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
7680
7683
  watcher.referenceCount++;
@@ -7694,14 +7697,31 @@ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFi
7694
7697
  const watcher = fsWatch(
7695
7698
  dirName,
7696
7699
  1 /* Directory */,
7697
- (_eventName, relativeFileName, modifiedTime) => {
7700
+ (eventName, relativeFileName) => {
7698
7701
  if (!isString(relativeFileName))
7699
7702
  return;
7700
7703
  const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
7701
- const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
7704
+ const filePath = toCanonicalName(fileName);
7705
+ const callbacks = fileName && fileWatcherCallbacks.get(filePath);
7702
7706
  if (callbacks) {
7707
+ let currentModifiedTime;
7708
+ let eventKind = 1 /* Changed */;
7709
+ if (fileTimestamps) {
7710
+ const existingTime = fileTimestamps.get(filePath);
7711
+ if (eventName === "change") {
7712
+ currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;
7713
+ if (currentModifiedTime.getTime() === existingTime.getTime())
7714
+ return;
7715
+ }
7716
+ currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);
7717
+ fileTimestamps.set(filePath, currentModifiedTime);
7718
+ if (existingTime === missingFileModifiedTime)
7719
+ eventKind = 0 /* Created */;
7720
+ else if (currentModifiedTime === missingFileModifiedTime)
7721
+ eventKind = 2 /* Deleted */;
7722
+ }
7703
7723
  for (const fileCallback of callbacks) {
7704
- fileCallback(fileName, 1 /* Changed */, modifiedTime);
7724
+ fileCallback(fileName, eventKind, currentModifiedTime);
7705
7725
  }
7706
7726
  }
7707
7727
  },
@@ -8100,7 +8120,7 @@ function createSystemWatchFunctions({
8100
8120
  );
8101
8121
  case 5 /* UseFsEventsOnParentDirectory */:
8102
8122
  if (!nonPollingWatchFile) {
8103
- nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
8123
+ nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
8104
8124
  }
8105
8125
  return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
8106
8126
  default:
@@ -8275,7 +8295,7 @@ function createSystemWatchFunctions({
8275
8295
  return watchPresentFileSystemEntryWithFsWatchFile();
8276
8296
  }
8277
8297
  try {
8278
- const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
8298
+ const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
8279
8299
  fileOrDirectory,
8280
8300
  recursive,
8281
8301
  inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
@@ -8377,7 +8397,6 @@ var sys = (() => {
8377
8397
  }
8378
8398
  let activeSession;
8379
8399
  let profilePath = "./profile.cpuprofile";
8380
- const Buffer2 = require("buffer").Buffer;
8381
8400
  const isMacOs = process.platform === "darwin";
8382
8401
  const isLinuxOrMacOs = process.platform === "linux" || isMacOs;
8383
8402
  const platform = _os.platform();
@@ -8495,9 +8514,8 @@ var sys = (() => {
8495
8514
  handle.setBlocking(true);
8496
8515
  }
8497
8516
  },
8498
- bufferFrom,
8499
- base64decode: (input) => bufferFrom(input, "base64").toString("utf8"),
8500
- base64encode: (input) => bufferFrom(input).toString("base64"),
8517
+ base64decode: (input) => Buffer.from(input, "base64").toString("utf8"),
8518
+ base64encode: (input) => Buffer.from(input).toString("base64"),
8501
8519
  require: (baseDir, moduleName) => {
8502
8520
  try {
8503
8521
  const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem);
@@ -8586,9 +8604,6 @@ var sys = (() => {
8586
8604
  return false;
8587
8605
  }
8588
8606
  }
8589
- function bufferFrom(input, encoding) {
8590
- return Buffer2.from && Buffer2.from !== Int8Array.from ? Buffer2.from(input, encoding) : new Buffer2(input, encoding);
8591
- }
8592
8607
  function isFileSystemCaseSensitive() {
8593
8608
  if (platform === "win32" || platform === "win64") {
8594
8609
  return false;
@@ -9742,7 +9757,6 @@ var Diagnostics = {
9742
9757
  _0_and_1_index_signatures_are_incompatible: diag(2330, 1 /* Error */, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."),
9743
9758
  this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, 1 /* Error */, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."),
9744
9759
  this_cannot_be_referenced_in_current_location: diag(2332, 1 /* Error */, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."),
9745
- this_cannot_be_referenced_in_constructor_arguments: diag(2333, 1 /* Error */, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."),
9746
9760
  this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, 1 /* Error */, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."),
9747
9761
  super_can_only_be_referenced_in_a_derived_class: diag(2335, 1 /* Error */, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."),
9748
9762
  super_cannot_be_referenced_in_constructor_arguments: diag(2336, 1 /* Error */, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."),
@@ -49430,11 +49444,11 @@ function createTypeChecker(host) {
49430
49444
  } else if (declaration.kind === 260 /* VariableDeclaration */) {
49431
49445
  return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
49432
49446
  } else if (isClassLike(declaration)) {
49433
- const container = findAncestor(usage, (n) => n === declaration ? "quit" : isComputedPropertyName(n) ? n.parent.parent === declaration : isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration));
49447
+ const container = findAncestor(usage, (n) => n === declaration ? "quit" : isComputedPropertyName(n) ? n.parent.parent === declaration : !legacyDecorators && isDecorator(n) && (n.parent === declaration || isMethodDeclaration(n.parent) && n.parent.parent === declaration || isGetOrSetAccessorDeclaration(n.parent) && n.parent.parent === declaration || isPropertyDeclaration(n.parent) && n.parent.parent === declaration || isParameter(n.parent) && n.parent.parent.parent === declaration));
49434
49448
  if (!container) {
49435
49449
  return true;
49436
49450
  }
49437
- if (isDecorator(container)) {
49451
+ if (!legacyDecorators && isDecorator(container)) {
49438
49452
  return !!findAncestor(usage, (n) => n === container ? "quit" : isFunctionLike(n) && !getImmediatelyInvokedFunctionExpression(n));
49439
49453
  }
49440
49454
  return false;
@@ -72509,11 +72523,6 @@ function createTypeChecker(host) {
72509
72523
  case 266 /* EnumDeclaration */:
72510
72524
  error2(node, Diagnostics.this_cannot_be_referenced_in_current_location);
72511
72525
  break;
72512
- case 176 /* Constructor */:
72513
- if (isInConstructorArgumentInitializer(node, container)) {
72514
- error2(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
72515
- }
72516
- break;
72517
72526
  }
72518
72527
  }
72519
72528
  if (!isNodeInTypeQuery && capturedByArrowFunction && languageVersion < 2 /* ES2015 */) {
@@ -126758,7 +126767,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
126758
126767
  newProgram == null ? void 0 : newProgram.getSourceFiles().forEach((newFile) => {
126759
126768
  var _a;
126760
126769
  const expected = isExternalOrCommonJsModule(newFile) ? ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0 : 0;
126761
- const existing = impliedFormatPackageJsons.get(newFile.path) ?? emptyArray;
126770
+ const existing = impliedFormatPackageJsons.get(newFile.resolvedPath) ?? emptyArray;
126762
126771
  for (let i = existing.length; i < expected; i++) {
126763
126772
  createFileWatcherOfAffectingLocation(
126764
126773
  newFile.packageJsonLocations[i],
@@ -126772,9 +126781,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
126772
126781
  }
126773
126782
  }
126774
126783
  if (expected)
126775
- impliedFormatPackageJsons.set(newFile.path, newFile.packageJsonLocations);
126784
+ impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
126776
126785
  else
126777
- impliedFormatPackageJsons.delete(newFile.path);
126786
+ impliedFormatPackageJsons.delete(newFile.resolvedPath);
126778
126787
  });
126779
126788
  impliedFormatPackageJsons.forEach((existing, path) => {
126780
126789
  if (!(newProgram == null ? void 0 : newProgram.getSourceFileByPath(path))) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.5.0-dev.20240325",
5
+ "version": "5.5.0-dev.20240326",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -112,5 +112,5 @@
112
112
  "node": "20.1.0",
113
113
  "npm": "8.19.4"
114
114
  },
115
- "gitHead": "3c637400da679883f720894e16c5625b9668f932"
115
+ "gitHead": "088f25a8bfe466ffafd7675731a06f07009b447d"
116
116
  }