@typescript-deploys/pr-build 5.3.0-pr-55278-2 → 5.3.0-pr-55696-3

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.
Files changed (46) hide show
  1. package/SECURITY.md +7 -7
  2. package/lib/cancellationToken.js +1 -1
  3. package/lib/lib.decorators.d.ts +3 -6
  4. package/lib/lib.es2015.collection.d.ts +1 -2
  5. package/lib/lib.es2015.core.d.ts +1 -1
  6. package/lib/lib.es2015.iterable.d.ts +4 -5
  7. package/lib/lib.es2015.promise.d.ts +1 -1
  8. package/lib/lib.es2015.symbol.d.ts +1 -1
  9. package/lib/lib.es2016.array.include.d.ts +1 -1
  10. package/lib/lib.es2016.d.ts +1 -1
  11. package/lib/lib.es2016.full.d.ts +1 -1
  12. package/lib/lib.es2017.full.d.ts +1 -1
  13. package/lib/lib.es2017.intl.d.ts +11 -12
  14. package/lib/lib.es2017.object.d.ts +3 -3
  15. package/lib/lib.es2018.asynciterable.d.ts +1 -1
  16. package/lib/lib.es2018.full.d.ts +1 -1
  17. package/lib/lib.es2018.intl.d.ts +1 -2
  18. package/lib/lib.es2018.promise.d.ts +1 -1
  19. package/lib/lib.es2018.regexp.d.ts +5 -5
  20. package/lib/lib.es2019.array.d.ts +14 -18
  21. package/lib/lib.es2019.intl.d.ts +1 -1
  22. package/lib/lib.es2019.object.d.ts +1 -1
  23. package/lib/lib.es2020.bigint.d.ts +7 -7
  24. package/lib/lib.es2020.date.d.ts +1 -1
  25. package/lib/lib.es2020.intl.d.ts +11 -13
  26. package/lib/lib.es2020.promise.d.ts +1 -1
  27. package/lib/lib.es2021.intl.d.ts +5 -6
  28. package/lib/lib.es2021.promise.d.ts +3 -3
  29. package/lib/lib.es2021.weakref.d.ts +2 -2
  30. package/lib/lib.es2022.error.d.ts +2 -2
  31. package/lib/lib.es2022.intl.d.ts +1 -2
  32. package/lib/lib.es2022.sharedmemory.d.ts +2 -2
  33. package/lib/lib.es2023.array.d.ts +61 -61
  34. package/lib/lib.es5.d.ts +74 -88
  35. package/lib/lib.esnext.disposable.d.ts +10 -10
  36. package/lib/lib.esnext.full.d.ts +1 -1
  37. package/lib/lib.esnext.intl.d.ts +7 -7
  38. package/lib/lib.scripthost.d.ts +1 -4
  39. package/lib/lib.webworker.importscripts.d.ts +0 -1
  40. package/lib/tsc.js +1665 -1711
  41. package/lib/tsserver.js +2302 -2399
  42. package/lib/typesMap.json +2 -2
  43. package/lib/typescript.d.ts +345 -118
  44. package/lib/typescript.js +2696 -2786
  45. package/lib/typingsInstaller.js +163 -214
  46. package/package.json +4 -5
@@ -569,10 +569,7 @@ function getStringComparer(ignoreCase) {
569
569
  return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
570
570
  }
