@typescript-deploys/pr-build 5.3.0-pr-55452-7 → 5.3.0-pr-55438-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230825`;
38
+ version = `${versionMajorMinor}.0-insiders.20230829`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1398,9 +1398,6 @@ var ts = (() => {
1398
1398
  function tryRemoveSuffix(str, suffix) {
1399
1399
  return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0;
1400
1400
  }
1401
- function stringContains(str, substring) {
1402
- return str.indexOf(substring) !== -1;
1403
- }
1404
1401
  function removeMinAndVersionNumbers(fileName) {
1405
1402
  let end = fileName.length;
1406
1403
  for (let pos = end - 1; pos > 0; pos--) {
@@ -1583,12 +1580,6 @@ var ts = (() => {
1583
1580
  }
1584
1581
  }
1585
1582
  }
1586
- function padLeft(s, length2, padString = " ") {
1587
- return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s;
1588
- }
1589
- function padRight(s, length2, padString = " ") {
1590
- return length2 <= s.length ? s : s + padString.repeat(length2 - s.length);
1591
- }
1592
1583
  function takeWhile(array, predicate) {
1593
1584
  if (array) {
1594
1585
  const len = array.length;
@@ -1609,19 +1600,10 @@ var ts = (() => {
1609
1600
  return array.slice(index);
1610
1601
  }
1611
1602
  }
1612
- function trimEndImpl(s) {
1613
- let end = s.length - 1;
1614
- while (end >= 0) {
1615
- if (!isWhiteSpaceLike(s.charCodeAt(end)))
1616
- break;
1617
- end--;
1618
- }
1619
- return s.slice(0, end + 1);
1620
- }
1621
1603
  function isNodeLikeSystem() {
1622
1604
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
1623
1605
  }
1624
- var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
1606
+ var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale;
1625
1607
  var init_core = __esm({
1626
1608
  "src/compiler/core.ts"() {
1627
1609
  "use strict";
@@ -1655,10 +1637,7 @@ var ts = (() => {
1655
1637
  return AssertionLevel2;
1656
1638
  })(AssertionLevel || {});
1657
1639
  createUIStringComparer = (() => {
1658
- let defaultComparer;
1659
- let enUSComparer;
1660
- const stringComparerFactory = getStringComparerFactory();
1661
- return createStringComparer;
1640
+ return createIntlCollatorStringComparer;
1662
1641
  function compareWithCallback(a, b, comparer) {
1663
1642
  if (a === b)
1664
1643
  return 0 /* EqualTo */;
@@ -1673,45 +1652,7 @@ var ts = (() => {
1673
1652
  const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
1674
1653
  return (a, b) => compareWithCallback(a, b, comparer);
1675
1654
  }
1676
- function createLocaleCompareStringComparer(locale) {
1677
- if (locale !== void 0)
1678
- return createFallbackStringComparer();
1679
- return (a, b) => compareWithCallback(a, b, compareStrings);
1680
- function compareStrings(a, b) {
1681
- return a.localeCompare(b);
1682
- }
1683
- }
1684
- function createFallbackStringComparer() {
1685
- return (a, b) => compareWithCallback(a, b, compareDictionaryOrder);
1686
- function compareDictionaryOrder(a, b) {
1687
- return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b);
1688
- }
1689
- function compareStrings(a, b) {
1690
- return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;
1691
- }
1692
- }
1693
- function getStringComparerFactory() {
1694
- if (typeof Intl === "object" && typeof Intl.Collator === "function") {
1695
- return createIntlCollatorStringComparer;
1696
- }
1697
- if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) {
1698
- return createLocaleCompareStringComparer;
1699
- }
1700
- return createFallbackStringComparer;
1701
- }
1702
- function createStringComparer(locale) {
1703
- if (locale === void 0) {
1704
- return defaultComparer || (defaultComparer = stringComparerFactory(locale));
1705
- } else if (locale === "en-US") {
1706
- return enUSComparer || (enUSComparer = stringComparerFactory(locale));
1707
- } else {
1708
- return stringComparerFactory(locale);
1709
- }
1710
- }
1711
1655
  })();
1712
- trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s));
1713
- trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl;
1714
- trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, "");
1715
1656
  }
1716
1657
  });
1717
1658
 
@@ -2810,18 +2751,18 @@ ${lanes.join("\n")}
2810
2751
  }
2811
2752
  function parseRange(text) {
2812
2753
  const alternatives = [];
2813
- for (let range of trimString(text).split(logicalOrRegExp)) {
2754
+ for (let range of text.trim().split(logicalOrRegExp)) {
2814
2755
  if (!range)
2815
2756
  continue;
2816
2757
  const comparators = [];
2817
- range = trimString(range);
2758
+ range = range.trim();
2818
2759
  const match = hyphenRegExp.exec(range);
2819
2760
  if (match) {
2820
2761
  if (!parseHyphen(match[1], match[2], comparators))
2821
2762
  return void 0;
2822
2763
  } else {
2823
2764
  for (const simple of range.split(whitespaceRegExp)) {
2824
- const match2 = rangeRegExp.exec(trimString(simple));
2765
+ const match2 = rangeRegExp.exec(simple.trim());
2825
2766
  if (!match2 || !parseComparator(match2[1], match2[2], comparators))
2826
2767
  return void 0;
2827
2768
  }
@@ -5765,11 +5706,11 @@ ${lanes.join("\n")}
5765
5706
  return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
5766
5707
  }
5767
5708
  function isInPath(path, searchPath) {
5768
- if (stringContains(path, searchPath))
5709
+ if (path.includes(searchPath))
5769
5710
  return true;
5770
5711
  if (useCaseSensitiveFileNames2)
5771
5712
  return false;
5772
- return stringContains(toCanonicalFilePath(path), searchPath);
5713
+ return toCanonicalFilePath(path).includes(searchPath);
5773
5714
  }
5774
5715
  }
5775
5716
  function createFileWatcherCallback(callback) {
@@ -6638,7 +6579,7 @@ ${lanes.join("\n")}
6638
6579
  return !pathIsAbsolute(path) && !pathIsRelative(path);
6639
6580
  }
6640
6581
  function hasExtension(fileName) {
6641
- return stringContains(getBaseFileName(fileName), ".");
6582
+ return getBaseFileName(fileName).includes(".");
6642
6583
  }
6643
6584
  function fileExtensionIs(path, extension) {
6644
6585
  return path.length > extension.length && endsWith(path, extension);
@@ -6783,7 +6724,7 @@ ${lanes.join("\n")}
6783
6724
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
6784
6725
  }
6785
6726
  function normalizeSlashes(path) {
6786
- return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path;
6727
+ return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path;
6787
6728
  }
6788
6729
  function reducePathComponents(components) {
6789
6730
  if (!some(components))
@@ -10025,7 +9966,7 @@ ${lanes.join("\n")}
10025
9966
  tokenFlags |= 2048 /* ContainsInvalidEscape */;
10026
9967
  if (shouldEmitInvalidEscapeError) {
10027
9968
  const code = parseInt(text.substring(start2 + 1, pos), 8);
10028
- error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0"));
9969
+ error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0"));
10029
9970
  return String.fromCharCode(code);
10030
9971
  }
10031
9972
  return text.substring(start2, pos);
@@ -10828,7 +10769,7 @@ ${lanes.join("\n")}
10828
10769
  return token;
10829
10770
  }
10830
10771
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
10831
- const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx);
10772
+ const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
10832
10773
  if (type === void 0) {
10833
10774
  return commentDirectives2;
10834
10775
  }
@@ -11162,6 +11103,9 @@ ${lanes.join("\n")}
11162
11103
  inJSDocType += inType ? 1 : -1;
11163
11104
  }
11164
11105
  }
11106
+ function codePointAt(s, i) {
11107
+ return s.codePointAt(i);
11108
+ }
11165
11109
  function charSize(ch) {
11166
11110
  if (ch >= 65536) {
11167
11111
  return 2;
@@ -11180,7 +11124,7 @@ ${lanes.join("\n")}
11180
11124
  function utf16EncodeAsString(codePoint) {
11181
11125
  return utf16EncodeAsStringWorker(codePoint);
11182
11126
  }
11183
- var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, codePointAt, utf16EncodeAsStringWorker;
11127
+ var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker;
11184
11128
  var init_scanner = __esm({
11185
11129
  "src/compiler/scanner.ts"() {
11186
11130
  "use strict";
@@ -11346,20 +11290,6 @@ ${lanes.join("\n")}
11346
11290
  tokenStrings = makeReverseMap(textToToken);
11347
11291
  mergeConflictMarkerLength = "<<<<<<<".length;
11348
11292
  shebangTriviaRegex = /^#!.*/;
11349
- codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) {
11350
- const size = str.length;
11351
- if (i < 0 || i >= size) {
11352
- return void 0;
11353
- }
11354
- const first2 = str.charCodeAt(i);
11355
- if (first2 >= 55296 && first2 <= 56319 && size > i + 1) {
11356
- const second = str.charCodeAt(i + 1);
11357
- if (second >= 56320 && second <= 57343) {
11358
- return (first2 - 55296) * 1024 + second - 56320 + 65536;
11359
- }
11360
- }
11361
- return first2;
11362
- };
11363
11293
  utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback;
11364
11294
  }
11365
11295
  });
@@ -13032,7 +12962,7 @@ ${lanes.join("\n")}
13032
12962
  void 0,
13033
12963
  Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
13034
12964
  node10Result,
13035
- node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName
12965
+ node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName
13036
12966
  ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages(
13037
12967
  /*details*/
13038
12968
  void 0,
@@ -13308,7 +13238,7 @@ ${lanes.join("\n")}
13308
13238
  }
13309
13239
  let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);
13310
13240
  if (isJSDocTypeExpressionOrChild(node)) {
13311
- text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n");
13241
+ text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n");
13312
13242
  }
13313
13243
  return text;
13314
13244
  }
@@ -16053,7 +15983,7 @@ ${lanes.join("\n")}
16053
15983
  }
16054
15984
  function isIntrinsicJsxName(name) {
16055
15985
  const ch = name.charCodeAt(0);
16056
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
15986
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-");
16057
15987
  }
16058
15988
  function getIndentString(level) {
16059
15989
  const singleLevel = indentStrings[1];
@@ -16066,7 +15996,7 @@ ${lanes.join("\n")}
16066
15996
  return indentStrings[1].length;
16067
15997
  }
16068
15998
  function isNightly() {
16069
- return stringContains(version, "-dev") || stringContains(version, "-insiders");
15999
+ return version.includes("-dev") || version.includes("-insiders");
16070
16000
  }
16071
16001
  function createTextWriter(newLine) {
16072
16002
  var output;
@@ -16256,7 +16186,7 @@ ${lanes.join("\n")}
16256
16186
  return void 0;
16257
16187
  }
16258
16188
  const specifier = getExternalModuleName(declaration);
16259
- if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) {
16189
+ if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) {
16260
16190
  return void 0;
16261
16191
  }
16262
16192
  return getResolvedExternalModuleName(host, file);
@@ -16608,7 +16538,7 @@ ${lanes.join("\n")}
16608
16538
  }
16609
16539
  function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) {
16610
16540
  const end = Math.min(commentEnd, nextLineStart - 1);
16611
- const currentLineText = trimString(text.substring(pos, end));
16541
+ const currentLineText = text.substring(pos, end).trim();
16612
16542
  if (currentLineText) {
16613
16543
  writer.writeComment(currentLineText);
16614
16544
  if (end !== commentEnd) {
@@ -18196,7 +18126,7 @@ ${lanes.join("\n")}
18196
18126
  const flatBuiltins = flatten(builtins);
18197
18127
  const extensions = [
18198
18128
  ...builtins,
18199
- ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0)
18129
+ ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0)
18200
18130
  ];
18201
18131
  return extensions;
18202
18132
  }
@@ -18646,7 +18576,7 @@ ${lanes.join("\n")}
18646
18576
  }
18647
18577
  }
18648
18578
  function containsIgnoredPath(path) {
18649
- return some(ignoredPaths, (p) => stringContains(path, p));
18579
+ return some(ignoredPaths, (p) => path.includes(p));
18650
18580
  }
18651
18581
  function getContainingNodeArray(node) {
18652
18582
  if (!node.parent)
@@ -18907,9 +18837,6 @@ ${lanes.join("\n")}
18907
18837
  }
18908
18838
  return Debug.fail();
18909
18839
  }
18910
- function isNamedTupleMemberName(node) {
18911
- return node.kind === 80 /* Identifier */ || node.kind === 203 /* TemplateLiteralType */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */;
18912
- }
18913
18840
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18914
18841
  var init_utilities = __esm({
18915
18842
  "src/compiler/utilities.ts"() {
@@ -28202,7 +28129,7 @@ ${lanes.join("\n")}
28202
28129
  return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length2);
28203
28130
  }
28204
28131
  function isDeclarationFileName(fileName) {
28205
- return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d.");
28132
+ return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
28206
28133
  }
28207
28134
  function parseResolutionMode(mode, pos, end, reportDiagnostic) {
28208
28135
  if (!mode) {
@@ -28385,7 +28312,7 @@ ${lanes.join("\n")}
28385
28312
  return {};
28386
28313
  if (!pragma.args)
28387
28314
  return {};
28388
- const args = trimString(text).split(/\s+/);
28315
+ const args = text.trim().split(/\s+/);
28389
28316
  const argMap = {};
28390
28317
  for (let i = 0; i < pragma.args.length; i++) {
28391
28318
  const argument = pragma.args[i];
@@ -31129,29 +31056,21 @@ ${lanes.join("\n")}
31129
31056
  }
31130
31057
  return type;
31131
31058
  }
31132
- function isTokenColonOrQuestionColon() {
31133
- return token() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */;
31059
+ function isNextTokenColonOrQuestionColon() {
31060
+ return nextToken() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */;
31134
31061
  }
31135
31062
  function isTupleElementName() {
31136
31063
  if (token() === 26 /* DotDotDotToken */) {
31137
- nextToken();
31138
- }
31139
- if (token() === 16 /* TemplateHead */) {
31140
- parseTemplateType();
31141
- return isTokenColonOrQuestionColon();
31064
+ return tokenIsIdentifierOrKeyword(nextToken()) && isNextTokenColonOrQuestionColon();
31142
31065
  }
31143
- if (tokenIsIdentifierOrKeyword(token()) || token() === 15 /* NoSubstitutionTemplateLiteral */) {
31144
- nextToken();
31145
- return isTokenColonOrQuestionColon();
31146
- }
31147
- return false;
31066
+ return tokenIsIdentifierOrKeyword(token()) && isNextTokenColonOrQuestionColon();
31148
31067
  }
31149
31068
  function parseTupleElementNameOrTupleElementType() {
31150
31069
  if (lookAhead(isTupleElementName)) {
31151
31070
  const pos = getNodePos();
31152
31071
  const hasJSDoc = hasPrecedingJSDocComment();
31153
31072
  const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
31154
- const name = token() === 15 /* NoSubstitutionTemplateLiteral */ ? parseLiteralLikeNode(token()) : token() === 16 /* TemplateHead */ ? parseTemplateType() : parseIdentifierName();
31073
+ const name = parseIdentifierName();
31155
31074
  const questionToken = parseOptionalToken(58 /* QuestionToken */);
31156
31075
  parseExpected(59 /* ColonToken */);
31157
31076
  const type = parseTupleElementType();
@@ -34230,7 +34149,7 @@ ${lanes.join("\n")}
34230
34149
  }
34231
34150
  function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
34232
34151
  const namespaceFlag = flags & 32 /* Namespace */;
34233
- const name = parseIdentifier();
34152
+ const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();
34234
34153
  const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
34235
34154
  getNodePos(),
34236
34155
  /*hasJSDoc*/
@@ -34700,8 +34619,6 @@ ${lanes.join("\n")}
34700
34619
  PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter";
34701
34620
  })(PropertyLikeParse || (PropertyLikeParse = {}));
34702
34621
  function parseJSDocCommentWorker(start = 0, length2) {
34703
- const saveParsingContext = parsingContext;
34704
- parsingContext |= 1 << 25 /* JSDocComment */;
34705
34622
  const content = sourceText;
34706
34623
  const end = length2 === void 0 ? content.length : start + length2;
34707
34624
  length2 = end - start;
@@ -34718,6 +34635,8 @@ ${lanes.join("\n")}
34718
34635
  let commentsPos;
34719
34636
  let comments = [];
34720
34637
  const parts = [];
34638
+ const saveParsingContext = parsingContext;
34639
+ parsingContext |= 1 << 25 /* JSDocComment */;
34721
34640
  const result = scanner2.scanRange(start + 3, length2 - 5, doJSDocScan);
34722
34641
  parsingContext = saveParsingContext;
34723
34642
  return result;
@@ -34809,7 +34728,7 @@ ${lanes.join("\n")}
34809
34728
  nextTokenJSDoc();
34810
34729
  }
34811
34730
  }
34812
- const trimmedComments = trimStringEnd(comments.join(""));
34731
+ const trimmedComments = comments.join("").trimEnd();
34813
34732
  if (parts.length && trimmedComments.length) {
34814
34733
  parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos));
34815
34734
  }
@@ -34825,7 +34744,7 @@ ${lanes.join("\n")}
34825
34744
  }
34826
34745
  function removeTrailingWhitespace(comments2) {
34827
34746
  while (comments2.length) {
34828
- const trimmed = trimStringEnd(comments2[comments2.length - 1]);
34747
+ const trimmed = comments2[comments2.length - 1].trimEnd();
34829
34748
  if (trimmed === "") {
34830
34749
  comments2.pop();
34831
34750
  } else if (trimmed.length < comments2[comments2.length - 1].length) {
@@ -35065,7 +34984,7 @@ ${lanes.join("\n")}
35065
34984
  }
35066
34985
  }
35067
34986
  removeLeadingNewlines(comments2);
35068
- const trimmedComments = trimStringEnd(comments2.join(""));
34987
+ const trimmedComments = comments2.join("").trimEnd();
35069
34988
  if (parts2.length) {
35070
34989
  if (trimmedComments.length) {
35071
34990
  parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));
@@ -35991,14 +35910,14 @@ ${lanes.join("\n")}
35991
35910
  return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
35992
35911
  }
35993
35912
  function parseCustomTypeOption(opt, value, errors) {
35994
- return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
35913
+ return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors);
35995
35914
  }
35996
35915
  function parseListTypeOption(opt, value = "", errors) {
35997
- value = trimString(value);
35916
+ value = value.trim();
35998
35917
  if (startsWith(value, "-")) {
35999
35918
  return void 0;
36000
35919
  }
36001
- if (opt.type === "listOrElement" && !stringContains(value, ",")) {
35920
+ if (opt.type === "listOrElement" && !value.includes(",")) {
36002
35921
  return validateJsonOptionValue(opt, value, errors);
36003
35922
  }
36004
35923
  if (value === "") {
@@ -36977,7 +36896,7 @@ ${lanes.join("\n")}
36977
36896
  var _a;
36978
36897
  basePath = normalizeSlashes(basePath);
36979
36898
  const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath);
36980
- if (resolutionStack.indexOf(resolvedPath) >= 0) {
36899
+ if (resolutionStack.includes(resolvedPath)) {
36981
36900
  errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> ")));
36982
36901
  return { raw: json || convertToObject(sourceFile, errors) };
36983
36902
  }
@@ -40332,7 +40251,7 @@ ${lanes.join("\n")}
40332
40251
  result = tryResolve(extensions, state);
40333
40252
  }
40334
40253
  let legacyResult;
40335
- 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) {
40254
+ 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")) {
40336
40255
  traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
40337
40256
  const diagnosticState = {
40338
40257
  ...state,
@@ -40376,7 +40295,7 @@ ${lanes.join("\n")}
40376
40295
  resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
40377
40296
  }
40378
40297
  if (!resolved2) {
40379
- if (moduleName.indexOf(":") > -1) {
40298
+ if (moduleName.includes(":")) {
40380
40299
  if (traceEnabled) {
40381
40300
  trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
40382
40301
  }
@@ -40465,7 +40384,7 @@ ${lanes.join("\n")}
40465
40384
  return void 0;
40466
40385
  }
40467
40386
  function pathContainsNodeModules(path) {
40468
- return stringContains(path, nodeModulesPathPart);
40387
+ return path.includes(nodeModulesPathPart);
40469
40388
  }
40470
40389
  function parseNodeModuleFromPath(resolved, isFolder) {
40471
40390
  const path = normalizePath(resolved);
@@ -40501,7 +40420,7 @@ ${lanes.join("\n")}
40501
40420
  }
40502
40421
  function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
40503
40422
  const filename = getBaseFileName(candidate);
40504
- if (filename.indexOf(".") === -1) {
40423
+ if (!filename.includes(".")) {
40505
40424
  return void 0;
40506
40425
  }
40507
40426
  let extensionless = removeFileExtension(candidate);
@@ -40658,7 +40577,7 @@ ${lanes.join("\n")}
40658
40577
  function loadEntrypointsFromTargetExports(target) {
40659
40578
  var _a, _b;
40660
40579
  if (typeof target === "string" && startsWith(target, "./")) {
40661
- if (target.indexOf("*") >= 0 && state.host.readDirectory) {
40580
+ if (target.includes("*") && state.host.readDirectory) {
40662
40581
  if (target.indexOf("*") !== target.lastIndexOf("*")) {
40663
40582
  return false;
40664
40583
  }
@@ -40677,7 +40596,7 @@ ${lanes.join("\n")}
40677
40596
  });
40678
40597
  } else {
40679
40598
  const partsAfterFirst = getPathComponents(target).slice(2);
40680
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
40599
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
40681
40600
  return false;
40682
40601
  }
40683
40602
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
@@ -41045,7 +40964,7 @@ ${lanes.join("\n")}
41045
40964
  }
41046
40965
  function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
41047
40966
  const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
41048
- if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) {
40967
+ if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
41049
40968
  const target = lookupTable[moduleName];
41050
40969
  return loadModuleFromTargetImportOrExport(
41051
40970
  target,
@@ -41056,7 +40975,7 @@ ${lanes.join("\n")}
41056
40975
  moduleName
41057
40976
  );
41058
40977
  }
41059
- const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys);
40978
+ const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
41060
40979
  for (const potentialTarget of expandingKeys) {
41061
40980
  if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
41062
40981
  const target = lookupTable[potentialTarget];
@@ -41150,7 +41069,7 @@ ${lanes.join("\n")}
41150
41069
  }
41151
41070
  const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
41152
41071
  const partsAfterFirst = parts.slice(1);
41153
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
41072
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
41154
41073
  if (state.traceEnabled) {
41155
41074
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
41156
41075
  }
@@ -41161,7 +41080,7 @@ ${lanes.join("\n")}
41161
41080
  }
41162
41081
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
41163
41082
  const subpathParts = getPathComponents(subpath);
41164
- if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
41083
+ if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
41165
41084
  if (state.traceEnabled) {
41166
41085
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
41167
41086
  }
@@ -41188,7 +41107,7 @@ ${lanes.join("\n")}
41188
41107
  if (!Array.isArray(target)) {
41189
41108
  traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
41190
41109
  for (const condition of getOwnKeys(target)) {
41191
- if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) {
41110
+ if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
41192
41111
  traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
41193
41112
  const subTarget = target[condition];
41194
41113
  const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
@@ -41249,7 +41168,7 @@ ${lanes.join("\n")}
41249
41168
  }
41250
41169
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
41251
41170
  var _a, _b, _c, _d;
41252
- 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)) {
41171
+ 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)) {
41253
41172
  const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
41254
41173
  const commonSourceDirGuesses = [];
41255
41174
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
@@ -41323,7 +41242,7 @@ ${lanes.join("\n")}
41323
41242
  }
41324
41243
  }
41325
41244
  function isApplicableVersionedTypesKey(conditions, key) {
41326
- if (conditions.indexOf("types") === -1)
41245
+ if (!conditions.includes("types"))
41327
41246
  return false;
41328
41247
  if (!startsWith(key, "types@"))
41329
41248
  return false;
@@ -41527,7 +41446,7 @@ ${lanes.join("\n")}
41527
41446
  return mangledName;
41528
41447
  }
41529
41448
  function unmangleScopedPackageName(typesPackageName) {
41530
- return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;
41449
+ return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;
41531
41450
  }
41532
41451
  function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) {
41533
41452
  const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference);
@@ -45242,12 +45161,12 @@ ${lanes.join("\n")}
45242
45161
  /*currentDirectory*/
45243
45162
  void 0
45244
45163
  );
45245
- const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */;
45164
+ const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */;
45246
45165
  return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2);
45247
45166
  });
45248
45167
  } else {
45249
45168
  for (const key of getOwnKeys(exports)) {
45250
- if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
45169
+ if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) {
45251
45170
  const subTarget = exports[key];
45252
45171
  const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
45253
45172
  if (result) {
@@ -45413,7 +45332,7 @@ ${lanes.join("\n")}
45413
45332
  return fileName;
45414
45333
  } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) {
45415
45334
  return noExtension + getJSExtensionForFile(fileName, options);
45416
- } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) {
45335
+ } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) {
45417
45336
  return tryGetRealFileNameForNonJsDeclarationFileName(fileName);
45418
45337
  }
45419
45338
  switch (allowedEndings[0]) {
@@ -45439,7 +45358,7 @@ ${lanes.join("\n")}
45439
45358
  }
45440
45359
  function tryGetRealFileNameForNonJsDeclarationFileName(fileName) {
45441
45360
  const baseName = getBaseFileName(fileName);
45442
- if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */]))
45361
+ if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */]))
45443
45362
  return void 0;
45444
45363
  const noExtension = removeExtension(fileName, ".ts" /* Ts */);
45445
45364
  const ext = noExtension.substring(noExtension.lastIndexOf("."));
@@ -46059,6 +45978,7 @@ ${lanes.join("\n")}
46059
45978
  var anyType = createIntrinsicType(1 /* Any */, "any");
46060
45979
  var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */);
46061
45980
  var wildcardType = createIntrinsicType(1 /* Any */, "any");
45981
+ var blockedStringType = createIntrinsicType(1 /* Any */, "any");
46062
45982
  var errorType = createIntrinsicType(1 /* Any */, "error");
46063
45983
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
46064
45984
  var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */);
@@ -47745,7 +47665,7 @@ ${lanes.join("\n")}
47745
47665
  }
47746
47666
  }
47747
47667
  function isSameScopeDescendentOf(initial, parent2, stopAt) {
47748
- return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false));
47668
+ return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? "quit" : false));
47749
47669
  }
47750
47670
  function getAnyImportSyntax(node) {
47751
47671
  switch (node.kind) {
@@ -50563,11 +50483,10 @@ ${lanes.join("\n")}
50563
50483
  for (let i = 0; i < tupleConstituentNodes.length; i++) {
50564
50484
  const flags = type2.target.elementFlags[i];
50565
50485
  const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i];
50566
- const label = labeledElementDeclaration && getTupleElementLabel(type2, labeledElementDeclaration);
50567
- if (label) {
50486
+ if (labeledElementDeclaration) {
50568
50487
  tupleConstituentNodes[i] = factory.createNamedTupleMember(
50569
50488
  flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0,
50570
- factory.createIdentifier(unescapeLeadingUnderscores(label)),
50489
+ factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))),
50571
50490
  flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,
50572
50491
  flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]
50573
50492
  );
@@ -51402,12 +51321,12 @@ ${lanes.join("\n")}
51402
51321
  if (!specifier) {
51403
51322
  specifier = getSpecifierForModuleSymbol(chain[0], context);
51404
51323
  }
51405
- if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) {
51324
+ if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) {
51406
51325
  const oldSpecifier = specifier;
51407
51326
  if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
51408
51327
  const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */;
51409
51328
  specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
51410
- if (specifier.indexOf("/node_modules/") >= 0) {
51329
+ if (specifier.includes("/node_modules/")) {
51411
51330
  specifier = oldSpecifier;
51412
51331
  } else {
51413
51332
  assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([
@@ -51970,6 +51889,7 @@ ${lanes.join("\n")}
51970
51889
  }
51971
51890
  }
51972
51891
  function symbolTableToDeclarationStatements(symbolTable, context, bundled) {
51892
+ var _a;
51973
51893
  const serializePropertySymbolForClass = makeSerializePropertySymbol(
51974
51894
  factory.createPropertyDeclaration,
51975
51895
  174 /* MethodDeclaration */,
@@ -51991,12 +51911,15 @@ ${lanes.join("\n")}
51991
51911
  ...oldcontext,
51992
51912
  usedSymbolNames: new Set(oldcontext.usedSymbolNames),
51993
51913
  remappedSymbolNames: /* @__PURE__ */ new Map(),
51914
+ remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()),
51994
51915
  tracker: void 0
51995
51916
  };
51996
51917
  const tracker = {
51997
51918
  ...oldcontext.tracker.inner,
51998
51919
  trackSymbol: (sym, decl, meaning) => {
51999
- var _a;
51920
+ var _a2, _b;
51921
+ if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym)))
51922
+ return false;
52000
51923
  const accessibleResult = isSymbolAccessible(
52001
51924
  sym,
52002
51925
  decl,
@@ -52013,7 +51936,7 @@ ${lanes.join("\n")}
52013
51936
  includePrivateSymbol(root);
52014
51937
  }
52015
51938
  }
52016
- } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) {
51939
+ } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) {
52017
51940
  return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning);
52018
51941
  }
52019
51942
  return false;
@@ -52113,7 +52036,7 @@ ${lanes.join("\n")}
52113
52036
  for (const group2 of groups) {
52114
52037
  if (group2.length > 1) {
52115
52038
  statements = [
52116
- ...filter(statements, (s) => group2.indexOf(s) === -1),
52039
+ ...filter(statements, (s) => !group2.includes(s)),
52117
52040
  factory.createExportDeclaration(
52118
52041
  /*modifiers*/
52119
52042
  void 0,
@@ -52222,10 +52145,10 @@ ${lanes.join("\n")}
52222
52145
  context = oldContext;
52223
52146
  }
52224
52147
  }
52225
- function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) {
52226
- var _a, _b, _c, _d;
52227
- const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName);
52228
- const isDefault = symbol.escapedName === "default" /* Default */;
52148
+ function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) {
52149
+ var _a2, _b, _c, _d, _e, _f;
52150
+ const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName);
52151
+ const isDefault = escapedSymbolName === "default" /* Default */;
52229
52152
  if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) {
52230
52153
  context.encounteredError = true;
52231
52154
  return;
@@ -52236,7 +52159,7 @@ ${lanes.join("\n")}
52236
52159
  isPrivate = true;
52237
52160
  }
52238
52161
  const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0);
52239
- const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */;
52162
+ const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */;
52240
52163
  const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol);
52241
52164
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) {
52242
52165
  serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);
@@ -52244,7 +52167,7 @@ ${lanes.join("\n")}
52244
52167
  if (symbol.flags & 524288 /* TypeAlias */) {
52245
52168
  serializeTypeAlias(symbol, symbolName2, modifierFlags);
52246
52169
  }
52247
- if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) {
52170
+ if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && escapedSymbolName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) {
52248
52171
  if (propertyAsAlias) {
52249
52172
  const createdExport = serializeMaybeAliasAssignment(symbol);
52250
52173
  if (createdExport) {
@@ -52254,17 +52177,24 @@ ${lanes.join("\n")}
52254
52177
  } else {
52255
52178
  const type = getTypeOfSymbol(symbol);
52256
52179
  const localName = getInternalSymbolName(symbol, symbolName2);
52257
- if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) {
52180
+ if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) {
52181
+ if (!context.remappedSymbolReferences) {
52182
+ context.remappedSymbolReferences = /* @__PURE__ */ new Map();
52183
+ }
52184
+ context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol);
52185
+ serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName);
52186
+ context.remappedSymbolReferences.delete(getSymbolId(type.symbol));
52187
+ } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) {
52258
52188
  serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags);
52259
52189
  } else {
52260
- const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */;
52190
+ const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_c = symbol.parent) == null ? void 0 : _c.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */;
52261
52191
  const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol);
52262
52192
  let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d));
52263
52193
  if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
52264
52194
  textRange = textRange.parent.parent;
52265
52195
  }
52266
- const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression);
52267
- if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) {
52196
+ const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression);
52197
+ if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) {
52268
52198
  const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right;
52269
52199
  addResult(
52270
52200
  factory.createExportDeclaration(
@@ -52419,11 +52349,11 @@ ${lanes.join("\n")}
52419
52349
  results.push(node);
52420
52350
  }
52421
52351
  function serializeTypeAlias(symbol, symbolName2, modifierFlags) {
52422
- var _a;
52352
+ var _a2;
52423
52353
  const aliasType = getDeclaredTypeOfTypeAlias(symbol);
52424
52354
  const typeParams = getSymbolLinks(symbol).typeParameters;
52425
52355
  const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context));
52426
- const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias);
52356
+ const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias);
52427
52357
  const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
52428
52358
  const oldFlags = context.flags;
52429
52359
  context.flags |= 8388608 /* InTypeAlias */;
@@ -52494,12 +52424,12 @@ ${lanes.join("\n")}
52494
52424
  /*isTypeOnly*/
52495
52425
  false,
52496
52426
  factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => {
52497
- var _a, _b;
52427
+ var _a2, _b;
52498
52428
  const name = unescapeLeadingUnderscores(s.escapedName);
52499
52429
  const localName2 = getInternalSymbolName(s, name);
52500
52430
  const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s);
52501
52431
  if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) {
52502
- (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s);
52432
+ (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s);
52503
52433
  return void 0;
52504
52434
  }
52505
52435
  const target = aliasDecl && getTargetOfAliasDeclaration(
@@ -52665,8 +52595,8 @@ ${lanes.join("\n")}
52665
52595
  return void 0;
52666
52596
  }
52667
52597
  function serializeAsClass(symbol, localName, modifierFlags) {
52668
- var _a, _b;
52669
- const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);
52598
+ var _a2, _b;
52599
+ const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike);
52670
52600
  const oldEnclosing = context.enclosingDeclaration;
52671
52601
  context.enclosingDeclaration = originalDecl || oldEnclosing;
52672
52602
  const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
@@ -52762,7 +52692,7 @@ ${lanes.join("\n")}
52762
52692
  });
52763
52693
  }
52764
52694
  function serializeAsAlias(symbol, localName, modifierFlags) {
52765
- var _a, _b, _c, _d, _e;
52695
+ var _a2, _b, _c, _d, _e;
52766
52696
  const node = getDeclarationOfAliasSymbol(symbol);
52767
52697
  if (!node)
52768
52698
  return Debug.fail();
@@ -52782,7 +52712,7 @@ ${lanes.join("\n")}
52782
52712
  includePrivateSymbol(target);
52783
52713
  switch (node.kind) {
52784
52714
  case 208 /* BindingElement */:
52785
- if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
52715
+ if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
52786
52716
  const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context);
52787
52717
  const { propertyName } = node;
52788
52718
  addResult(
@@ -53001,7 +52931,7 @@ ${lanes.join("\n")}
53001
52931
  );
53002
52932
  }
53003
52933
  function serializeMaybeAliasAssignment(symbol) {
53004
- var _a;
52934
+ var _a2;
53005
52935
  if (symbol.flags & 4194304 /* Prototype */) {
53006
52936
  return false;
53007
52937
  }
@@ -53084,7 +53014,7 @@ ${lanes.join("\n")}
53084
53014
  void 0,
53085
53015
  serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
53086
53016
  )
53087
- ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
53017
+ ], ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
53088
53018
  );
53089
53019
  addResult(
53090
53020
  statement,
@@ -53114,7 +53044,7 @@ ${lanes.join("\n")}
53114
53044
  }
53115
53045
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
53116
53046
  return function serializePropertySymbol(p, isStatic2, baseType) {
53117
- var _a, _b, _c, _d, _e;
53047
+ var _a2, _b, _c, _d, _e;
53118
53048
  const modifierFlags = getDeclarationModifierFlagsFromSymbol(p);
53119
53049
  const isPrivate = !!(modifierFlags & 8 /* Private */);
53120
53050
  if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) {
@@ -53125,7 +53055,7 @@ ${lanes.join("\n")}
53125
53055
  }
53126
53056
  const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0);
53127
53057
  const name = getPropertyNameNodeForSymbol(p, context);
53128
- const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
53058
+ const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
53129
53059
  if (p.flags & 98304 /* Accessor */ && useAccessors) {
53130
53060
  const result = [];
53131
53061
  if (p.flags & 65536 /* SetAccessor */) {
@@ -53371,7 +53301,7 @@ ${lanes.join("\n")}
53371
53301
  }
53372
53302
  }
53373
53303
  function getUnusedName(input, symbol) {
53374
- var _a, _b;
53304
+ var _a2, _b;
53375
53305
  const id = symbol ? getSymbolId(symbol) : void 0;
53376
53306
  if (id) {
53377
53307
  if (context.remappedSymbolNames.has(id)) {
@@ -53383,7 +53313,7 @@ ${lanes.join("\n")}
53383
53313
  }
53384
53314
  let i = 0;
53385
53315
  const original = input;
53386
- while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) {
53316
+ while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) {
53387
53317
  i++;
53388
53318
  input = `${original}_${i}`;
53389
53319
  }
@@ -53511,6 +53441,10 @@ ${lanes.join("\n")}
53511
53441
  }
53512
53442
  }
53513
53443
  function getNameOfSymbolAsWritten(symbol, context) {
53444
+ var _a;
53445
+ if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) {
53446
+ symbol = context.remappedSymbolReferences.get(getSymbolId(symbol));
53447
+ }
53514
53448
  if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default`
