@typescript-deploys/pr-build 5.3.0-pr-55278-2 → 5.3.0-pr-55714-7

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 +77 -91
  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 +1545 -1673
  41. package/lib/tsserver.js +2182 -2361
  42. package/lib/typesMap.json +2 -2
  43. package/lib/typescript.d.ts +345 -118
  44. package/lib/typescript.js +2576 -2748
  45. package/lib/typingsInstaller.js +162 -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;
@@ -3899,11 +3871,11 @@ function createDirectoryWatcherSupportingRecursive({
3899
3871
  return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory);
3900
3872
  }
3901
3873
  function isInPath(path2, searchPath) {
3902
- if (stringContains(path2, searchPath))
3874
+ if (path2.includes(searchPath))
3903
3875
  return true;
3904
3876
  if (useCaseSensitiveFileNames2)
3905
3877
  return false;
3906
- return stringContains(toCanonicalFilePath(path2), searchPath);
3878
+ return toCanonicalFilePath(path2).includes(searchPath);
3907
3879
  }
3908
3880
  }
3909
3881
  function createFileWatcherCallback(callback) {
@@ -4707,7 +4679,9 @@ var sys = (() => {
4707
4679
  })();
4708
4680
  if (sys && sys.getEnvironmentVariable) {
4709
4681
  setCustomPollingValues(sys);
4710
- Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */);
4682
+ Debug.setAssertionLevel(
4683
+ /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */
4684
+ );
4711
4685
  }
4712
4686
  if (sys && sys.debugMode) {
4713
4687
  Debug.isDebugging = true;
@@ -4731,7 +4705,7 @@ function pathIsRelative(path2) {
4731
4705
  return /^\.\.?($|[\\/])/.test(path2);
4732
4706
  }
4733
4707
  function hasExtension(fileName) {
4734
- return stringContains(getBaseFileName(fileName), ".");
4708
+ return getBaseFileName(fileName).includes(".");
4735
4709
  }
4736
4710
  function fileExtensionIs(path2, extension) {
4737
4711
  return path2.length > extension.length && endsWith(path2, extension);
@@ -4876,7 +4850,7 @@ function getPathFromPathComponents(pathComponents2, length2) {
4876
4850
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
4877
4851
  }
4878
4852
  function normalizeSlashes(path2) {
4879
- return path2.indexOf("\\") !== -1 ? path2.replace(backslashRegExp, directorySeparator) : path2;
4853
+ return path2.includes("\\") ? path2.replace(backslashRegExp, directorySeparator) : path2;
4880
4854
  }
4881
4855
  function reducePathComponents(components) {
4882
4856
  if (!some(components))
@@ -6024,9 +5998,9 @@ var Diagnostics = {
6024
5998
  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
5999
  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
6000
  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."),
6001
+ 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."),
6002
+ 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}'?"),
6003
+ 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
6004
  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
6005
  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
6006
  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 +8122,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8148
8122
  tokenFlags |= 2048 /* ContainsInvalidEscape */;
8149
8123
  if (shouldEmitInvalidEscapeError) {
8150
8124
  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"));
8125
+ error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0"));
8152
8126
  return String.fromCharCode(code);
8153
8127
  }
8154
8128
  return text.substring(start2, pos);
@@ -8951,7 +8925,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8951
8925
  return token;
8952
8926
  }
8953
8927
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
8954
- const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx);
8928
+ const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
8955
8929
  if (type === void 0) {
8956
8930
  return commentDirectives2;
8957
8931
  }
@@ -9285,20 +9259,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9285
9259
  inJSDocType += inType ? 1 : -1;
9286
9260
  }
9287
9261
  }
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
- };
9262
+ function codePointAt(s, i) {
9263
+ return s.codePointAt(i);
9264
+ }
9302
9265
  function charSize(ch) {
9303
9266
  if (ch >= 65536) {
9304
9267
  return 2;
@@ -10125,7 +10088,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) {
10125
10088
  }
10126
10089
  let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);
10127
10090
  if (isJSDocTypeExpressionOrChild(node)) {
10128
- text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n");
10091
+ text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n");
10129
10092
  }
10130
10093
  return text;