571
571
  var createUIStringComparer = (() => {
572
- let defaultComparer;
573
- let enUSComparer;
574
- const stringComparerFactory = getStringComparerFactory();
575
- return createStringComparer;
572
+ return createIntlCollatorStringComparer;
576
573
  function compareWithCallback(a, b, comparer) {
577
574
  if (a === b)
578
575
  return 0 /* EqualTo */;
@@ -587,41 +584,6 @@ var createUIStringComparer = (() => {
587
584
  const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
588
585
  return (a, b) => compareWithCallback(a, b, comparer);
589
586
  }
590
- function createLocaleCompareStringComparer(locale) {
591
- if (locale !== void 0)
592
- return createFallbackStringComparer();
593
- return (a, b) => compareWithCallback(a, b, compareStrings);
594
- function compareStrings(a, b) {
595
- return a.localeCompare(b);
596
- }
597
- }
598
- function createFallbackStringComparer() {
599
- return (a, b) => compareWithCallback(a, b, compareDictionaryOrder);
600
- function compareDictionaryOrder(a, b) {
601
- return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b);
602
- }
603
- function compareStrings(a, b) {
604
- return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;
605
- }
606
- }
607
- function getStringComparerFactory() {
608
- if (typeof Intl === "object" && typeof Intl.Collator === "function") {
609
- return createIntlCollatorStringComparer;
610
- }
611
- if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) {
612
- return createLocaleCompareStringComparer;
613
- }
614
- return createFallbackStringComparer;
615
- }
616
- function createStringComparer(locale) {
617
- if (locale === void 0) {
618
- return defaultComparer || (defaultComparer = stringComparerFactory(locale));
619
- } else if (locale === "en-US") {
620
- return enUSComparer || (enUSComparer = stringComparerFactory(locale));
621
- } else {
622
- return stringComparerFactory(locale);
623
- }
624
- }
625
587
  })();
626
588
  function getSpellingSuggestion(name, candidates, getName) {
627
589
  const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));
@@ -693,9 +655,6 @@ function endsWith(str, suffix) {
693
655
  const expectedPos = str.length - suffix.length;
694
656
  return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;
695
657
  }
696
- function stringContains(str, substring) {
697
- return str.indexOf(substring) !== -1;
698
- }
699
658
  function removeMinAndVersionNumbers(fileName) {
700
659
  let end = fileName.length;
701
660
  for (let pos = end - 1; pos > 0; pos--) {
@@ -825,21 +784,6 @@ function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, dele
825
784
  }
826
785
  return hasChanges;
827
786
  }
828
- function padLeft(s, length2, padString = " ") {
829
- return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s;
830
- }
831
- var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s));
832
- var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl;
833
- var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, "");
834
- function trimEndImpl(s) {
835
- let end = s.length - 1;
836
- while (end >= 0) {
837
- if (!isWhiteSpaceLike(s.charCodeAt(end)))
838
- break;
839
- end--;
840
- }
841
- return s.slice(0, end + 1);
842
- }
843
787
  function isNodeLikeSystem() {
844
788
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
845
789
  }
@@ -1280,17 +1224,21 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1280
1224
  return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`;
1281
1225
  }
1282
1226
  },
1283
- __debugFlowFlags: { get() {
1284
- return formatEnum(
1285
- this.flags,
1286
- FlowFlags,
1287
- /*isFlags*/
1288
- true
1289
- );
1290
- } },
1291
- __debugToString: { value() {
1292
- return formatControlFlowGraph(this);
1293
- } }
1227
+ __debugFlowFlags: {
1228
+ get() {
1229
+ return formatEnum(
1230
+ this.flags,
1231
+ FlowFlags,
1232
+ /*isFlags*/
1233
+ true
1234
+ );
1235
+ }
1236
+ },
1237
+ __debugToString: {
1238
+ value() {
1239
+ return formatControlFlowGraph(this);
1240
+ }
1241
+ }
1294
1242
  });
1295
1243
  }
1296
1244
  }
@@ -1349,9 +1297,11 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1349
1297
  return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`;
1350
1298
  }
1351
1299
  },
1352
- __debugFlags: { get() {
1353
- return formatSymbolFlags(this.flags);
1354
- } }
1300
+ __debugFlags: {
1301
+ get() {
1302
+ return formatSymbolFlags(this.flags);
1303
+ }
1304
+ }
1355
1305
  });
1356
1306
  Object.defineProperties(objectAllocator.getTypeConstructor().prototype, {
1357
1307
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
@@ -1362,12 +1312,16 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1362
1312
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
1363
1313
  }
1364
1314
  },