53515
53449
  (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default`
53516
53450
  !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default`
@@ -55563,7 +55497,7 @@ ${lanes.join("\n")}
55563
55497
  if (!lateSymbol)
55564
55498
  lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
55565
55499
  const earlySymbol = earlySymbols && earlySymbols.get(memberName);
55566
- if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
55500
+ if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
55567
55501
  const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
55568
55502
  const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
55569
55503
  forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
@@ -55674,7 +55608,13 @@ ${lanes.join("\n")}
55674
55608
  const baseTypes = getBaseTypes(source);
55675
55609
  if (baseTypes.length) {
55676
55610
  if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
55677
- members = createSymbolTable(source.declaredProperties);
55611
+ const symbolTable = createSymbolTable();
55612
+ for (const symbol of members.values()) {
55613
+ if (!(symbol.flags & 262144 /* TypeParameter */)) {
55614
+ symbolTable.set(symbol.escapedName, symbol);
55615
+ }
55616
+ }
55617
+ members = symbolTable;
55678
55618
  }
55679
55619
  setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
55680
55620
  const thisArgument = lastOrUndefined(typeArguments);
@@ -55791,7 +55731,7 @@ ${lanes.join("\n")}
55791
55731
  function getUniqAssociatedNamesFromTupleType(type, restName) {
55792
55732
  const associatedNamesMap = /* @__PURE__ */ new Map();
55793
55733
  return map(type.target.labeledElementDeclarations, (labeledElement, i) => {
55794
- const name = getTupleElementLabel(type, labeledElement, i, restName);
55734
+ const name = getTupleElementLabel(labeledElement, i, restName);
55795
55735
  const prevCounter = associatedNamesMap.get(name);
55796
55736
  if (prevCounter === void 0) {
55797
55737
  associatedNamesMap.set(name, 1);
@@ -65073,6 +65013,9 @@ ${lanes.join("\n")}
65073
65013
  function isArrayLikeType(type) {
65074
65014
  return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType);
65075
65015
  }
65016
+ function isMutableArrayLikeType(type) {
65017
+ return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType);
65018
+ }
65076
65019
  function getSingleBaseForNonAugmentingSubtype(type) {
65077
65020
  if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
65078
65021
  return void 0;
@@ -65490,7 +65433,7 @@ ${lanes.join("\n")}
65490
65433
  const param = declaration;
65491
65434
  if (isIdentifier(param.name)) {
65492
65435
  const originalKeywordKind = identifierToKeywordKind(param.name);
65493
- if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
65436
+ if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName(
65494
65437
  param,
65495
65438
  param.name.escapedText,
65496
65439
  788968 /* Type */,
@@ -65576,7 +65519,12 @@ ${lanes.join("\n")}
65576
65519
  callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
65577
65520
  }
65578
65521
  if (targetRestType) {
65579
- callback(getRestTypeAtPosition(source, paramCount), targetRestType);
65522
+ callback(getRestTypeAtPosition(
65523
+ source,
65524
+ paramCount,
65525
+ /*readonly*/
65526
+ isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType)
65527
+ ), targetRestType);
65580
65528
  }
65581
65529
  }
65582
65530
  function applyToReturnTypes(source, target, callback) {
@@ -66617,7 +66565,7 @@ ${lanes.join("\n")}
66617
66565
  const constraint = getConstraintOfTypeParameter(inference.typeParameter);
66618
66566
  if (constraint) {
66619
66567
  const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
66620
- if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
66568
+ if (!inferredType || inferredType === blockedStringType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
66621
66569
  inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
66622
66570
  }
66623
66571
  }
@@ -70562,7 +70510,7 @@ ${lanes.join("\n")}
70562
70510
  elementTypes,
70563
70511
  elementFlags,
70564
70512
  /*readonly*/
70565
- inConstContext
70513
+ inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType))
70566
70514
  ));