10131
10094
  }
@@ -11024,21 +10987,17 @@ function closeFileWatcher(watcher) {
11024
10987
  }
11025
10988
  function getLastChild(node) {
11026
10989
  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
- }
10990
+ forEachChild(node, (child) => {
10991
+ if (nodeIsPresent(child))
10992
+ lastChild = child;
10993
+ }, (children) => {
10994
+ for (let i = children.length - 1; i >= 0; i--) {
10995
+ if (nodeIsPresent(children[i])) {
10996
+ lastChild = children[i];
10997
+ break;
11039
10998
  }
11040
10999
  }
11041
- );
11000
+ });
11042
11001
  return lastChild;
11043
11002
  }
11044
11003
  function isTypeNodeKind(kind) {
@@ -18353,9 +18312,9 @@ var Parser;
18353
18312
  /*allowReservedWords*/
18354
18313
  true
18355
18314
  );
18356
- const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length;
18315
+ const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length;
18357
18316
  clearState();
18358
- return isInvalid ? entityName : void 0;
18317
+ return isValid ? entityName : void 0;
18359
18318
  }
18360
18319
  Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
18361
18320
  function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) {
@@ -21798,7 +21757,9 @@ var Parser;
21798
21757
  let dotDotDotToken;
21799
21758
  let expression;
21800
21759
  if (token() !== 20 /* CloseBraceToken */) {
21801
- dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
21760
+ if (!inExpressionContext) {
21761
+ dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
21762
+ }
21802
21763
  expression = parseExpression();
21803
21764
  }
21804
21765
  if (inExpressionContext) {
@@ -23579,7 +23540,7 @@ var Parser;
23579
23540
  }
23580
23541
  function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
23581
23542
  const namespaceFlag = flags & 32 /* Namespace */;
23582
- const name = parseIdentifier();
23543
+ const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();
23583
23544
  const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
23584
23545
  getNodePos(),
23585
23546
  /*hasJSDoc*/
@@ -24049,8 +24010,6 @@ var Parser;
24049
24010
  PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter";
24050
24011
  })(PropertyLikeParse || (PropertyLikeParse = {}));
24051
24012
  function parseJSDocCommentWorker(start = 0, length2) {
24052
- const saveParsingContext = parsingContext;
24053
- parsingContext |= 1 << 25 /* JSDocComment */;
24054
24013
  const content = sourceText;
24055
24014
  const end = length2 === void 0 ? content.length : start + length2;
24056
24015
  length2 = end - start;
@@ -24067,6 +24026,8 @@ var Parser;
24067
24026
  let commentsPos;
24068
24027
  let comments = [];
24069
24028
  const parts = [];
24029
+ const saveParsingContext = parsingContext;
24030
+ parsingContext |= 1 << 25 /* JSDocComment */;
24070
24031
  const result = scanner.scanRange(start + 3, length2 - 5, doJSDocScan);
24071
24032
  parsingContext = saveParsingContext;
24072
24033
  return result;
@@ -24158,7 +24119,7 @@ var Parser;
24158
24119
  nextTokenJSDoc();
24159
24120
  }
24160
24121
  }
24161
- const trimmedComments = trimStringEnd(comments.join(""));
24122
+ const trimmedComments = comments.join("").trimEnd();
24162
24123
  if (parts.length && trimmedComments.length) {
24163
24124
  parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos));
24164
24125
  }
@@ -24174,7 +24135,7 @@ var Parser;
24174
24135
  }
24175
24136
  function removeTrailingWhitespace(comments2) {
24176
24137
  while (comments2.length) {
24177
- const trimmed = trimStringEnd(comments2[comments2.length - 1]);
24138
+ const trimmed = comments2[comments2.length - 1].trimEnd();
24178
24139
  if (trimmed === "") {
24179
24140
  comments2.pop();
24180
24141
  } else if (trimmed.length < comments2[comments2.length - 1].length) {
@@ -24414,7 +24375,7 @@ var Parser;
24414
24375
  }
24415
24376
  }
24416
24377
  removeLeadingNewlines(comments2);
24417
- const trimmedComments = trimStringEnd(comments2.join(""));
24378
+ const trimmedComments = comments2.join("").trimEnd();
24418
24379
  if (parts2.length) {
24419
24380
  if (trimmedComments.length) {
24420
24381
  parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));
@@ -24979,16 +24940,7 @@ var IncrementalParser;
24979
24940
  Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span));