1365
- __debugFlags: { get() {
1366
- return formatTypeFlags(this.flags);
1367
- } },
1368
- __debugObjectFlags: { get() {
1369
- return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : "";
1370
- } },
1315
+ __debugFlags: {
1316
+ get() {
1317
+ return formatTypeFlags(this.flags);
1318
+ }
1319
+ },
1320
+ __debugObjectFlags: {
1321
+ get() {
1322
+ return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : "";
1323
+ }
1324
+ },
1371
1325
  __debugTypeToString: {
1372
1326
  value() {
1373
1327
  let text = weakTypeTextMap.get(this);
@@ -1380,13 +1334,17 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1380
1334
  }
1381
1335
  });
1382
1336
  Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, {
1383
- __debugFlags: { get() {
1384
- return formatSignatureFlags(this.flags);
1385
- } },
1386
- __debugSignatureToString: { value() {
1387
- var _a;
1388
- return (_a = this.checker) == null ? void 0 : _a.signatureToString(this);
1389
- } }
1337
+ __debugFlags: {
1338
+ get() {
1339
+ return formatSignatureFlags(this.flags);
1340
+ }
1341
+ },
1342
+ __debugSignatureToString: {
1343
+ value() {
1344
+ var _a;
1345
+ return (_a = this.checker) == null ? void 0 : _a.signatureToString(this);
1346
+ }
1347
+ }
1390
1348
  });