70567
70515
  }
70568
70516
  return createArrayLiteralType(createArrayType(
@@ -70878,7 +70826,7 @@ ${lanes.join("\n")}
70878
70826
  return getJsxElementTypeAt(node) || anyType;
70879
70827
  }
70880
70828
  function isHyphenatedJsxName(name) {
70881
- return stringContains(name, "-");
70829
+ return name.includes("-");
70882
70830
  }
70883
70831
  function isJsxIntrinsicTagName(tagName) {
70884
70832
  return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
@@ -71800,7 +71748,7 @@ ${lanes.join("\n")}
71800
71748
  apparentType,
71801
71749
  right.escapedText,
71802
71750
  /*skipObjectFunctionPropertyAugment*/
71803
- false,
71751
+ isConstEnumObjectType(apparentType),
71804
71752
  /*includeTypeOnlyMembers*/
71805
71753
  node.kind === 166 /* QualifiedName */
71806
71754
  );
@@ -72583,7 +72531,7 @@ ${lanes.join("\n")}
72583
72531
  names.push(arg.tupleNameSource);
72584
72532
  }
72585
72533
  }
72586
- return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0);
72534
+ return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
72587
72535
  }
72588
72536
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
72589
72537
  const isJavascript = isInJSFile(signature.declaration);