24980
24941
  Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange)));
24981
24942
  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
- );
24943
+ updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks);
24992
24944
  const result = Parser.parseSourceFile(
24993
24945
  sourceFile.fileName,
24994
24946
  newText,
@@ -25321,7 +25273,7 @@ var IncrementalParser;
25321
25273
  })(InvalidPosition || (InvalidPosition = {}));
25322
25274
  })(IncrementalParser || (IncrementalParser = {}));
25323
25275
  function isDeclarationFileName(fileName) {
25324
- return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d.");
25276
+ return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
25325
25277
  }
25326
25278
  function parseResolutionMode(mode, pos, end, reportDiagnostic) {
25327
25279
  if (!mode) {
@@ -25507,7 +25459,7 @@ function getNamedPragmaArguments(pragma, text) {
25507
25459
  return {};
25508
25460
  if (!pragma.args)
25509
25461
  return {};
25510
- const args = trimString(text).split(/\s+/);
25462
+ const args = text.trim().split(/\s+/);
25511
25463
  const argMap = {};
25512
25464
  for (let i = 0; i < pragma.args.length; i++) {
25513
25465
  const argument = pragma.args[i];
@@ -27846,7 +27798,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
27846
27798
  result = tryResolve(extensions, state);
27847
27799
  }
27848
27800
  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) {
27801
+ 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
27802
  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
27803
  const diagnosticState = {
27852
27804
  ...state,
@@ -27890,7 +27842,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
27890
27842
  resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
27891
27843
  }
27892
27844
  if (!resolved2) {
27893
- if (moduleName.indexOf(":") > -1) {
27845
+ if (moduleName.includes(":")) {
27894
27846
  if (traceEnabled) {
27895
27847
  trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
27896
27848
  }
@@ -27935,7 +27887,6 @@ function realPath(path2, host, traceEnabled) {
27935
27887
  if (traceEnabled) {
27936
27888
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path2, real);
27937
27889
  }
27938
- Debug.assert(host.fileExists(real), `${path2} linked to nonexistent file ${real}`);
27939
27890
  return real;
27940
27891
  }
27941
27892
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -27980,7 +27931,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
27980
27931
  }
27981
27932
  var nodeModulesPathPart = "/node_modules/";
27982
27933
  function pathContainsNodeModules(path2) {
27983
- return stringContains(path2, nodeModulesPathPart);
27934
+ return path2.includes(nodeModulesPathPart);
27984
27935
  }
27985
27936
  function parseNodeModuleFromPath(resolved, isFolder) {
27986
27937
  const path2 = normalizePath(resolved);
@@ -28016,7 +27967,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
28016
27967
  }
28017
27968
  function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
28018
27969
  const filename = getBaseFileName(candidate);
28019
- if (filename.indexOf(".") === -1) {
27970
+ if (!filename.includes(".")) {
28020
27971
  return void 0;
28021
27972
  }
28022
27973
  let extensionless = removeFileExtension(candidate);
@@ -28424,7 +28375,7 @@ function comparePatternKeys(a, b) {
28424
28375
  }
28425
28376
  function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
28426
28377
  const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
28427
- if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) {
28378
+ if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
28428
28379
  const target = lookupTable[moduleName];
28429
28380
  return loadModuleFromTargetImportOrExport(
28430
28381
  target,
@@ -28435,7 +28386,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe
28435
28386
  moduleName
28436
28387
  );
28437
28388
  }
28438
- const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys);
28389
+ const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
28439
28390
  for (const potentialTarget of expandingKeys) {
28440
28391
  if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
28441
28392
  const target = lookupTable[potentialTarget];
@@ -28509,13 +28460,15 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28509
28460
  false,
28510
28461
  redirectedReference
28511
28462
  );
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);
28463
+ return toSearchResult(
28464
+ result.resolvedModule ? {
28465
+ path: result.resolvedModule.resolvedFileName,
28466
+ extension: result.resolvedModule.extension,
28467
+ packageId: result.resolvedModule.packageId,
28468
+ originalPath: result.resolvedModule.originalPath,
28469
+ resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension
28470
+ } : void 0
28471
+ );
28519
28472
  }
28520
28473
  if (state.traceEnabled) {
28521
28474
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
@@ -28527,7 +28480,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28527
28480
  }
28528
28481
  const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
28529
28482
  const partsAfterFirst = parts.slice(1);
28530
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
28483
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
28531
28484
  if (state.traceEnabled) {
28532
28485
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
28533
28486
  }
@@ -28538,7 +28491,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28538
28491
  }