1391
1349
  const nodeConstructors = [
1392
1350
  objectAllocator.getNodeConstructor(),
@@ -1404,24 +1362,36 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1404
1362
  return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`;
1405
1363
  }
1406
1364
  },
1407
- __debugKind: { get() {
1408
- return formatSyntaxKind(this.kind);
1409
- } },
1410
- __debugNodeFlags: { get() {
1411
- return formatNodeFlags(this.flags);
1412
- } },
1413
- __debugModifierFlags: { get() {
1414
- return formatModifierFlags(getEffectiveModifierFlagsNoCache(this));
1415
- } },
1416
- __debugTransformFlags: { get() {
1417
- return formatTransformFlags(this.transformFlags);
1418
- } },
1419
- __debugIsParseTreeNode: { get() {
1420
- return isParseTreeNode(this);
1421
- } },
1422
- __debugEmitFlags: { get() {
1423
- return formatEmitFlags(getEmitFlags(this));
1424
- } },
1365
+ __debugKind: {
1366
+ get() {
1367
+ return formatSyntaxKind(this.kind);
1368
+ }
1369
+ },
1370
+ __debugNodeFlags: {
1371
+ get() {
1372
+ return formatNodeFlags(this.flags);
1373
+ }
1374
+ },
1375
+ __debugModifierFlags: {
1376
+ get() {
1377
+ return formatModifierFlags(getEffectiveModifierFlagsNoCache(this));
1378
+ }
1379
+ },
1380
+ __debugTransformFlags: {
1381
+ get() {
1382
+ return formatTransformFlags(this.transformFlags);
1383
+ }
1384
+ },
1385
+ __debugIsParseTreeNode: {
1386
+ get() {
1387
+ return isParseTreeNode(this);
1388
+ }
1389
+ },
1390
+ __debugEmitFlags: {
1391
+ get() {
1392
+ return formatEmitFlags(getEmitFlags(this));
1393
+ }
1394
+ },
1425
1395
  __debugGetText: {
1426
1396
  value(includeTrivia) {
1427
1397
  if (nodeIsSynthesized(this))
@@ -2001,18 +1971,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i;
2001
1971
  var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;
2002
1972
  function parseRange(text) {
2003
1973
  const alternatives = [];
2004
- for (let range of trimString(text).split(logicalOrRegExp)) {
1974
+ for (let range of text.trim().split(logicalOrRegExp)) {
2005
1975
  if (!range)
2006
1976
  continue;
2007
1977
  const comparators = [];
2008
- range = trimString(range);
1978
+ range = range.trim();
2009
1979
  const match = hyphenRegExp.exec(range);
2010
1980
  if (match) {
2011
1981
  if (!parseHyphen(match[1], match[2], comparators))
2012
1982
  return void 0;
2013
1983
  } else {
2014
1984
  for (const simple of range.split(whitespaceRegExp)) {
2015
- const match2 = rangeRegExp.exec(trimString(simple));
1985
+ const match2 = rangeRegExp.exec(simple.trim());
2016
1986
  if (!match2 || !parseComparator(match2[1], match2[2], comparators))
2017
1987
  return void 0;
2018
1988
  }
@@ -2061,15 +2031,21 @@ function parseComparator(operator, text, comparators) {
2061
2031
  switch (operator) {
2062
2032
  case "~":
2063
2033
  comparators.push(createComparator(">=", version2));
2064
- comparators.push(createComparator("<", version2.increment(
2065
- isWildcard(minor) ? "major" : "minor"
2066
- )));
2034
+ comparators.push(createComparator(
2035
+ "<",
2036
+ version2.increment(
2037
+ isWildcard(minor) ? "major" : "minor"
2038
+ )
2039
+ ));
2067
2040
  break;
2068
2041
  case "^":
2069
2042
  comparators.push(createComparator(">=", version2));
2070
- comparators.push(createComparator("<", version2.increment(
2071
- version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch"
2072
- )));
2043
+ comparators.push(createComparator(
2044
+ "<",
2045
+ version2.increment(
2046
+ version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch"
2047
+ )
2048
+ ));
2073
2049
  break;
2074
2050
  case "<":
2075
2051
  case ">=":
@@ -2265,11 +2241,7 @@ var tracingEnabled;
2265
2241
  const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 };
2266
2242
  fs2.writeSync(
2267
2243
  traceFd,
2268
- "[\n" + [
2269
- { name: "process_name", args: { name: "tsc" }, ...meta },
2270
- { name: "thread_name", args: { name: "Main" }, ...meta },
2271
- { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }
2272
- ].map((v) => JSON.stringify(v)).join(",\n")
2244
+ "[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n")
2273
2245
  );
2274
2246
  }
2275
2247
  tracingEnabled2.startTracing = startTracing2;
@@ -3166,6 +3138,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3166
3138
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
3167
3139
  ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
3168
3140
  ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
3141
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
3169
3142
  ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
3170
3143
  ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
3171
3144
  ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
@@ -3899,11 +3872,11 @@ function createDirectoryWatcherSupportingRecursive({
3899
3872
  return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory);
3900
3873
  }
3901
3874
  function isInPath(path2, searchPath) {
3902
- if (stringContains(path2, searchPath))
3875
+ if (path2.includes(searchPath))
3903
3876
  return true;
3904
3877
  if (useCaseSensitiveFileNames2)
3905
3878
  return false;
3906
- return stringContains(toCanonicalFilePath(path2), searchPath);
3879
+ return toCanonicalFilePath(path2).includes(searchPath);
3907
3880
  }
3908
3881
  }
3909
3882
  function createFileWatcherCallback(callback) {
@@ -4707,7 +4680,9 @@ var sys = (() => {
4707
4680
  })();
4708
4681
  if (sys && sys.getEnvironmentVariable) {
4709
4682
  setCustomPollingValues(sys);
4710
- Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */);
4683
+ Debug.setAssertionLevel(
4684
+ /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */
4685
+ );
4711
4686
  }
4712
4687
  if (sys && sys.debugMode) {
4713
4688
  Debug.isDebugging = true;
@@ -4731,7 +4706,7 @@ function pathIsRelative(path2) {
4731
4706
  return /^\.\.?($|[\\/])/.test(path2);
4732
4707
  }
4733
4708
  function hasExtension(fileName) {
4734
- return stringContains(getBaseFileName(fileName), ".");
4709
+ return getBaseFileName(fileName).includes(".");
4735
4710
  }
4736
4711
  function fileExtensionIs(path2, extension) {
4737
4712
  return path2.length > extension.length && endsWith(path2, extension);
@@ -4876,7 +4851,7 @@ function getPathFromPathComponents(pathComponents2, length2) {
4876
4851
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
4877
4852
  }
4878
4853
  function normalizeSlashes(path2) {
4879
- return path2.indexOf("\\") !== -1 ? path2.replace(backslashRegExp, directorySeparator) : path2;
4854
+ return path2.includes("\\") ? path2.replace(backslashRegExp, directorySeparator) : path2;
4880
4855
  }
4881
4856
  function reducePathComponents(components) {
4882
4857
  if (!some(components))
@@ -6024,9 +5999,9 @@ var Diagnostics = {
6024
5999
  Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
6025
6000
  Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
6026
6001
  Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
6027
- Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
6028
- Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
6029
- Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
6002
+ Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
6003
+ Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
6004
+ Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that transpile to CommonJS 'require' calls."),
6030
6005
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6031
6006
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
6032
6007
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
@@ -8148,7 +8123,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8148
8123
  tokenFlags |= 2048 /* ContainsInvalidEscape */;
8149
8124
  if (shouldEmitInvalidEscapeError) {
8150
8125
  const code = parseInt(text.substring(start2 + 1, pos), 8);
8151
- error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0"));
8126
+ error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0"));
8152
8127
  return String.fromCharCode(code);
8153
8128
  }
8154
8129
  return text.substring(start2, pos);
@@ -8951,7 +8926,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8951
8926
  return token;
8952
8927
  }
8953
8928
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
8954
- const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx);
8929
+ const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
8955
8930
  if (type === void 0) {
8956
8931
  return commentDirectives2;
8957
8932
  }
@@ -9285,20 +9260,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9285
9260
  inJSDocType += inType ? 1 : -1;
9286
9261
  }
9287
9262
  }
9288
- var codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) {
9289
- const size = str.length;
9290
- if (i < 0 || i >= size) {
9291
- return void 0;
9292
- }
9293
- const first2 = str.charCodeAt(i);
9294
- if (first2 >= 55296 && first2 <= 56319 && size > i + 1) {
9295
- const second = str.charCodeAt(i + 1);
9296
- if (second >= 56320 && second <= 57343) {
9297
- return (first2 - 55296) * 1024 + second - 56320 + 65536;
9298
- }
9299
- }
9300
- return first2;
9301
- };
9263
+ function codePointAt(s, i) {
9264
+ return s.codePointAt(i);
9265
+ }
9302
9266
  function charSize(ch) {
9303
9267
  if (ch >= 65536) {
9304
9268
  return 2;
@@ -10125,7 +10089,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) {
10125
10089
  }
10126
10090
  let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);
10127
10091
  if (isJSDocTypeExpressionOrChild(node)) {
10128
- text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n");
10092
+ text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n");
10129
10093
  }
10130
10094
  return text;
10131
10095
  }
@@ -11024,21 +10988,17 @@ function closeFileWatcher(watcher) {
11024
10988
  }
11025
10989
  function getLastChild(node) {
11026
10990
  let lastChild;
11027
- forEachChild(
11028
- node,
11029
- (child) => {
11030
- if (nodeIsPresent(child))
11031
- lastChild = child;
11032
- },
11033
- (children) => {
11034
- for (let i = children.length - 1; i >= 0; i--) {
11035
- if (nodeIsPresent(children[i])) {
11036
- lastChild = children[i];
11037
- break;
11038
- }
10991
+ forEachChild(node, (child) => {
10992
+ if (nodeIsPresent(child))
10993
+ lastChild = child;
10994
+ }, (children) => {
10995
+ for (let i = children.length - 1; i >= 0; i--) {
10996
+ if (nodeIsPresent(children[i])) {
10997
+ lastChild = children[i];
10998
+ break;
11039
10999
  }
11040
11000
  }
11041
- );
11001
+ });
11042
11002
  return lastChild;
11043
11003
  }
11044
11004
  function isTypeNodeKind(kind) {
@@ -18353,9 +18313,9 @@ var Parser;
18353
18313
  /*allowReservedWords*/
18354
18314
  true
18355
18315
  );
18356
- const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length;
18316
+ const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length;
18357
18317
  clearState();
18358
- return isInvalid ? entityName : void 0;
18318
+ return isValid ? entityName : void 0;
18359
18319
  }
18360
18320
  Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
18361
18321
  function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
@@ -21798,7 +21758,9 @@ var Parser;
21798
21758
  let dotDotDotToken;
21799
21759
  let expression;
21800
21760
  if (token() !== 20 /* CloseBraceToken */) {
21801
- dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
21761
+ if (!inExpressionContext) {
21762
+ dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
21763
+ }
21802
21764
  expression = parseExpression();
21803
21765
  }
21804
21766
  if (inExpressionContext) {
@@ -23579,7 +23541,7 @@ var Parser;
23579
23541
  }
23580
23542
  function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
23581
23543
  const namespaceFlag = flags & 32 /* Namespace */;
23582
- const name = parseIdentifier();
23544
+ const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();
23583
23545
  const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
23584
23546
  getNodePos(),
23585
23547
  /*hasJSDoc*/
@@ -24049,8 +24011,6 @@ var Parser;
24049
24011
  PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter";
24050
24012
  })(PropertyLikeParse || (PropertyLikeParse = {}));
24051
24013
  function parseJSDocCommentWorker(start = 0, length2) {
24052
- const saveParsingContext = parsingContext;
24053
- parsingContext |= 1 << 25 /* JSDocComment */;
24054
24014
  const content = sourceText;
24055
24015
  const end = length2 === void 0 ? content.length : start + length2;
24056
24016
  length2 = end - start;
@@ -24067,6 +24027,8 @@ var Parser;
24067
24027
  let commentsPos;
24068
24028
  let comments = [];
24069
24029
  const parts = [];
24030
+ const saveParsingContext = parsingContext;
24031
+ parsingContext |= 1 << 25 /* JSDocComment */;
24070
24032
  const result = scanner.scanRange(start + 3, length2 - 5, doJSDocScan);
24071
24033
  parsingContext = saveParsingContext;
24072
24034
  return result;
@@ -24158,7 +24120,7 @@ var Parser;
24158
24120
  nextTokenJSDoc();
24159
24121
  }
24160
24122
  }
24161
- const trimmedComments = trimStringEnd(comments.join(""));
24123
+ const trimmedComments = comments.join("").trimEnd();
24162
24124
  if (parts.length && trimmedComments.length) {
24163
24125
  parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos));
24164
24126
  }
@@ -24174,7 +24136,7 @@ var Parser;
24174
24136
  }
24175
24137
  function removeTrailingWhitespace(comments2) {
24176
24138
  while (comments2.length) {
24177
- const trimmed = trimStringEnd(comments2[comments2.length - 1]);
24139
+ const trimmed = comments2[comments2.length - 1].trimEnd();
24178
24140
  if (trimmed === "") {
24179
24141
  comments2.pop();
24180
24142
  } else if (trimmed.length < comments2[comments2.length - 1].length) {
@@ -24414,7 +24376,7 @@ var Parser;
24414
24376
  }
24415
24377
  }
24416
24378
  removeLeadingNewlines(comments2);
24417
- const trimmedComments = trimStringEnd(comments2.join(""));
24379
+ const trimmedComments = comments2.join("").trimEnd();
24418
24380
  if (parts2.length) {
24419
24381
  if (trimmedComments.length) {
24420
24382
  parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));
@@ -24979,16 +24941,7 @@ var IncrementalParser;
24979
24941
  Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span));
24980
24942
  Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange)));
24981
24943
  const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length;
24982
- updateTokenPositionsAndMarkElements(
24983
- incrementalSourceFile,
24984
- changeRange.span.start,
24985
- textSpanEnd(changeRange.span),
24986
- textSpanEnd(textChangeRangeNewSpan(changeRange)),
24987
- delta,
24988
- oldText,
24989
- newText,
24990
- aggressiveChecks
24991
- );
24944
+ updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks);
24992
24945
  const result = Parser.parseSourceFile(
24993
24946
  sourceFile.fileName,
24994
24947
  newText,
@@ -25321,7 +25274,7 @@ var IncrementalParser;
25321
25274
  })(InvalidPosition || (InvalidPosition = {}));
25322
25275
  })(IncrementalParser || (IncrementalParser = {}));
25323
25276
  function isDeclarationFileName(fileName) {
25324
- return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d.");
25277
+ return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
25325
25278
  }
25326
25279
  function parseResolutionMode(mode, pos, end, reportDiagnostic) {
25327
25280
  if (!mode) {
@@ -25507,7 +25460,7 @@ function getNamedPragmaArguments(pragma, text) {
25507
25460
  return {};
25508
25461
  if (!pragma.args)
25509
25462
  return {};
25510
- const args = trimString(text).split(/\s+/);
25463
+ const args = text.trim().split(/\s+/);
25511
25464
  const argMap = {};
25512
25465
  for (let i = 0; i < pragma.args.length; i++) {
25513
25466
  const argument = pragma.args[i];
@@ -27846,7 +27799,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
27846
27799
  result = tryResolve(extensions, state);
27847
27800
  }
27848
27801
  let legacyResult;
27849
- if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) {
27802
+ if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.includes("import")) {
27850
27803
  traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
27851
27804
  const diagnosticState = {
27852
27805
  ...state,
@@ -27890,7 +27843,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
27890
27843
  resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
27891
27844
  }
27892
27845
  if (!resolved2) {
27893
- if (moduleName.indexOf(":") > -1) {
27846
+ if (moduleName.includes(":")) {
27894
27847
  if (traceEnabled) {
27895
27848
  trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
27896
27849
  }
@@ -27935,7 +27888,6 @@ function realPath(path2, host, traceEnabled) {
27935
27888
  if (traceEnabled) {
27936
27889
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path2, real);
27937
27890
  }
27938
- Debug.assert(host.fileExists(real), `${path2} linked to nonexistent file ${real}`);
27939
27891
  return real;
27940
27892
  }
27941
27893
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -27980,7 +27932,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
27980
27932
  }
27981
27933
  var nodeModulesPathPart = "/node_modules/";
27982
27934
  function pathContainsNodeModules(path2) {
27983
- return stringContains(path2, nodeModulesPathPart);
27935
+ return path2.includes(nodeModulesPathPart);
27984
27936
  }
27985
27937
  function parseNodeModuleFromPath(resolved, isFolder) {
27986
27938
  const path2 = normalizePath(resolved);
@@ -28016,7 +27968,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
28016
27968
  }
28017
27969
  function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
28018
27970
  const filename = getBaseFileName(candidate);
28019
- if (filename.indexOf(".") === -1) {
27971
+ if (!filename.includes(".")) {
28020
27972
  return void 0;
28021
27973
  }
28022
27974
  let extensionless = removeFileExtension(candidate);
@@ -28424,7 +28376,7 @@ function comparePatternKeys(a, b) {
28424
28376
  }
28425
28377
  function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
28426
28378
  const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
28427
- if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) {
28379
+ if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
28428
28380
  const target = lookupTable[moduleName];
28429
28381
  return loadModuleFromTargetImportOrExport(
28430
28382
  target,
@@ -28435,7 +28387,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe
28435
28387
  moduleName
28436
28388
  );
28437
28389
  }
28438
- const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys);
28390
+ const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
28439
28391
  for (const potentialTarget of expandingKeys) {
28440
28392
  if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
28441
28393
  const target = lookupTable[potentialTarget];
@@ -28509,13 +28461,15 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28509
28461
  false,
28510
28462
  redirectedReference
28511
28463
  );
28512
- return toSearchResult(result.resolvedModule ? {
28513
- path: result.resolvedModule.resolvedFileName,
28514
- extension: result.resolvedModule.extension,
28515
- packageId: result.resolvedModule.packageId,
28516
- originalPath: result.resolvedModule.originalPath,
28517
- resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension
28518
- } : void 0);
28464
+ return toSearchResult(
28465
+ result.resolvedModule ? {
28466
+ path: result.resolvedModule.resolvedFileName,
28467
+ extension: result.resolvedModule.extension,
28468
+ packageId: result.resolvedModule.packageId,
28469
+ originalPath: result.resolvedModule.originalPath,
28470
+ resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension
28471
+ } : void 0
28472
+ );
28519
28473
  }
28520
28474
  if (state.traceEnabled) {
28521
28475
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
@@ -28527,7 +28481,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28527
28481
  }
28528
28482
  const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
28529
28483
  const partsAfterFirst = parts.slice(1);
28530
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
28484
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
28531
28485
  if (state.traceEnabled) {
28532
28486
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
28533
28487
  }
@@ -28538,7 +28492,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28538
28492
  }
28539
28493
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
28540
28494
  const subpathParts = getPathComponents(subpath);
28541
- if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
28495
+ if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
28542
28496
  if (state.traceEnabled) {
28543
28497
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
28544
28498
  }
@@ -28548,13 +28502,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28548
28502
  );
28549
28503
  }
28550
28504
  if (state.traceEnabled) {
28551
- trace(
28552
- state.host,
28553
- Diagnostics.Using_0_subpath_1_with_target_2,
28554
- isImports ? "imports" : "exports",
28555
- key,
28556
- pattern ? target.replace(/\*/g, subpath) : target + subpath
28557
- );
28505
+ trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath);
28558
28506
  }
28559
28507
  const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
28560
28508
  const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports);
@@ -28571,7 +28519,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28571
28519
  if (!Array.isArray(target)) {
28572
28520
  traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
28573
28521
  for (const condition of getOwnKeys(target)) {
28574
- if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) {
28522
+ if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
28575
28523
  traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
28576
28524
  const subTarget = target[condition];
28577
28525
  const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
@@ -28632,7 +28580,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28632
28580
  }
28633
28581
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
28634
28582
  var _a, _b, _c, _d;
28635
- if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
28583
+ if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
28636
28584
  const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
28637
28585
  const commonSourceDirGuesses = [];
28638
28586
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
@@ -28706,7 +28654,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28706
28654
  }
28707
28655
  }
28708
28656
  function isApplicableVersionedTypesKey(conditions, key) {
28709
- if (conditions.indexOf("types") === -1)
28657
+ if (!conditions.includes("types"))
28710
28658
  return false;
28711
28659
  if (!startsWith(key, "types@"))
28712
28660
  return false;
@@ -31093,13 +31041,16 @@ var BuilderState;
31093
31041
  sourceFile,
31094
31042
  (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
31095
31043
  Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);
31096
- onNewSignature(computeSignatureWithDiagnostics(
31097
- programOfThisState,
31098
- sourceFile,
31099
- text,
31100
- host,
31101
- data
31102
- ), sourceFiles);
31044
+ onNewSignature(
31045
+ computeSignatureWithDiagnostics(
31046
+ programOfThisState,
31047
+ sourceFile,
31048
+ text,
31049
+ host,
31050
+ data
31051
+ ),
31052
+ sourceFiles
31053
+ );
31103
31054
  },
31104
31055
  cancellationToken,
31105
31056
  /*emitOnly*/
@@ -31282,9 +31233,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data)
31282
31233
  text = getTextHandlingSourceMapForSignature(text, data);
31283
31234
  let sourceFileDirectory;
31284
31235
  if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) {
31285
- text += data.diagnostics.map(
31286
- (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`
31287
- ).join("\n");
31236
+ text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n");
31288
31237
  }