@@ -74568,18 +74516,11 @@ ${lanes.join("\n")}
74568
74516
  !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
74569
74517
  );
74570
74518
  }
74571
- function getTupleElementLabel(tupleType, d, index, restParameterName = "arg") {
74519
+ function getTupleElementLabel(d, index, restParameterName = "arg") {
74572
74520
  if (!d) {
74573
74521
  return `${restParameterName}_${index}`;
74574
74522
  }
74575
- Debug.assert(!isBindingPattern(d.name));
74576
- if (d.name.kind === 203 /* TemplateLiteralType */) {
74577
- const label = instantiateType(getTypeFromTypeNode(d.name), tupleType.mapper);
74578
- return label.flags & 128 /* StringLiteral */ ? escapeLeadingUnderscores(label.value) : typeof index === "number" ? `${restParameterName}_${index}` : void 0;
74579
- }
74580
- if (d.name.kind === 15 /* NoSubstitutionTemplateLiteral */) {
74581
- return escapeLeadingUnderscores(d.name.text);
74582
- }
74523
+ Debug.assert(isIdentifier(d.name));
74583
74524
  return d.name.escapedText;
74584
74525
  }
74585
74526
  function getParameterNameAtPosition(signature, pos, overrideRestType) {
@@ -74592,7 +74533,7 @@ ${lanes.join("\n")}
74592
74533
  if (isTupleType(restType)) {
74593
74534
  const associatedNames = restType.target.labeledElementDeclarations;
74594
74535
  const index = pos - paramCount;
74595
- return getTupleElementLabel(restType, associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName);
74536
+ return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName);
74596
74537
  }
74597
74538
  return restParameter.escapedName;
74598
74539
  }