28539
28492
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
28540
28493
  const subpathParts = getPathComponents(subpath);
28541
- if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
28494
+ if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
28542
28495
  if (state.traceEnabled) {
28543
28496
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
28544
28497
  }
@@ -28548,13 +28501,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28548
28501
  );
28549
28502
  }
28550
28503
  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
- );
28504
+ trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath);
28558
28505
  }
28559
28506
  const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
28560
28507
  const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports);
@@ -28571,7 +28518,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28571
28518
  if (!Array.isArray(target)) {
28572
28519
  traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
28573
28520
  for (const condition of getOwnKeys(target)) {
28574
- if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) {
28521
+ if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
28575
28522
  traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
28576
28523
  const subTarget = target[condition];
28577
28524
  const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
@@ -28632,7 +28579,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28632
28579
  }
28633
28580
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
28634
28581
  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)) {
28582
+ 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
28583
  const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
28637
28584
  const commonSourceDirGuesses = [];
28638
28585
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
@@ -28706,7 +28653,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
28706
28653
  }
28707
28654
  }
28708
28655
  function isApplicableVersionedTypesKey(conditions, key) {
28709
- if (conditions.indexOf("types") === -1)
28656
+ if (!conditions.includes("types"))
28710
28657
  return false;
28711
28658
  if (!startsWith(key, "types@"))
28712
28659
  return false;
@@ -31093,13 +31040,16 @@ var BuilderState;
31093
31040
  sourceFile,
31094
31041
  (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
31095
31042
  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);
31043
+ onNewSignature(
31044
+ computeSignatureWithDiagnostics(
31045
+ programOfThisState,
31046
+ sourceFile,
31047
+ text,
31048
+ host,
31049
+ data
31050
+ ),
31051
+ sourceFiles
31052
+ );
31103
31053
  },
31104
31054
  cancellationToken,
31105
31055
  /*emitOnly*/
@@ -31282,9 +31232,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data)
31282
31232
  text = getTextHandlingSourceMapForSignature(text, data);
31283
31233
  let sourceFileDirectory;
31284
31234
  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");
31235
+ text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n");
31288
31236
  }
31289
31237
  return (host.createHash ?? generateDjb2Hash)(text);
31290
31238
  function flattenDiagnosticMessageText2(diagnostic) {
@@ -31653,7 +31601,7 @@ var Arguments;
31653
31601
  Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation";
31654
31602
  })(Arguments || (Arguments = {}));
31655
31603
  function hasArgument(argumentName) {
31656
- return sys.args.indexOf(argumentName) >= 0;
31604
+ return sys.args.includes(argumentName);
31657
31605
  }
31658
31606
  function findArgument(argumentName) {
31659
31607
  const index = sys.args.indexOf(argumentName);
@@ -31661,7 +31609,7 @@ function findArgument(argumentName) {
31661
31609
  }
31662
31610
  function nowString() {
31663
31611
  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")}`;
31612
+ 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
31613
  }
31666
31614
 
31667
31615
  // src/typingsInstallerCore/typingsInstaller.ts
@@ -32080,7 +32028,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
32080
32028
  log2
32081
32029
  );
32082
32030
  this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
32083
- if (stringContains(this.npmPath, " ") && this.npmPath[0] !== `"`) {
32031
+ if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
32084
32032
  this.npmPath = `"${this.npmPath}"`;
32085
32033
  }
32086
32034
  if (this.log.isEnabled()) {