31289
31238
  return (host.createHash ?? generateDjb2Hash)(text);
31290
31239
  function flattenDiagnosticMessageText2(diagnostic) {
@@ -31653,7 +31602,7 @@ var Arguments;
31653
31602
  Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation";
31654
31603
  })(Arguments || (Arguments = {}));
31655
31604
  function hasArgument(argumentName) {
31656
- return sys.args.indexOf(argumentName) >= 0;
31605
+ return sys.args.includes(argumentName);
31657
31606
  }
31658
31607
  function findArgument(argumentName) {
31659
31608
  const index = sys.args.indexOf(argumentName);
@@ -31661,7 +31610,7 @@ function findArgument(argumentName) {
31661
31610
  }
31662
31611
  function nowString() {
31663
31612
  const d = /* @__PURE__ */ new Date();
31664
- return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`;
31613
+ return `${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}.${d.getMilliseconds().toString().padStart(3, "0")}`;
31665
31614
  }
31666
31615
 
31667
31616
  // src/typingsInstallerCore/typingsInstaller.ts
@@ -32080,7 +32029,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
32080
32029
  log2
32081
32030
  );
32082
32031
  this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
32083
- if (stringContains(this.npmPath, " ") && this.npmPath[0] !== `"`) {
32032
+ if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
32084
32033
  this.npmPath = `"${this.npmPath}"`;
32085
32034
  }
32086
32035
  if (this.log.isEnabled()) {