@@ -74622,7 +74563,8 @@ ${lanes.join("\n")}
74622
74563
  const index = pos - paramCount;
74623
74564
  const associatedName = associatedNames == null ? void 0 : associatedNames[index];
74624
74565
  const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken);
74625
- if (associatedName && isIdentifier(associatedName.name)) {
74566
+ if (associatedName) {
74567
+ Debug.assert(isIdentifier(associatedName.name));
74626
74568
  return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement };
74627
74569
  }
74628
74570
  return void 0;
@@ -74670,7 +74612,7 @@ ${lanes.join("\n")}
74670
74612
  }
74671
74613
  return void 0;
74672
74614
  }
74673
- function getRestTypeAtPosition(source, pos) {
74615
+ function getRestTypeAtPosition(source, pos, readonly) {
74674
74616
  const parameterCount = getParameterCount(source);
74675
74617
  const minArgumentCount = getMinArgumentCount(source);
74676
74618
  const restType = getEffectiveRestType(source);
@@ -74693,13 +74635,7 @@ ${lanes.join("\n")}
74693
74635
  names.push(name);
74694
74636
  }
74695
74637
  }
74696
- return createTupleType(
74697
- types,
74698
- flags,
74699
- /*readonly*/
74700
- false,
74701
- length(names) === length(types) ? names : void 0
74702
- );
74638
+ return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
74703
74639
  }
74704
74640
  function getParameterCount(signature) {
74705
74641
  const length2 = signature.parameters.length;
@@ -74779,18 +74715,16 @@ ${lanes.join("\n")}
74779
74715
  const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
74780
74716
  for (let i = 0; i < len; i++) {
74781
74717
  const declaration = signature.parameters[i].valueDeclaration;
74782
- if (declaration.type) {
74783
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
74784
- if (typeNode) {
74785
- const source = addOptionality(
74786
- getTypeFromTypeNode(typeNode),
74787
- /*isProperty*/
74788
- false,
74789
- isOptionalDeclaration(declaration)
74790
- );
74791
- const target = getTypeAtPosition(context, i);
74792
- inferTypes(inferenceContext.inferences, source, target);
74793
- }
74718
+ const typeNode = getEffectiveTypeAnnotationNode(declaration);
74719
+ if (typeNode) {
74720
+ const source = addOptionality(
74721
+ getTypeFromTypeNode(typeNode),
74722
+ /*isProperty*/
74723
+ false,
74724
+ isOptionalDeclaration(declaration)
74725
+ );
74726
+ const target = getTypeAtPosition(context, i);
74727
+ inferTypes(inferenceContext.inferences, source, target);
74794
74728
  }
74795
74729
  }
74796
74730
  }
@@ -77222,7 +77156,7 @@ ${lanes.join("\n")}
77222
77156
  return nullWideningType;
77223
77157
  case 15 /* NoSubstitutionTemplateLiteral */:
77224
77158
  case 11 /* StringLiteral */:
77225
- return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
77159
+ return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
77226
77160
  case 9 /* NumericLiteral */: {
77227
77161
  checkGrammarNumericLiteral(node);
77228
77162
  const value = +node.text;
@@ -77571,7 +77505,7 @@ ${lanes.join("\n")}
77571
77505
  const isPrivate = isPrivateIdentifier(name);
77572
77506
  const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
77573
77507
  const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
77574
- const memberName = name && getPropertyNameForPropertyNameNode(name);
77508
+ const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
77575
77509
  if (memberName) {
77576
77510
  switch (member.kind) {
77577
77511
  case 177 /* GetAccessor */:
@@ -77618,7 +77552,7 @@ ${lanes.join("\n")}
77618
77552
  const memberNameNode = member.name;
77619
77553
  const isStaticMember = isStatic(member);
77620
77554
  if (isStaticMember && memberNameNode) {
77621
- const memberName = getPropertyNameForPropertyNameNode(memberNameNode);
77555
+ const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
77622
77556
  switch (memberName) {
77623
77557
  case "name":
77624
77558
  case "length":
@@ -78127,9 +78061,6 @@ ${lanes.join("\n")}
78127
78061
  if (node.type.kind === 191 /* RestType */) {
78128
78062
  grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type);
78129
78063
  }
78130
- if (node.name.kind === 203 /* TemplateLiteralType */) {
78131
- checkSourceElement(node.name);
78132
- }
78133
78064
  checkSourceElement(node.type);
78134
78065
  getTypeFromTypeNode(node);
78135
78066
  }
@@ -86050,7 +85981,7 @@ ${lanes.join("\n")}
86050
85981
  return false;
86051
85982
  }
86052
85983
  function checkGrammarNumericLiteral(node) {
86053
- const isFractional = getTextOfNode(node).indexOf(".") !== -1;
85984
+ const isFractional = getTextOfNode(node).includes(".");
86054
85985
  const isScientific = node.numericLiteralFlags & 16 /* Scientific */;
86055
85986
  if (isFractional || isScientific) {
86056
85987
  return;
@@ -87084,7 +87015,7 @@ ${lanes.join("\n")}
87084
87015
  return context.factory.updateNamedTupleMember(
87085
87016
  node,
87086
87017
  tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
87087
- Debug.checkDefined(nodeVisitor(node.name, visitor, isNamedTupleMemberName)),
87018
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
87088
87019
  tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
87089
87020
  Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
87090
87021
  );
@@ -88110,7 +88041,7 @@ ${lanes.join("\n")}
88110
88041
  const line = lineInfo.getLineText(index);
88111
88042
  const comment = sourceMapCommentRegExp.exec(line);
88112
88043
  if (comment) {
88113
- return trimStringEnd(comment[1]);
88044
+ return comment[1].trimEnd();
88114
88045
  } else if (!line.match(whitespaceOrMapCommentRegExp)) {
88115
88046
  break;
88116
88047
  }
@@ -109507,7 +109438,7 @@ ${lanes.join("\n")}
109507
109438
  }
109508
109439
  function hasInternalAnnotation(range, currentSourceFile) {
109509
109440
  const comment = currentSourceFile.text.substring(range.pos, range.end);
109510
- return stringContains(comment, "@internal");
109441
+ return comment.includes("@internal");
109511
109442
  }
109512
109443
  function isInternalDeclaration(node, currentSourceFile) {
109513
109444
  const parseTreeNode = getParseTreeNode(node);
@@ -109960,6 +109891,9 @@ ${lanes.join("\n")}
109960
109891
  if (elem.kind === 232 /* OmittedExpression */) {
109961
109892
  return elem;
109962
109893
  }
109894
+ if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) {
109895
+ checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration);
109896
+ }
109963
109897
  if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) {
109964
109898
  return factory2.updateBindingElement(
109965
109899
  elem,
@@ -113964,7 +113898,7 @@ ${lanes.join("\n")}
113964
113898
  /*jsxAttributeEscape*/
113965
113899
  false
113966
113900
  );
113967
- return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
113901
+ return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */));
113968
113902
  } else if (isAccessExpression(expression)) {
113969
113903
  const constantValue = getConstantValue(expression);
113970
113904
  return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
@@ -117953,17 +117887,17 @@ ${lanes.join("\n")}
117953
117887
  for (let i = firstLine; i <= lastLine; i++) {
117954
117888
  context += host.getNewLine();
117955
117889
  if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
117956
- context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
117890
+ context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
117957
117891
  i = lastLine - 1;
117958
117892
  }
117959
117893
  const lineStart = getPositionOfLineAndCharacter(file, i, 0);
117960
117894
  const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
117961
117895
  let lineContent = file.text.slice(lineStart, lineEnd);
117962
- lineContent = trimStringEnd(lineContent);
117896
+ lineContent = lineContent.trimEnd();
117963
117897
  lineContent = lineContent.replace(/\t/g, " ");
117964
- context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
117898
+ context += indent3 + formatColorAndReset((i + 1 + "").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;
117965
117899
  context += lineContent + host.getNewLine();
117966
- context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
117900
+ context += indent3 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;
117967
117901
  context += squiggleColor;
117968
117902
  if (i === firstLine) {
117969
117903
  const lastCharForLine = i === lastLine ? lastLineChar : void 0;
@@ -118792,7 +118726,7 @@ ${lanes.join("\n")}
118792
118726
  const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
118793
118727
  if (resultFromDts)
118794
118728
  return resultFromDts;
118795
- if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart))
118729
+ if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart))
118796
118730
  return void 0;
118797
118731
  const realDeclarationPath = toPath3(host.realpath(file.originalFileName));
118798
118732
  return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
@@ -120050,7 +119984,7 @@ ${lanes.join("\n")}
120050
119984
  const path = toPath3(fileName);
120051
119985
  if (useSourceOfProjectReferenceRedirect) {
120052
119986
  let source = getSourceOfProjectReferenceRedirect(path);
120053
- if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) {
119987
+ if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
120054
119988
  const realPath2 = toPath3(host.realpath(fileName));
120055
119989
  if (realPath2 !== path)
120056
119990
  source = getSourceOfProjectReferenceRedirect(realPath2);
@@ -121410,7 +121344,7 @@ ${lanes.join("\n")}
121410
121344
  var _a;
121411
121345
  if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory))
121412
121346
  return;
121413
- if (!originalRealpath || !stringContains(directory, nodeModulesPathPart))
121347
+ if (!originalRealpath || !directory.includes(nodeModulesPathPart))
121414
121348
  return;
121415
121349
  const symlinkCache = host.getSymlinkCache();
121416
121350
  const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory));
@@ -121438,7 +121372,7 @@ ${lanes.join("\n")}
121438
121372
  if (!symlinkedDirectories)
121439
121373
  return false;
121440
121374
  const fileOrDirectoryPath = host.toPath(fileOrDirectory);
121441
- if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart))
121375
+ if (!fileOrDirectoryPath.includes(nodeModulesPathPart))
121442
121376
  return false;
121443
121377
  if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath)))
121444
121378
  return true;
@@ -123486,7 +123420,7 @@ ${lanes.join("\n")}
123486
123420
  if (endsWith(path, "/node_modules/.staging")) {
123487
123421
  return removeSuffix(path, "/.staging");
123488
123422
  }
123489
- return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path;
123423
+ return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path;
123490
123424
  }
123491
123425
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
123492
123426
  if (length2 <= 1)
@@ -128335,7 +128269,7 @@ ${lanes.join("\n")}
128335
128269
 
128336
128270
  // src/jsTyping/shared.ts
128337
128271
  function hasArgument(argumentName) {
128338
- return sys.args.indexOf(argumentName) >= 0;
128272
+ return sys.args.includes(argumentName);
128339
128273
  }
128340
128274
  function findArgument(argumentName) {
128341
128275
  const index = sys.args.indexOf(argumentName);
@@ -128343,7 +128277,7 @@ ${lanes.join("\n")}
128343
128277
  }
128344
128278
  function nowString() {
128345
128279
  const d = /* @__PURE__ */ new Date();
128346
- 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")}`;
128280
+ 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")}`;
128347
128281
  }
128348
128282
  var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, ActionWatchTypingLocations, Arguments;
128349
128283
  var init_shared = __esm({
@@ -131163,7 +131097,7 @@ ${lanes.join("\n")}
131163
131097
  return false;
131164
131098
  }
131165
131099
  function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) {
131166
- if (!stringContains(importedFileName, "node_modules")) {
131100
+ if (!importedFileName.includes("node_modules")) {
131167
131101
  return void 0;
131168
131102
  }
131169
131103
  const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName(
@@ -131780,7 +131714,7 @@ ${lanes.join("\n")}
131780
131714
  var _a;
131781
131715
  const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName)));
131782
131716
  for (const ambient of checker.getAmbientModules()) {
131783
- if (!stringContains(ambient.name, "*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) {
131717
+ if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) {
131784
131718
  cb(
131785
131719
  ambient,
131786
131720
  /*sourceFile*/
@@ -140814,7 +140748,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
140814
140748
  return symbolId;
140815
140749
  }
140816
140750
  function checkForUsedDeclarations(node) {
140817
- if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0) {
140751
+ if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) {
140818
140752
  return;
140819
140753
  }
140820
140754
  const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node);
@@ -142680,7 +142614,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142680
142614
  return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */;
142681
142615
  }
142682
142616
  function isNodeModulesFile(path) {
142683
- return stringContains(path, "/node_modules/");
142617
+ return path.includes("/node_modules/");
142684
142618
  }
142685
142619
  }
142686
142620
  function getRenameInfo2(fileName, position, preferences) {
@@ -152521,7 +152455,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
152521
152455
  }
152522
152456
  }
152523
152457
  function isCallbackLike(checker, sourceFile, name) {
152524
- return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0);
152458
+ return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference));
152525
152459
  }
152526
152460
  function isLastParameter(func, parameter, isFixAll) {
152527
152461
  const parameters = func.parameters;
@@ -160373,7 +160307,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160373
160307
  function addReplacementSpans(text, textStart, names) {
160374
160308
  const span = getDirectoryFragmentTextSpan(text, textStart);
160375
160309
  const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);
160376
- return names.map(({ name, kind, extension }) => Math.max(name.indexOf(directorySeparator), name.indexOf(altDirectorySeparator)) !== -1 ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
160310
+ return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
160377
160311
  }
160378
160312
  function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) {
160379
160313
  return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences));
@@ -160699,7 +160633,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160699
160633
  }
160700
160634
  if (target && typeof target === "object" && !isArray(target)) {
160701
160635
  for (const condition in target) {
160702
- if (condition === "default" || conditions.indexOf(condition) > -1 || isApplicableVersionedTypesKey(conditions, condition)) {
160636
+ if (condition === "default" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) {
160703
160637
  const pattern = target[condition];
160704
160638
  return getPatternFromFirstMatchingCondition(pattern, conditions);
160705
160639
  }
@@ -160711,7 +160645,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160711
160645
  }
160712
160646
  function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) {
160713
160647
  if (!endsWith(path, "*")) {
160714
- return !stringContains(path, "*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray;
160648
+ return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray;
160715
160649
  }
160716
160650
  const pathPrefix = path.slice(0, path.length - 1);
160717
160651
  const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
@@ -160781,7 +160715,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160781
160715
  }
160782
160716
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
160783
160717
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
160784
- const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
160718
+ const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes("*"));
160785
160719
  if (fragmentDirectory !== void 0) {
160786
160720
  const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
160787
160721
  return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
@@ -160895,7 +160829,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
160895
160829
  return false;
160896
160830
  }
160897
160831
  function containsSlash(fragment) {
160898
- return stringContains(fragment, directorySeparator);
160832
+ return fragment.includes(directorySeparator);
160899
160833
  }
160900
160834
  function isRequireCallArgument(node) {
160901
160835
  return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require";
@@ -165474,11 +165408,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165474
165408
  }
165475
165409
  }
165476
165410
  function isRegionDelimiter(lineText) {
165477
- lineText = trimStringStart(lineText);
165411
+ lineText = lineText.trimStart();
165478
165412
  if (!startsWith(lineText, "//")) {
165479
165413
  return null;
165480
165414
  }
165481
- lineText = trimString(lineText.slice(2));
165415
+ lineText = lineText.slice(2).trim();
165482
165416
  return regionDelimiterRegExp.exec(lineText);
165483
165417
  }
165484
165418
  function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) {
@@ -169788,7 +169722,7 @@ ${options.prefix}` : "\n" : options.prefix
169788
169722
  return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
169789
169723
  }
169790
169724
  function isNotPropertyAccessOnIntegerLiteral(context) {
169791
- return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().indexOf(".") !== -1;
169725
+ return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes(".");
169792
169726
  }
169793
169727
  var init_rules = __esm({
169794
169728
  "src/services/formatting/rules.ts"() {
@@ -170984,7 +170918,7 @@ ${options.prefix}` : "\n" : options.prefix
170984
170918
  }
170985
170919
  const containerList = getListByPosition(position, precedingToken.parent, sourceFile);
170986
170920
  if (containerList && !rangeContainsRange(containerList, precedingToken)) {
170987
- const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1;
170921
+ const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind);
170988
170922
  const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize;
170989
170923
  return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize;
170990
170924
  }
@@ -172575,7 +172509,7 @@ ${options.prefix}` : "\n" : options.prefix
172575
172509
 
172576
172510
  // src/server/scriptInfo.ts
172577
172511
  function isDynamicFileName(fileName) {
172578
- return fileName[0] === "^" || (stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) && getBaseFileName(fileName)[0] === "^" || stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator);
172512
+ return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
172579
172513
  }
172580
172514
  function ensurePrimaryProjectKind(project) {
172581
172515
  if (!project || project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */) {
@@ -174225,7 +174159,7 @@ ${options.prefix}` : "\n" : options.prefix
174225
174159
  }
174226
174160
  removeExistingTypings(include) {
174227
174161
  const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost);
174228
- return include.filter((i) => existing.indexOf(i) < 0);
174162
+ return include.filter((i) => !existing.includes(i));
174229
174163
  }
174230
174164
  updateGraphWorker() {
174231
174165
  var _a, _b;
@@ -178422,7 +178356,7 @@ Dynamic files must always be opened with service's current directory or service
178422
178356
  this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`);
178423
178357
  if (rule2.types) {
178424
178358
  for (const type of rule2.types) {
178425
- if (typeAcqInclude.indexOf(type) < 0) {
178359
+ if (!typeAcqInclude.includes(type)) {
178426
178360
  typeAcqInclude.push(type);
178427
178361
  }
178428
178362
  }
@@ -178441,13 +178375,13 @@ Dynamic files must always be opened with service's current directory or service
178441
178375
  return groupNumberOrString;
178442
178376
  }).join("");
178443
178377
  });
178444
- if (excludeRules.indexOf(processedRule) === -1) {
178378
+ if (!excludeRules.includes(processedRule)) {
178445
178379
  excludeRules.push(processedRule);
178446
178380
  }
178447
178381
  }
178448
178382
  } else {
178449
178383
  const escaped = _ProjectService.escapeFilenameForRegex(root);
178450
- if (excludeRules.indexOf(escaped) < 0) {
178384
+ if (!excludeRules.includes(escaped)) {
178451
178385
  excludeRules.push(escaped);
178452
178386
  }
178453
178387
  }
@@ -178471,7 +178405,7 @@ Dynamic files must always be opened with service's current directory or service
178471
178405
  this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`);
178472
178406
  excludedFiles.push(normalizedNames[i]);
178473
178407
  exclude = true;
178474
- if (typeAcqInclude.indexOf(typeName) < 0) {
178408
+ if (!typeAcqInclude.includes(typeName)) {
178475
178409
  typeAcqInclude.push(typeName);
178476
178410
  }
178477
178411
  }
@@ -182011,7 +181945,7 @@ ${e.message}`;
182011
181945
  if (languageServiceDisabled) {
182012
181946
  return;
182013
181947
  }
182014
- const fileNamesInProject = fileNames.filter((value) => !stringContains(value, "lib.d.ts"));
181948
+ const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts"));
182015
181949
  if (fileNamesInProject.length === 0) {
182016
181950
  return;
182017
181951
  }
@@ -184703,7 +184637,6 @@ ${e.message}`;
184703
184637
  isNamedImports: () => isNamedImports,
184704
184638
  isNamedImportsOrExports: () => isNamedImportsOrExports,
184705
184639
  isNamedTupleMember: () => isNamedTupleMember,
184706
- isNamedTupleMemberName: () => isNamedTupleMemberName,
184707
184640
  isNamespaceBody: () => isNamespaceBody,
184708
184641
  isNamespaceExport: () => isNamespaceExport,
184709
184642
  isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,
@@ -185066,8 +184999,6 @@ ${e.message}`;
185066
184999
  outFile: () => outFile,
185067
185000
  packageIdToPackageName: () => packageIdToPackageName,
185068
185001
  packageIdToString: () => packageIdToString,
185069
- padLeft: () => padLeft,
185070
- padRight: () => padRight,
185071
185002
  paramHelper: () => paramHelper,
185072
185003
  parameterIsThisKeyword: () => parameterIsThisKeyword,
185073
185004
  parameterNamePart: () => parameterNamePart,
@@ -185274,7 +185205,6 @@ ${e.message}`;
185274
185205
  startsWithDirectory: () => startsWithDirectory,
185275
185206
  startsWithUnderscore: () => startsWithUnderscore,
185276
185207
  startsWithUseStrict: () => startsWithUseStrict,
185277
- stringContains: () => stringContains,
185278
185208
  stringContainsAt: () => stringContainsAt,
185279
185209
  stringToToken: () => stringToToken,
185280
185210
  stripQuotes: () => stripQuotes,
@@ -185361,9 +185291,6 @@ ${e.message}`;
185361
185291
  transpile: () => transpile,
185362
185292
  transpileModule: () => transpileModule,
185363
185293
  transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,
185364
- trimString: () => trimString,
185365
- trimStringEnd: () => trimStringEnd,
185366
- trimStringStart: () => trimStringStart,
185367
185294
  tryAddToSet: () => tryAddToSet,
185368
185295
  tryAndIgnoreErrors: () => tryAndIgnoreErrors,
185369
185296
  tryCast: () => tryCast,
@@ -187113,7 +187040,6 @@ ${e.message}`;
187113
187040
  isNamedImports: () => isNamedImports,
187114
187041
  isNamedImportsOrExports: () => isNamedImportsOrExports,
187115
187042
  isNamedTupleMember: () => isNamedTupleMember,
187116
- isNamedTupleMemberName: () => isNamedTupleMemberName,
187117
187043
  isNamespaceBody: () => isNamespaceBody,
187118
187044
  isNamespaceExport: () => isNamespaceExport,
187119
187045
  isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,
@@ -187476,8 +187402,6 @@ ${e.message}`;
187476
187402
  outFile: () => outFile,
187477
187403
  packageIdToPackageName: () => packageIdToPackageName,
187478
187404
  packageIdToString: () => packageIdToString,
187479
- padLeft: () => padLeft,
187480
- padRight: () => padRight,
187481
187405
  paramHelper: () => paramHelper,
187482
187406
  parameterIsThisKeyword: () => parameterIsThisKeyword,
187483
187407
  parameterNamePart: () => parameterNamePart,
@@ -187684,7 +187608,6 @@ ${e.message}`;
187684
187608
  startsWithDirectory: () => startsWithDirectory,
187685
187609
  startsWithUnderscore: () => startsWithUnderscore,
187686
187610
  startsWithUseStrict: () => startsWithUseStrict,
187687
- stringContains: () => stringContains,
187688
187611
  stringContainsAt: () => stringContainsAt,
187689
187612
  stringToToken: () => stringToToken,
187690
187613
  stripQuotes: () => stripQuotes,
@@ -187771,9 +187694,6 @@ ${e.message}`;
187771
187694
  transpile: () => transpile,
187772
187695
  transpileModule: () => transpileModule,
187773
187696
  transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,
187774
- trimString: () => trimString,
187775
- trimStringEnd: () => trimStringEnd,
187776
- trimStringStart: () => trimStringStart,
187777
187697
  tryAddToSet: () => tryAddToSet,
187778
187698
  tryAndIgnoreErrors: () => tryAndIgnoreErrors,
187779
187699
  tryCast: () => tryCast,