@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/tsserver.js CHANGED
@@ -1587,7 +1587,6 @@ __export(server_exports, {
1587
1587
  isNamedImports: () => isNamedImports,
1588
1588
  isNamedImportsOrExports: () => isNamedImportsOrExports,
1589
1589
  isNamedTupleMember: () => isNamedTupleMember,
1590
- isNamedTupleMemberName: () => isNamedTupleMemberName,
1591
1590
  isNamespaceBody: () => isNamespaceBody,
1592
1591
  isNamespaceExport: () => isNamespaceExport,
1593
1592
  isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,
@@ -1950,8 +1949,6 @@ __export(server_exports, {
1950
1949
  outFile: () => outFile,
1951
1950
  packageIdToPackageName: () => packageIdToPackageName,
1952
1951
  packageIdToString: () => packageIdToString,
1953
- padLeft: () => padLeft,
1954
- padRight: () => padRight,
1955
1952
  paramHelper: () => paramHelper,
1956
1953
  parameterIsThisKeyword: () => parameterIsThisKeyword,
1957
1954
  parameterNamePart: () => parameterNamePart,
@@ -2158,7 +2155,6 @@ __export(server_exports, {
2158
2155
  startsWithDirectory: () => startsWithDirectory,
2159
2156
  startsWithUnderscore: () => startsWithUnderscore,
2160
2157
  startsWithUseStrict: () => startsWithUseStrict,
2161
- stringContains: () => stringContains,
2162
2158
  stringContainsAt: () => stringContainsAt,
2163
2159
  stringToToken: () => stringToToken,
2164
2160
  stripQuotes: () => stripQuotes,
@@ -2245,9 +2241,6 @@ __export(server_exports, {
2245
2241
  transpile: () => transpile,
2246
2242
  transpileModule: () => transpileModule,
2247
2243
  transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,
2248
- trimString: () => trimString,
2249
- trimStringEnd: () => trimStringEnd,
2250
- trimStringStart: () => trimStringStart,
2251
2244
  tryAddToSet: () => tryAddToSet,
2252
2245
  tryAndIgnoreErrors: () => tryAndIgnoreErrors,
2253
2246
  tryCast: () => tryCast,
@@ -2334,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
2334
2327
 
2335
2328
  // src/compiler/corePublic.ts
2336
2329
  var versionMajorMinor = "5.3";
2337
- var version = `${versionMajorMinor}.0-insiders.20230825`;
2330
+ var version = `${versionMajorMinor}.0-insiders.20230829`;
2338
2331
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2339
2332
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2340
2333
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3629,10 +3622,7 @@ function getStringComparer(ignoreCase) {
3629
3622
  return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
3630
3623
  }
3631
3624
  var createUIStringComparer = (() => {
3632
- let defaultComparer;
3633
- let enUSComparer;
3634
- const stringComparerFactory = getStringComparerFactory();
3635
- return createStringComparer;
3625
+ return createIntlCollatorStringComparer;
3636
3626
  function compareWithCallback(a, b, comparer) {
3637
3627
  if (a === b)
3638
3628
  return 0 /* EqualTo */;
@@ -3647,41 +3637,6 @@ var createUIStringComparer = (() => {
3647
3637
  const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
3648
3638
  return (a, b) => compareWithCallback(a, b, comparer);
3649
3639
  }
3650
- function createLocaleCompareStringComparer(locale) {
3651
- if (locale !== void 0)
3652
- return createFallbackStringComparer();
3653
- return (a, b) => compareWithCallback(a, b, compareStrings);
3654
- function compareStrings(a, b) {
3655
- return a.localeCompare(b);
3656
- }
3657
- }
3658
- function createFallbackStringComparer() {
3659
- return (a, b) => compareWithCallback(a, b, compareDictionaryOrder);
3660
- function compareDictionaryOrder(a, b) {
3661
- return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b);
3662
- }
3663
- function compareStrings(a, b) {
3664
- return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */;
3665
- }
3666
- }
3667
- function getStringComparerFactory() {
3668
- if (typeof Intl === "object" && typeof Intl.Collator === "function") {
3669
- return createIntlCollatorStringComparer;
3670
- }
3671
- if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) {
3672
- return createLocaleCompareStringComparer;
3673
- }
3674
- return createFallbackStringComparer;
3675
- }
3676
- function createStringComparer(locale) {
3677
- if (locale === void 0) {
3678
- return defaultComparer || (defaultComparer = stringComparerFactory(locale));
3679
- } else if (locale === "en-US") {
3680
- return enUSComparer || (enUSComparer = stringComparerFactory(locale));
3681
- } else {
3682
- return stringComparerFactory(locale);
3683
- }
3684
- }
3685
3640
  })();
3686
3641
  var uiComparerCaseSensitive;
3687
3642
  var uiLocale;
@@ -3780,9 +3735,6 @@ function removeSuffix(str, suffix) {
3780
3735
  function tryRemoveSuffix(str, suffix) {
3781
3736
  return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0;
3782
3737
  }
3783
- function stringContains(str, substring) {
3784
- return str.indexOf(substring) !== -1;
3785
- }
3786
3738
  function removeMinAndVersionNumbers(fileName) {
3787
3739
  let end = fileName.length;
3788
3740
  for (let pos = end - 1; pos > 0; pos--) {
@@ -3965,12 +3917,6 @@ function cartesianProductWorker(arrays, result, outer, index) {
3965
3917
  }
3966
3918
  }
3967
3919
  }
3968
- function padLeft(s, length2, padString = " ") {
3969
- return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s;
3970
- }
3971
- function padRight(s, length2, padString = " ") {
3972
- return length2 <= s.length ? s : s + padString.repeat(length2 - s.length);
3973
- }
3974
3920
  function takeWhile(array, predicate) {
3975
3921
  if (array) {
3976
3922
  const len = array.length;
@@ -3991,18 +3937,6 @@ function skipWhile(array, predicate) {
3991
3937
  return array.slice(index);
3992
3938
  }
3993
3939
  }
3994
- var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s));
3995
- var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl;
3996
- var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, "");
3997
- function trimEndImpl(s) {
3998
- let end = s.length - 1;
3999
- while (end >= 0) {
4000
- if (!isWhiteSpaceLike(s.charCodeAt(end)))
4001
- break;
4002
- end--;
4003
- }
4004
- return s.slice(0, end + 1);
4005
- }
4006
3940
  function isNodeLikeSystem() {
4007
3941
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
4008
3942
  }
@@ -5198,18 +5132,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i;
5198
5132
  var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;
5199
5133
  function parseRange(text) {
5200
5134
  const alternatives = [];
5201
- for (let range of trimString(text).split(logicalOrRegExp)) {
5135
+ for (let range of text.trim().split(logicalOrRegExp)) {
5202
5136
  if (!range)
5203
5137
  continue;
5204
5138
  const comparators = [];
5205
- range = trimString(range);
5139
+ range = range.trim();
5206
5140
  const match = hyphenRegExp.exec(range);
5207
5141
  if (match) {
5208
5142
  if (!parseHyphen(match[1], match[2], comparators))
5209
5143
  return void 0;
5210
5144
  } else {
5211
5145
  for (const simple of range.split(whitespaceRegExp)) {
5212
- const match2 = rangeRegExp.exec(trimString(simple));
5146
+ const match2 = rangeRegExp.exec(simple.trim());
5213
5147
  if (!match2 || !parseComparator(match2[1], match2[2], comparators))
5214
5148
  return void 0;
5215
5149
  }
@@ -8026,11 +7960,11 @@ function createDirectoryWatcherSupportingRecursive({
8026
7960
  return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory);
8027
7961
  }
8028
7962
  function isInPath(path, searchPath) {
8029
- if (stringContains(path, searchPath))
7963
+ if (path.includes(searchPath))
8030
7964
  return true;
8031
7965
  if (useCaseSensitiveFileNames2)
8032
7966
  return false;
8033
- return stringContains(toCanonicalFilePath(path), searchPath);
7967
+ return toCanonicalFilePath(path).includes(searchPath);
8034
7968
  }
8035
7969
  }
8036
7970
  var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
@@ -8878,7 +8812,7 @@ function pathIsBareSpecifier(path) {
8878
8812
  return !pathIsAbsolute(path) && !pathIsRelative(path);
8879
8813
  }
8880
8814
  function hasExtension(fileName) {
8881
- return stringContains(getBaseFileName(fileName), ".");
8815
+ return getBaseFileName(fileName).includes(".");
8882
8816
  }
8883
8817
  function fileExtensionIs(path, extension) {
8884
8818
  return path.length > extension.length && endsWith(path, extension);
@@ -9023,7 +8957,7 @@ function getPathFromPathComponents(pathComponents2, length2) {
9023
8957
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
9024
8958
  }
9025
8959
  function normalizeSlashes(path) {
9026
- return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path;
8960
+ return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path;
9027
8961
  }
9028
8962
  function reducePathComponents(components) {
9029
8963
  if (!some(components))
@@ -12408,7 +12342,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12408
12342
  tokenFlags |= 2048 /* ContainsInvalidEscape */;
12409
12343
  if (shouldEmitInvalidEscapeError) {
12410
12344
  const code = parseInt(text.substring(start3 + 1, pos), 8);
12411
- error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + padLeft(code.toString(16), 2, "0"));
12345
+ error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + code.toString(16).padStart(2, "0"));
12412
12346
  return String.fromCharCode(code);
12413
12347
  }
12414
12348
  return text.substring(start3, pos);
@@ -13211,7 +13145,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13211
13145
  return token;
13212
13146
  }
13213
13147
  function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
13214
- const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx);
13148
+ const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
13215
13149
  if (type === void 0) {
13216
13150
  return commentDirectives2;
13217
13151
  }
@@ -13545,20 +13479,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
13545
13479
  inJSDocType += inType ? 1 : -1;
13546
13480
  }
13547
13481
  }
13548
- var codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) {
13549
- const size = str.length;
13550
- if (i < 0 || i >= size) {
13551
- return void 0;
13552
- }
13553
- const first2 = str.charCodeAt(i);
13554
- if (first2 >= 55296 && first2 <= 56319 && size > i + 1) {
13555
- const second = str.charCodeAt(i + 1);
13556
- if (second >= 56320 && second <= 57343) {
13557
- return (first2 - 55296) * 1024 + second - 56320 + 65536;
13558
- }
13559
- }
13560
- return first2;
13561
- };
13482
+ function codePointAt(s, i) {
13483
+ return s.codePointAt(i);
13484
+ }
13562
13485
  function charSize(ch) {
13563
13486
  if (ch >= 65536) {
13564
13487
  return 2;
@@ -15245,7 +15168,7 @@ function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, pack
15245
15168
  void 0,
15246
15169
  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,
15247
15170
  node10Result,
15248
- node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName
15171
+ node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName
15249
15172
  ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages(
15250
15173
  /*details*/
15251
15174
  void 0,
@@ -15521,7 +15444,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) {
15521
15444
  }
15522
15445
  let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end);
15523
15446
  if (isJSDocTypeExpressionOrChild(node)) {
15524
- text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n");
15447
+ text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n");
15525
15448
  }
15526
15449
  return text;
15527
15450
  }
@@ -18754,7 +18677,7 @@ function isQuoteOrBacktick(charCode) {
18754
18677
  }
18755
18678
  function isIntrinsicJsxName(name) {
18756
18679
  const ch = name.charCodeAt(0);
18757
- return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-");
18680
+ return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-");
18758
18681
  }
18759
18682
  var indentStrings = ["", " "];
18760
18683
  function getIndentString(level) {
@@ -18768,7 +18691,7 @@ function getIndentSize() {
18768
18691
  return indentStrings[1].length;
18769
18692
  }
18770
18693
  function isNightly() {
18771
- return stringContains(version, "-dev") || stringContains(version, "-insiders");
18694
+ return version.includes("-dev") || version.includes("-insiders");
18772
18695
  }
18773
18696
  function createTextWriter(newLine) {
18774
18697
  var output;
@@ -18958,7 +18881,7 @@ function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
18958
18881
  return void 0;
18959
18882
  }
18960
18883
  const specifier = getExternalModuleName(declaration);
18961
- if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) {
18884
+ if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) {
18962
18885
  return void 0;
18963
18886
  }
18964
18887
  return getResolvedExternalModuleName(host, file);
@@ -19310,7 +19233,7 @@ function writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLin
19310
19233
  }
19311
19234
  function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) {
19312
19235
  const end = Math.min(commentEnd, nextLineStart - 1);
19313
- const currentLineText = trimString(text.substring(pos, end));
19236
+ const currentLineText = text.substring(pos, end).trim();
19314
19237
  if (currentLineText) {
19315
19238
  writer.writeComment(currentLineText);
19316
19239
  if (end !== commentEnd) {
@@ -20963,7 +20886,7 @@ function getSupportedExtensions(options, extraFileExtensions) {
20963
20886
  const flatBuiltins = flatten(builtins);
20964
20887
  const extensions = [
20965
20888
  ...builtins,
20966
- ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0)
20889
+ ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0)
20967
20890
  ];
20968
20891
  return extensions;
20969
20892
  }
@@ -21425,7 +21348,7 @@ function expressionResultIsUnused(node) {
21425
21348
  }
21426
21349
  }
21427
21350
  function containsIgnoredPath(path) {
21428
- return some(ignoredPaths, (p) => stringContains(path, p));
21351
+ return some(ignoredPaths, (p) => path.includes(p));
21429
21352
  }
21430
21353
  function getContainingNodeArray(node) {
21431
21354
  if (!node.parent)
@@ -21686,9 +21609,6 @@ function getPropertyNameFromType(type) {
21686
21609
  }
21687
21610
  return Debug.fail();
21688
21611
  }
21689
- function isNamedTupleMemberName(node) {
21690
- return node.kind === 80 /* Identifier */ || node.kind === 203 /* TemplateLiteralType */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */;
21691
- }
21692
21612
 
21693
21613
  // src/compiler/factory/baseNodeFactory.ts
21694
21614
  function createBaseNodeFactory() {
@@ -33063,29 +32983,21 @@ var Parser;
33063
32983
  }
33064
32984
  return type;
33065
32985
  }
33066
- function isTokenColonOrQuestionColon() {
33067
- return token() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */;
32986
+ function isNextTokenColonOrQuestionColon() {
32987
+ return nextToken() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */;
33068
32988
  }
33069
32989
  function isTupleElementName() {
33070
32990
  if (token() === 26 /* DotDotDotToken */) {
33071
- nextToken();
33072
- }
33073
- if (token() === 16 /* TemplateHead */) {
33074
- parseTemplateType();
33075
- return isTokenColonOrQuestionColon();
32991
+ return tokenIsIdentifierOrKeyword(nextToken()) && isNextTokenColonOrQuestionColon();
33076
32992
  }
33077
- if (tokenIsIdentifierOrKeyword(token()) || token() === 15 /* NoSubstitutionTemplateLiteral */) {
33078
- nextToken();
33079
- return isTokenColonOrQuestionColon();
33080
- }
33081
- return false;
32993
+ return tokenIsIdentifierOrKeyword(token()) && isNextTokenColonOrQuestionColon();
33082
32994
  }
33083
32995
  function parseTupleElementNameOrTupleElementType() {
33084
32996
  if (lookAhead(isTupleElementName)) {
33085
32997
  const pos = getNodePos();
33086
32998
  const hasJSDoc = hasPrecedingJSDocComment();
33087
32999
  const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
33088
- const name = token() === 15 /* NoSubstitutionTemplateLiteral */ ? parseLiteralLikeNode(token()) : token() === 16 /* TemplateHead */ ? parseTemplateType() : parseIdentifierName();
33000
+ const name = parseIdentifierName();
33089
33001
  const questionToken = parseOptionalToken(58 /* QuestionToken */);
33090
33002
  parseExpected(59 /* ColonToken */);
33091
33003
  const type = parseTupleElementType();
@@ -36164,7 +36076,7 @@ var Parser;
36164
36076
  }
36165
36077
  function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) {
36166
36078
  const namespaceFlag = flags & 32 /* Namespace */;
36167
- const name = parseIdentifier();
36079
+ const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier();
36168
36080
  const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration(
36169
36081
  getNodePos(),
36170
36082
  /*hasJSDoc*/
@@ -36634,8 +36546,6 @@ var Parser;
36634
36546
  PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter";
36635
36547
  })(PropertyLikeParse || (PropertyLikeParse = {}));
36636
36548
  function parseJSDocCommentWorker(start2 = 0, length2) {
36637
- const saveParsingContext = parsingContext;
36638
- parsingContext |= 1 << 25 /* JSDocComment */;
36639
36549
  const content = sourceText;
36640
36550
  const end = length2 === void 0 ? content.length : start2 + length2;
36641
36551
  length2 = end - start2;
@@ -36652,6 +36562,8 @@ var Parser;
36652
36562
  let commentsPos;
36653
36563
  let comments = [];
36654
36564
  const parts = [];
36565
+ const saveParsingContext = parsingContext;
36566
+ parsingContext |= 1 << 25 /* JSDocComment */;
36655
36567
  const result = scanner2.scanRange(start2 + 3, length2 - 5, doJSDocScan);
36656
36568
  parsingContext = saveParsingContext;
36657
36569
  return result;
@@ -36743,7 +36655,7 @@ var Parser;
36743
36655
  nextTokenJSDoc();
36744
36656
  }
36745
36657
  }
36746
- const trimmedComments = trimStringEnd(comments.join(""));
36658
+ const trimmedComments = comments.join("").trimEnd();
36747
36659
  if (parts.length && trimmedComments.length) {
36748
36660
  parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start2, commentsPos));
36749
36661
  }
@@ -36759,7 +36671,7 @@ var Parser;
36759
36671
  }
36760
36672
  function removeTrailingWhitespace(comments2) {
36761
36673
  while (comments2.length) {
36762
- const trimmed = trimStringEnd(comments2[comments2.length - 1]);
36674
+ const trimmed = comments2[comments2.length - 1].trimEnd();
36763
36675
  if (trimmed === "") {
36764
36676
  comments2.pop();
36765
36677
  } else if (trimmed.length < comments2[comments2.length - 1].length) {
@@ -36999,7 +36911,7 @@ var Parser;
36999
36911
  }
37000
36912
  }
37001
36913
  removeLeadingNewlines(comments2);
37002
- const trimmedComments = trimStringEnd(comments2.join(""));
36914
+ const trimmedComments = comments2.join("").trimEnd();
37003
36915
  if (parts2.length) {
37004
36916
  if (trimmedComments.length) {
37005
36917
  parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2));
@@ -37897,7 +37809,7 @@ var IncrementalParser;
37897
37809
  })(InvalidPosition || (InvalidPosition = {}));
37898
37810
  })(IncrementalParser || (IncrementalParser = {}));
37899
37811
  function isDeclarationFileName(fileName) {
37900
- return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d.");
37812
+ return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d.");
37901
37813
  }
37902
37814
  function parseResolutionMode(mode, pos, end, reportDiagnostic) {
37903
37815
  if (!mode) {
@@ -38083,7 +37995,7 @@ function getNamedPragmaArguments(pragma, text) {
38083
37995
  return {};
38084
37996
  if (!pragma.args)
38085
37997
  return {};
38086
- const args = trimString(text).split(/\s+/);
37998
+ const args = text.trim().split(/\s+/);
38087
37999
  const argMap = {};
38088
38000
  for (let i = 0; i < pragma.args.length; i++) {
38089
38001
  const argument = pragma.args[i];
@@ -39608,14 +39520,14 @@ function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
39608
39520
  return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
39609
39521
  }
39610
39522
  function parseCustomTypeOption(opt, value, errors) {
39611
- return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
39523
+ return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors);
39612
39524
  }
39613
39525
  function parseListTypeOption(opt, value = "", errors) {
39614
- value = trimString(value);
39526
+ value = value.trim();
39615
39527
  if (startsWith(value, "-")) {
39616
39528
  return void 0;
39617
39529
  }
39618
- if (opt.type === "listOrElement" && !stringContains(value, ",")) {
39530
+ if (opt.type === "listOrElement" && !value.includes(",")) {
39619
39531
  return validateJsonOptionValue(opt, value, errors);
39620
39532
  }
39621
39533
  if (value === "") {
@@ -40661,7 +40573,7 @@ function parseConfig(json, sourceFile, host, basePath, configFileName, resolutio
40661
40573
  var _a;
40662
40574
  basePath = normalizeSlashes(basePath);
40663
40575
  const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath);
40664
- if (resolutionStack.indexOf(resolvedPath) >= 0) {
40576
+ if (resolutionStack.includes(resolvedPath)) {
40665
40577
  errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> ")));
40666
40578
  return { raw: json || convertToObject(sourceFile, errors) };
40667
40579
  }
@@ -42493,7 +42405,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
42493
42405
  result = tryResolve(extensions, state);
42494
42406
  }
42495
42407
  let legacyResult;
42496
- 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) {
42408
+ 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")) {
42497
42409
  traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
42498
42410
  const diagnosticState = {
42499
42411
  ...state,
@@ -42537,7 +42449,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
42537
42449
  resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
42538
42450
  }
42539
42451
  if (!resolved2) {
42540
- if (moduleName.indexOf(":") > -1) {
42452
+ if (moduleName.includes(":")) {
42541
42453
  if (traceEnabled) {
42542
42454
  trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
42543
42455
  }
@@ -42627,7 +42539,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures,
42627
42539
  }
42628
42540
  var nodeModulesPathPart = "/node_modules/";
42629
42541
  function pathContainsNodeModules(path) {
42630
- return stringContains(path, nodeModulesPathPart);
42542
+ return path.includes(nodeModulesPathPart);
42631
42543
  }
42632
42544
  function parseNodeModuleFromPath(resolved, isFolder) {
42633
42545
  const path = normalizePath(resolved);
@@ -42663,7 +42575,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
42663
42575
  }
42664
42576
  function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
42665
42577
  const filename = getBaseFileName(candidate);
42666
- if (filename.indexOf(".") === -1) {
42578
+ if (!filename.includes(".")) {
42667
42579
  return void 0;
42668
42580
  }
42669
42581
  let extensionless = removeFileExtension(candidate);
@@ -42820,7 +42732,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
42820
42732
  function loadEntrypointsFromTargetExports(target) {
42821
42733
  var _a, _b;
42822
42734
  if (typeof target === "string" && startsWith(target, "./")) {
42823
- if (target.indexOf("*") >= 0 && state.host.readDirectory) {
42735
+ if (target.includes("*") && state.host.readDirectory) {
42824
42736
  if (target.indexOf("*") !== target.lastIndexOf("*")) {
42825
42737
  return false;
42826
42738
  }
@@ -42839,7 +42751,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
42839
42751
  });
42840
42752
  } else {
42841
42753
  const partsAfterFirst = getPathComponents(target).slice(2);
42842
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
42754
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
42843
42755
  return false;
42844
42756
  }
42845
42757
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
@@ -43207,7 +43119,7 @@ function comparePatternKeys(a, b) {
43207
43119
  }
43208
43120
  function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
43209
43121
  const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
43210
- if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) {
43122
+ if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) {
43211
43123
  const target = lookupTable[moduleName];
43212
43124
  return loadModuleFromTargetImportOrExport(
43213
43125
  target,
@@ -43218,7 +43130,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe
43218
43130
  moduleName
43219
43131
  );
43220
43132
  }
43221
- const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys);
43133
+ const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys);
43222
43134
  for (const potentialTarget of expandingKeys) {
43223
43135
  if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) {
43224
43136
  const target = lookupTable[potentialTarget];
@@ -43312,7 +43224,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
43312
43224
  }
43313
43225
  const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target);
43314
43226
  const partsAfterFirst = parts.slice(1);
43315
- if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
43227
+ if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) {
43316
43228
  if (state.traceEnabled) {
43317
43229
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
43318
43230
  }
@@ -43323,7 +43235,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
43323
43235
  }
43324
43236
  const resolvedTarget = combinePaths(scope.packageDirectory, target);
43325
43237
  const subpathParts = getPathComponents(subpath);
43326
- if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
43238
+ if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) {
43327
43239
  if (state.traceEnabled) {
43328
43240
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
43329
43241
  }
@@ -43350,7 +43262,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
43350
43262
  if (!Array.isArray(target)) {
43351
43263
  traceIfEnabled(state, Diagnostics.Entering_conditional_exports);
43352
43264
  for (const condition of getOwnKeys(target)) {
43353
- if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) {
43265
+ if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
43354
43266
  traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
43355
43267
  const subTarget = target[condition];
43356
43268
  const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key);
@@ -43411,7 +43323,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
43411
43323
  }
43412
43324
  function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
43413
43325
  var _a, _b, _c, _d;
43414
- 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)) {
43326
+ 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)) {
43415
43327
  const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
43416
43328
  const commonSourceDirGuesses = [];
43417
43329
  if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
@@ -43485,7 +43397,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec
43485
43397
  }
43486
43398
  }
43487
43399
  function isApplicableVersionedTypesKey(conditions, key) {
43488
- if (conditions.indexOf("types") === -1)
43400
+ if (!conditions.includes("types"))
43489
43401
  return false;
43490
43402
  if (!startsWith(key, "types@"))
43491
43403
  return false;
@@ -43690,7 +43602,7 @@ function getPackageNameFromTypesPackageName(mangledName) {
43690
43602
  return mangledName;
43691
43603
  }
43692
43604
  function unmangleScopedPackageName(typesPackageName) {
43693
- return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;
43605
+ return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName;
43694
43606
  }
43695
43607
  function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) {
43696
43608
  const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference);
@@ -47383,12 +47295,12 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
47383
47295
  /*currentDirectory*/
47384
47296
  void 0
47385
47297
  );
47386
- const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */;
47298
+ const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */;
47387
47299
  return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2);
47388
47300
  });
47389
47301
  } else {
47390
47302
  for (const key of getOwnKeys(exports)) {
47391
- if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) {
47303
+ if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) {
47392
47304
  const subTarget = exports[key];
47393
47305
  const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode);
47394
47306
  if (result) {
@@ -47554,7 +47466,7 @@ function processEnding(fileName, allowedEndings, options, host) {
47554
47466
  return fileName;
47555
47467
  } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) {
47556
47468
  return noExtension + getJSExtensionForFile(fileName, options);
47557
- } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) {
47469
+ } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) {
47558
47470
  return tryGetRealFileNameForNonJsDeclarationFileName(fileName);
47559
47471
  }
47560
47472
  switch (allowedEndings[0]) {
@@ -47580,7 +47492,7 @@ function processEnding(fileName, allowedEndings, options, host) {
47580
47492
  }
47581
47493
  function tryGetRealFileNameForNonJsDeclarationFileName(fileName) {
47582
47494
  const baseName = getBaseFileName(fileName);
47583
- if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */]))
47495
+ if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */]))
47584
47496
  return void 0;
47585
47497
  const noExtension = removeExtension(fileName, ".ts" /* Ts */);
47586
47498
  const ext = noExtension.substring(noExtension.lastIndexOf("."));
@@ -48299,6 +48211,7 @@ function createTypeChecker(host) {
48299
48211
  var anyType = createIntrinsicType(1 /* Any */, "any");
48300
48212
  var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */);
48301
48213
  var wildcardType = createIntrinsicType(1 /* Any */, "any");
48214
+ var blockedStringType = createIntrinsicType(1 /* Any */, "any");
48302
48215
  var errorType = createIntrinsicType(1 /* Any */, "error");
48303
48216
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
48304
48217
  var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */);
@@ -49985,7 +49898,7 @@ function createTypeChecker(host) {
49985
49898
  }
49986
49899
  }
49987
49900
  function isSameScopeDescendentOf(initial, parent2, stopAt) {
49988
- return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false));
49901
+ return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? "quit" : false));
49989
49902
  }
49990
49903
  function getAnyImportSyntax(node) {
49991
49904
  switch (node.kind) {
@@ -52803,11 +52716,10 @@ function createTypeChecker(host) {
52803
52716
  for (let i = 0; i < tupleConstituentNodes.length; i++) {
52804
52717
  const flags = type2.target.elementFlags[i];
52805
52718
  const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i];
52806
- const label = labeledElementDeclaration && getTupleElementLabel(type2, labeledElementDeclaration);
52807
- if (label) {
52719
+ if (labeledElementDeclaration) {
52808
52720
  tupleConstituentNodes[i] = factory.createNamedTupleMember(
52809
52721
  flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0,
52810
- factory.createIdentifier(unescapeLeadingUnderscores(label)),
52722
+ factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))),
52811
52723
  flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0,
52812
52724
  flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]
52813
52725
  );
@@ -53642,12 +53554,12 @@ function createTypeChecker(host) {
53642
53554
  if (!specifier) {
53643
53555
  specifier = getSpecifierForModuleSymbol(chain[0], context);
53644
53556
  }
53645
- if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) {
53557
+ if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) {
53646
53558
  const oldSpecifier = specifier;
53647
53559
  if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) {
53648
53560
  const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */;
53649
53561
  specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode);
53650
- if (specifier.indexOf("/node_modules/") >= 0) {
53562
+ if (specifier.includes("/node_modules/")) {
53651
53563
  specifier = oldSpecifier;
53652
53564
  } else {
53653
53565
  assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([
@@ -54210,6 +54122,7 @@ function createTypeChecker(host) {
54210
54122
  }
54211
54123
  }
54212
54124
  function symbolTableToDeclarationStatements(symbolTable, context, bundled) {
54125
+ var _a;
54213
54126
  const serializePropertySymbolForClass = makeSerializePropertySymbol(
54214
54127
  factory.createPropertyDeclaration,
54215
54128
  174 /* MethodDeclaration */,
@@ -54231,12 +54144,15 @@ function createTypeChecker(host) {
54231
54144
  ...oldcontext,
54232
54145
  usedSymbolNames: new Set(oldcontext.usedSymbolNames),
54233
54146
  remappedSymbolNames: /* @__PURE__ */ new Map(),
54147
+ remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()),
54234
54148
  tracker: void 0
54235
54149
  };
54236
54150
  const tracker = {
54237
54151
  ...oldcontext.tracker.inner,
54238
54152
  trackSymbol: (sym, decl, meaning) => {
54239
- var _a;
54153
+ var _a2, _b;
54154
+ if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym)))
54155
+ return false;
54240
54156
  const accessibleResult = isSymbolAccessible(
54241
54157
  sym,
54242
54158
  decl,
@@ -54253,7 +54169,7 @@ function createTypeChecker(host) {
54253
54169
  includePrivateSymbol(root);
54254
54170
  }
54255
54171
  }
54256
- } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) {
54172
+ } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) {
54257
54173
  return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning);
54258
54174
  }
54259
54175
  return false;
@@ -54353,7 +54269,7 @@ function createTypeChecker(host) {
54353
54269
  for (const group2 of groups) {
54354
54270
  if (group2.length > 1) {
54355
54271
  statements = [
54356
- ...filter(statements, (s) => group2.indexOf(s) === -1),
54272
+ ...filter(statements, (s) => !group2.includes(s)),
54357
54273
  factory.createExportDeclaration(
54358
54274
  /*modifiers*/
54359
54275
  void 0,
@@ -54462,10 +54378,10 @@ function createTypeChecker(host) {
54462
54378
  context = oldContext;
54463
54379
  }
54464
54380
  }
54465
- function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) {
54466
- var _a, _b, _c, _d;
54467
- const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName);
54468
- const isDefault = symbol.escapedName === "default" /* Default */;
54381
+ function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) {
54382
+ var _a2, _b, _c, _d, _e, _f;
54383
+ const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName);
54384
+ const isDefault = escapedSymbolName === "default" /* Default */;
54469
54385
  if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) {
54470
54386
  context.encounteredError = true;
54471
54387
  return;
@@ -54476,7 +54392,7 @@ function createTypeChecker(host) {
54476
54392
  isPrivate = true;
54477
54393
  }
54478
54394
  const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0);
54479
- const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */;
54395
+ const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */;
54480
54396
  const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol);
54481
54397
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) {
54482
54398
  serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags);
@@ -54484,7 +54400,7 @@ function createTypeChecker(host) {
54484
54400
  if (symbol.flags & 524288 /* TypeAlias */) {
54485
54401
  serializeTypeAlias(symbol, symbolName2, modifierFlags);
54486
54402
  }
54487
- 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) {
54403
+ 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) {
54488
54404
  if (propertyAsAlias) {
54489
54405
  const createdExport = serializeMaybeAliasAssignment(symbol);
54490
54406
  if (createdExport) {
@@ -54494,17 +54410,24 @@ function createTypeChecker(host) {
54494
54410
  } else {
54495
54411
  const type = getTypeOfSymbol(symbol);
54496
54412
  const localName = getInternalSymbolName(symbol, symbolName2);
54497
- if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) {
54413
+ 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))) {
54414
+ if (!context.remappedSymbolReferences) {
54415
+ context.remappedSymbolReferences = /* @__PURE__ */ new Map();
54416
+ }
54417
+ context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol);
54418
+ serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName);
54419
+ context.remappedSymbolReferences.delete(getSymbolId(type.symbol));
54420
+ } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) {
54498
54421
  serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags);
54499
54422
  } else {
54500
- 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 */;
54423
+ 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 */;
54501
54424
  const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol);
54502
54425
  let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d));
54503
54426
  if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
54504
54427
  textRange = textRange.parent.parent;
54505
54428
  }
54506
- const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression);
54507
- if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) {
54429
+ const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression);
54430
+ if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) {
54508
54431
  const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right;
54509
54432
  addResult(
54510
54433
  factory.createExportDeclaration(
@@ -54659,11 +54582,11 @@ function createTypeChecker(host) {
54659
54582
  results.push(node);
54660
54583
  }
54661
54584
  function serializeTypeAlias(symbol, symbolName2, modifierFlags) {
54662
- var _a;
54585
+ var _a2;
54663
54586
  const aliasType = getDeclaredTypeOfTypeAlias(symbol);
54664
54587
  const typeParams = getSymbolLinks(symbol).typeParameters;
54665
54588
  const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context));
54666
- const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias);
54589
+ const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias);
54667
54590
  const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0);
54668
54591
  const oldFlags = context.flags;
54669
54592
  context.flags |= 8388608 /* InTypeAlias */;
@@ -54734,12 +54657,12 @@ function createTypeChecker(host) {
54734
54657
  /*isTypeOnly*/
54735
54658
  false,
54736
54659
  factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => {
54737
- var _a, _b;
54660
+ var _a2, _b;
54738
54661
  const name = unescapeLeadingUnderscores(s.escapedName);
54739
54662
  const localName2 = getInternalSymbolName(s, name);
54740
54663
  const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s);
54741
54664
  if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) {
54742
- (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s);
54665
+ (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s);
54743
54666
  return void 0;
54744
54667
  }
54745
54668
  const target = aliasDecl && getTargetOfAliasDeclaration(
@@ -54905,8 +54828,8 @@ function createTypeChecker(host) {
54905
54828
  return void 0;
54906
54829
  }
54907
54830
  function serializeAsClass(symbol, localName, modifierFlags) {
54908
- var _a, _b;
54909
- const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);
54831
+ var _a2, _b;
54832
+ const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike);
54910
54833
  const oldEnclosing = context.enclosingDeclaration;
54911
54834
  context.enclosingDeclaration = originalDecl || oldEnclosing;
54912
54835
  const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
@@ -55002,7 +54925,7 @@ function createTypeChecker(host) {
55002
54925
  });
55003
54926
  }
55004
54927
  function serializeAsAlias(symbol, localName, modifierFlags) {
55005
- var _a, _b, _c, _d, _e;
54928
+ var _a2, _b, _c, _d, _e;
55006
54929
  const node = getDeclarationOfAliasSymbol(symbol);
55007
54930
  if (!node)
55008
54931
  return Debug.fail();
@@ -55022,7 +54945,7 @@ function createTypeChecker(host) {
55022
54945
  includePrivateSymbol(target);
55023
54946
  switch (node.kind) {
55024
54947
  case 208 /* BindingElement */:
55025
- if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
54948
+ if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) {
55026
54949
  const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context);
55027
54950
  const { propertyName } = node;
55028
54951
  addResult(
@@ -55241,7 +55164,7 @@ function createTypeChecker(host) {
55241
55164
  );
55242
55165
  }
55243
55166
  function serializeMaybeAliasAssignment(symbol) {
55244
- var _a;
55167
+ var _a2;
55245
55168
  if (symbol.flags & 4194304 /* Prototype */) {
55246
55169
  return false;
55247
55170
  }
@@ -55324,7 +55247,7 @@ function createTypeChecker(host) {
55324
55247
  void 0,
55325
55248
  serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
55326
55249
  )
55327
- ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
55250
+ ], ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
55328
55251
  );
55329
55252
  addResult(
55330
55253
  statement,
@@ -55354,7 +55277,7 @@ function createTypeChecker(host) {
55354
55277
  }
55355
55278
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
55356
55279
  return function serializePropertySymbol(p, isStatic2, baseType) {
55357
- var _a, _b, _c, _d, _e;
55280
+ var _a2, _b, _c, _d, _e;
55358
55281
  const modifierFlags = getDeclarationModifierFlagsFromSymbol(p);
55359
55282
  const isPrivate = !!(modifierFlags & 8 /* Private */);
55360
55283
  if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) {
@@ -55365,7 +55288,7 @@ function createTypeChecker(host) {
55365
55288
  }
55366
55289
  const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0);
55367
55290
  const name = getPropertyNameNodeForSymbol(p, context);
55368
- const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
55291
+ const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression));
55369
55292
  if (p.flags & 98304 /* Accessor */ && useAccessors) {
55370
55293
  const result = [];
55371
55294
  if (p.flags & 65536 /* SetAccessor */) {
@@ -55611,7 +55534,7 @@ function createTypeChecker(host) {
55611
55534
  }
55612
55535
  }
55613
55536
  function getUnusedName(input, symbol) {
55614
- var _a, _b;
55537
+ var _a2, _b;
55615
55538
  const id = symbol ? getSymbolId(symbol) : void 0;
55616
55539
  if (id) {
55617
55540
  if (context.remappedSymbolNames.has(id)) {
@@ -55623,7 +55546,7 @@ function createTypeChecker(host) {
55623
55546
  }
55624
55547
  let i = 0;
55625
55548
  const original = input;
55626
- while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) {
55549
+ while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) {
55627
55550
  i++;
55628
55551
  input = `${original}_${i}`;
55629
55552
  }
@@ -55751,6 +55674,10 @@ function createTypeChecker(host) {
55751
55674
  }
55752
55675
  }
55753
55676
  function getNameOfSymbolAsWritten(symbol, context) {
55677
+ var _a;
55678
+ if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) {
55679
+ symbol = context.remappedSymbolReferences.get(getSymbolId(symbol));
55680
+ }
55754
55681
  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`
55755
55682
  (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default`
55756
55683
  !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default`
@@ -57803,7 +57730,7 @@ function createTypeChecker(host) {
57803
57730
  if (!lateSymbol)
57804
57731
  lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
57805
57732
  const earlySymbol = earlySymbols && earlySymbols.get(memberName);
57806
- if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
57733
+ if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
57807
57734
  const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
57808
57735
  const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
57809
57736
  forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
@@ -57914,7 +57841,13 @@ function createTypeChecker(host) {
57914
57841
  const baseTypes = getBaseTypes(source);
57915
57842
  if (baseTypes.length) {
57916
57843
  if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
57917
- members = createSymbolTable(source.declaredProperties);
57844
+ const symbolTable = createSymbolTable();
57845
+ for (const symbol of members.values()) {
57846
+ if (!(symbol.flags & 262144 /* TypeParameter */)) {
57847
+ symbolTable.set(symbol.escapedName, symbol);
57848
+ }
57849
+ }
57850
+ members = symbolTable;
57918
57851
  }
57919
57852
  setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
57920
57853
  const thisArgument = lastOrUndefined(typeArguments);
@@ -58031,7 +57964,7 @@ function createTypeChecker(host) {
58031
57964
  function getUniqAssociatedNamesFromTupleType(type, restName) {
58032
57965
  const associatedNamesMap = /* @__PURE__ */ new Map();
58033
57966
  return map(type.target.labeledElementDeclarations, (labeledElement, i) => {
58034
- const name = getTupleElementLabel(type, labeledElement, i, restName);
57967
+ const name = getTupleElementLabel(labeledElement, i, restName);
58035
57968
  const prevCounter = associatedNamesMap.get(name);
58036
57969
  if (prevCounter === void 0) {
58037
57970
  associatedNamesMap.set(name, 1);
@@ -67313,6 +67246,9 @@ function createTypeChecker(host) {
67313
67246
  function isArrayLikeType(type) {
67314
67247
  return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType);
67315
67248
  }
67249
+ function isMutableArrayLikeType(type) {
67250
+ return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType);
67251
+ }
67316
67252
  function getSingleBaseForNonAugmentingSubtype(type) {
67317
67253
  if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
67318
67254
  return void 0;
@@ -67730,7 +67666,7 @@ function createTypeChecker(host) {
67730
67666
  const param = declaration;
67731
67667
  if (isIdentifier(param.name)) {
67732
67668
  const originalKeywordKind = identifierToKeywordKind(param.name);
67733
- if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
67669
+ if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName(
67734
67670
  param,
67735
67671
  param.name.escapedText,
67736
67672
  788968 /* Type */,
@@ -67816,7 +67752,12 @@ function createTypeChecker(host) {
67816
67752
  callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
67817
67753
  }
67818
67754
  if (targetRestType) {
67819
- callback(getRestTypeAtPosition(source, paramCount), targetRestType);
67755
+ callback(getRestTypeAtPosition(
67756
+ source,
67757
+ paramCount,
67758
+ /*readonly*/
67759
+ isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType)
67760
+ ), targetRestType);
67820
67761
  }
67821
67762
  }
67822
67763
  function applyToReturnTypes(source, target, callback) {
@@ -68857,7 +68798,7 @@ function createTypeChecker(host) {
68857
68798
  const constraint = getConstraintOfTypeParameter(inference.typeParameter);
68858
68799
  if (constraint) {
68859
68800
  const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
68860
- if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
68801
+ if (!inferredType || inferredType === blockedStringType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
68861
68802
  inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint;
68862
68803
  }
68863
68804
  }
@@ -72802,7 +72743,7 @@ function createTypeChecker(host) {
72802
72743
  elementTypes,
72803
72744
  elementFlags,
72804
72745
  /*readonly*/
72805
- inConstContext
72746
+ inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType))
72806
72747
  ));
72807
72748
  }
72808
72749
  return createArrayLiteralType(createArrayType(
@@ -73118,7 +73059,7 @@ function createTypeChecker(host) {
73118
73059
  return getJsxElementTypeAt(node) || anyType;
73119
73060
  }
73120
73061
  function isHyphenatedJsxName(name) {
73121
- return stringContains(name, "-");
73062
+ return name.includes("-");
73122
73063
  }
73123
73064
  function isJsxIntrinsicTagName(tagName) {
73124
73065
  return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName);
@@ -74040,7 +73981,7 @@ function createTypeChecker(host) {
74040
73981
  apparentType,
74041
73982
  right.escapedText,
74042
73983
  /*skipObjectFunctionPropertyAugment*/
74043
- false,
73984
+ isConstEnumObjectType(apparentType),
74044
73985
  /*includeTypeOnlyMembers*/
74045
73986
  node.kind === 166 /* QualifiedName */
74046
73987
  );
@@ -74823,7 +74764,7 @@ function createTypeChecker(host) {
74823
74764
  names.push(arg.tupleNameSource);
74824
74765
  }
74825
74766
  }
74826
- return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0);
74767
+ return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), length(names) === length(types) ? names : void 0);
74827
74768
  }
74828
74769
  function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) {
74829
74770
  const isJavascript = isInJSFile(signature.declaration);
@@ -76808,18 +76749,11 @@ function createTypeChecker(host) {
76808
76749
  !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
76809
76750
  );
76810
76751
  }
76811
- function getTupleElementLabel(tupleType, d, index, restParameterName = "arg") {
76752
+ function getTupleElementLabel(d, index, restParameterName = "arg") {
76812
76753
  if (!d) {
76813
76754
  return `${restParameterName}_${index}`;
76814
76755
  }
76815
- Debug.assert(!isBindingPattern(d.name));
76816
- if (d.name.kind === 203 /* TemplateLiteralType */) {
76817
- const label = instantiateType(getTypeFromTypeNode(d.name), tupleType.mapper);
76818
- return label.flags & 128 /* StringLiteral */ ? escapeLeadingUnderscores(label.value) : typeof index === "number" ? `${restParameterName}_${index}` : void 0;
76819
- }
76820
- if (d.name.kind === 15 /* NoSubstitutionTemplateLiteral */) {
76821
- return escapeLeadingUnderscores(d.name.text);
76822
- }
76756
+ Debug.assert(isIdentifier(d.name));
76823
76757
  return d.name.escapedText;
76824
76758
  }
76825
76759
  function getParameterNameAtPosition(signature, pos, overrideRestType) {
@@ -76832,7 +76766,7 @@ function createTypeChecker(host) {
76832
76766
  if (isTupleType(restType)) {
76833
76767
  const associatedNames = restType.target.labeledElementDeclarations;
76834
76768
  const index = pos - paramCount;
76835
- return getTupleElementLabel(restType, associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName);
76769
+ return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName);
76836
76770
  }
76837
76771
  return restParameter.escapedName;
76838
76772
  }
@@ -76862,7 +76796,8 @@ function createTypeChecker(host) {
76862
76796
  const index = pos - paramCount;
76863
76797
  const associatedName = associatedNames == null ? void 0 : associatedNames[index];
76864
76798
  const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken);
76865
- if (associatedName && isIdentifier(associatedName.name)) {
76799
+ if (associatedName) {
76800
+ Debug.assert(isIdentifier(associatedName.name));
76866
76801
  return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement };
76867
76802
  }
76868
76803
  return void 0;
@@ -76910,7 +76845,7 @@ function createTypeChecker(host) {
76910
76845
  }
76911
76846
  return void 0;
76912
76847
  }
76913
- function getRestTypeAtPosition(source, pos) {
76848
+ function getRestTypeAtPosition(source, pos, readonly) {
76914
76849
  const parameterCount = getParameterCount(source);
76915
76850
  const minArgumentCount = getMinArgumentCount(source);
76916
76851
  const restType = getEffectiveRestType(source);
@@ -76933,13 +76868,7 @@ function createTypeChecker(host) {
76933
76868
  names.push(name);
76934
76869
  }
76935
76870
  }
76936
- return createTupleType(
76937
- types,
76938
- flags,
76939
- /*readonly*/
76940
- false,
76941
- length(names) === length(types) ? names : void 0
76942
- );
76871
+ return createTupleType(types, flags, readonly, length(names) === length(types) ? names : void 0);
76943
76872
  }
76944
76873
  function getParameterCount(signature) {
76945
76874
  const length2 = signature.parameters.length;
@@ -77019,18 +76948,16 @@ function createTypeChecker(host) {
77019
76948
  const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
77020
76949
  for (let i = 0; i < len; i++) {
77021
76950
  const declaration = signature.parameters[i].valueDeclaration;
77022
- if (declaration.type) {
77023
- const typeNode = getEffectiveTypeAnnotationNode(declaration);
77024
- if (typeNode) {
77025
- const source = addOptionality(
77026
- getTypeFromTypeNode(typeNode),
77027
- /*isProperty*/
77028
- false,
77029
- isOptionalDeclaration(declaration)
77030
- );
77031
- const target = getTypeAtPosition(context, i);
77032
- inferTypes(inferenceContext.inferences, source, target);
77033
- }
76951
+ const typeNode = getEffectiveTypeAnnotationNode(declaration);
76952
+ if (typeNode) {
76953
+ const source = addOptionality(
76954
+ getTypeFromTypeNode(typeNode),
76955
+ /*isProperty*/
76956
+ false,
76957
+ isOptionalDeclaration(declaration)
76958
+ );
76959
+ const target = getTypeAtPosition(context, i);
76960
+ inferTypes(inferenceContext.inferences, source, target);
77034
76961
  }
77035
76962
  }
77036
76963
  }
@@ -79462,7 +79389,7 @@ function createTypeChecker(host) {
79462
79389
  return nullWideningType;
79463
79390
  case 15 /* NoSubstitutionTemplateLiteral */:
79464
79391
  case 11 /* StringLiteral */:
79465
- return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
79392
+ return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text));
79466
79393
  case 9 /* NumericLiteral */: {
79467
79394
  checkGrammarNumericLiteral(node);
79468
79395
  const value = +node.text;
@@ -79811,7 +79738,7 @@ function createTypeChecker(host) {
79811
79738
  const isPrivate = isPrivateIdentifier(name);
79812
79739
  const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
79813
79740
  const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
79814
- const memberName = name && getPropertyNameForPropertyNameNode(name);
79741
+ const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
79815
79742
  if (memberName) {
79816
79743
  switch (member.kind) {
79817
79744
  case 177 /* GetAccessor */:
@@ -79858,7 +79785,7 @@ function createTypeChecker(host) {
79858
79785
  const memberNameNode = member.name;
79859
79786
  const isStaticMember = isStatic(member);
79860
79787
  if (isStaticMember && memberNameNode) {
79861
- const memberName = getPropertyNameForPropertyNameNode(memberNameNode);
79788
+ const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
79862
79789
  switch (memberName) {
79863
79790
  case "name":
79864
79791
  case "length":
@@ -80367,9 +80294,6 @@ function createTypeChecker(host) {
80367
80294
  if (node.type.kind === 191 /* RestType */) {
80368
80295
  grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type);
80369
80296
  }
80370
- if (node.name.kind === 203 /* TemplateLiteralType */) {
80371
- checkSourceElement(node.name);
80372
- }
80373
80297
  checkSourceElement(node.type);
80374
80298
  getTypeFromTypeNode(node);
80375
80299
  }
@@ -88290,7 +88214,7 @@ function createTypeChecker(host) {
88290
88214
  return false;
88291
88215
  }
88292
88216
  function checkGrammarNumericLiteral(node) {
88293
- const isFractional = getTextOfNode(node).indexOf(".") !== -1;
88217
+ const isFractional = getTextOfNode(node).includes(".");
88294
88218
  const isScientific = node.numericLiteralFlags & 16 /* Scientific */;
88295
88219
  if (isFractional || isScientific) {
88296
88220
  return;
@@ -89181,7 +89105,7 @@ var visitEachChildTable = {
89181
89105
  return context.factory.updateNamedTupleMember(
89182
89106
  node,
89183
89107
  tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken,
89184
- Debug.checkDefined(nodeVisitor(node.name, visitor, isNamedTupleMemberName)),
89108
+ Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
89185
89109
  tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken,
89186
89110
  Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode))
89187
89111
  );
@@ -90212,7 +90136,7 @@ function tryGetSourceMappingURL(lineInfo) {
90212
90136
  const line = lineInfo.getLineText(index);
90213
90137
  const comment = sourceMapCommentRegExp.exec(line);
90214
90138
  if (comment) {
90215
- return trimStringEnd(comment[1]);
90139
+ return comment[1].trimEnd();
90216
90140
  } else if (!line.match(whitespaceOrMapCommentRegExp)) {
90217
90141
  break;
90218
90142
  }
@@ -111436,7 +111360,7 @@ function getDeclarationDiagnostics(host, resolver, file) {
111436
111360
  }
111437
111361
  function hasInternalAnnotation(range, currentSourceFile) {
111438
111362
  const comment = currentSourceFile.text.substring(range.pos, range.end);
111439
- return stringContains(comment, "@internal");
111363
+ return comment.includes("@internal");
111440
111364
  }
111441
111365
  function isInternalDeclaration(node, currentSourceFile) {
111442
111366
  const parseTreeNode = getParseTreeNode(node);
@@ -111890,6 +111814,9 @@ function transformDeclarations(context) {
111890
111814
  if (elem.kind === 232 /* OmittedExpression */) {
111891
111815
  return elem;
111892
111816
  }
111817
+ if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) {
111818
+ checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration);
111819
+ }
111893
111820
  if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) {
111894
111821
  return factory2.updateBindingElement(
111895
111822
  elem,
@@ -115926,7 +115853,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115926
115853
  /*jsxAttributeEscape*/
115927
115854
  false
115928
115855
  );
115929
- return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
115856
+ return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */));
115930
115857
  } else if (isAccessExpression(expression)) {
115931
115858
  const constantValue = getConstantValue(expression);
115932
115859
  return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
@@ -119864,17 +119791,17 @@ function formatCodeSpan(file, start2, length2, indent3, squiggleColor, host) {
119864
119791
  for (let i = firstLine; i <= lastLine; i++) {
119865
119792
  context += host.getNewLine();
119866
119793
  if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
119867
- context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
119794
+ context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine();
119868
119795
  i = lastLine - 1;
119869
119796
  }
119870
119797
  const lineStart = getPositionOfLineAndCharacter(file, i, 0);
119871
119798
  const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
119872
119799
  let lineContent = file.text.slice(lineStart, lineEnd);
119873
- lineContent = trimStringEnd(lineContent);
119800
+ lineContent = lineContent.trimEnd();
119874
119801
  lineContent = lineContent.replace(/\t/g, " ");
119875
- context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
119802
+ context += indent3 + formatColorAndReset((i + 1 + "").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;
119876
119803
  context += lineContent + host.getNewLine();
119877
- context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator;
119804
+ context += indent3 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator;
119878
119805
  context += squiggleColor;
119879
119806
  if (i === firstLine) {
119880
119807
  const lastCharForLine = i === lastLine ? lastLineChar : void 0;
@@ -120813,7 +120740,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
120813
120740
  const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
120814
120741
  if (resultFromDts)
120815
120742
  return resultFromDts;
120816
- if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart))
120743
+ if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart))
120817
120744
  return void 0;
120818
120745
  const realDeclarationPath = toPath3(host.realpath(file.originalFileName));
120819
120746
  return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
@@ -122071,7 +121998,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
122071
121998
  const path = toPath3(fileName);
122072
121999
  if (useSourceOfProjectReferenceRedirect) {
122073
122000
  let source = getSourceOfProjectReferenceRedirect(path);
122074
- if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) {
122001
+ if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
122075
122002
  const realPath2 = toPath3(host.realpath(fileName));
122076
122003
  if (realPath2 !== path)
122077
122004
  source = getSourceOfProjectReferenceRedirect(realPath2);
@@ -123431,7 +123358,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) {
123431
123358
  var _a;
123432
123359
  if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory))
123433
123360
  return;
123434
- if (!originalRealpath || !stringContains(directory, nodeModulesPathPart))
123361
+ if (!originalRealpath || !directory.includes(nodeModulesPathPart))
123435
123362
  return;
123436
123363
  const symlinkCache = host.getSymlinkCache();
123437
123364
  const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory));
@@ -123459,7 +123386,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) {
123459
123386
  if (!symlinkedDirectories)
123460
123387
  return false;
123461
123388
  const fileOrDirectoryPath = host.toPath(fileOrDirectory);
123462
- if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart))
123389
+ if (!fileOrDirectoryPath.includes(nodeModulesPathPart))
123463
123390
  return false;
123464
123391
  if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath)))
123465
123392
  return true;
@@ -125349,7 +125276,7 @@ function removeIgnoredPath(path) {
125349
125276
  if (endsWith(path, "/node_modules/.staging")) {
125350
125277
  return removeSuffix(path, "/.staging");
125351
125278
  }
125352
- return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path;
125279
+ return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path;
125353
125280
  }
125354
125281
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
125355
125282
  if (length2 <= 1)
@@ -130089,7 +130016,7 @@ var Arguments;
130089
130016
  Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation";
130090
130017
  })(Arguments || (Arguments = {}));
130091
130018
  function hasArgument(argumentName) {
130092
- return sys.args.indexOf(argumentName) >= 0;
130019
+ return sys.args.includes(argumentName);
130093
130020
  }
130094
130021
  function findArgument(argumentName) {
130095
130022
  const index = sys.args.indexOf(argumentName);
@@ -130097,7 +130024,7 @@ function findArgument(argumentName) {
130097
130024
  }
130098
130025
  function nowString() {
130099
130026
  const d = /* @__PURE__ */ new Date();
130100
- 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")}`;
130027
+ 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")}`;
130101
130028
  }
130102
130029
 
130103
130030
  // src/services/types.ts
@@ -132912,7 +132839,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) {
132912
132839
  return false;
132913
132840
  }
132914
132841
  function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) {
132915
- if (!stringContains(importedFileName, "node_modules")) {
132842
+ if (!importedFileName.includes("node_modules")) {
132916
132843
  return void 0;
132917
132844
  }
132918
132845
  const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName(
@@ -133486,7 +133413,7 @@ function forEachExternalModule(checker, allSourceFiles, excludePatterns, cb) {
133486
133413
  var _a;
133487
133414
  const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName)));
133488
133415
  for (const ambient of checker.getAmbientModules()) {
133489
- if (!stringContains(ambient.name, "*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) {
133416
+ if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) {
133490
133417
  cb(
133491
133418
  ambient,
133492
133419
  /*sourceFile*/
@@ -142384,7 +142311,7 @@ function collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFi
142384
142311
  return symbolId;
142385
142312
  }
142386
142313
  function checkForUsedDeclarations(node) {
142387
- if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0) {
142314
+ if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) {
142388
142315
  return;
142389
142316
  }
142390
142317
  const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node);
@@ -144742,7 +144669,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144742
144669
  return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */;
144743
144670
  }
144744
144671
  function isNodeModulesFile(path) {
144745
- return stringContains(path, "/node_modules/");
144672
+ return path.includes("/node_modules/");
144746
144673
  }
144747
144674
  }
144748
144675
  function getRenameInfo2(fileName, position, preferences) {
@@ -153723,7 +153650,7 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program
153723
153650
  }
153724
153651
  }
153725
153652
  function isCallbackLike(checker, sourceFile, name) {
153726
- return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0);
153653
+ return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference));
153727
153654
  }
153728
153655
  function isLastParameter(func, parameter, isFixAll) {
153729
153656
  const parameters = func.parameters;
@@ -161104,7 +161031,7 @@ function directoryResult(name) {
161104
161031
  function addReplacementSpans(text, textStart, names) {
161105
161032
  const span = getDirectoryFragmentTextSpan(text, textStart);
161106
161033
  const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length);
161107
- return names.map(({ name, kind, extension }) => Math.max(name.indexOf(directorySeparator), name.indexOf(altDirectorySeparator)) !== -1 ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
161034
+ return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span });
161108
161035
  }
161109
161036
  function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) {
161110
161037
  return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences));
@@ -161430,7 +161357,7 @@ function getPatternFromFirstMatchingCondition(target, conditions) {
161430
161357
  }
161431
161358
  if (target && typeof target === "object" && !isArray(target)) {
161432
161359
  for (const condition in target) {
161433
- if (condition === "default" || conditions.indexOf(condition) > -1 || isApplicableVersionedTypesKey(conditions, condition)) {
161360
+ if (condition === "default" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) {
161434
161361
  const pattern = target[condition];
161435
161362
  return getPatternFromFirstMatchingCondition(pattern, conditions);
161436
161363
  }
@@ -161442,7 +161369,7 @@ function getFragmentDirectory(fragment) {
161442
161369
  }
161443
161370
  function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) {
161444
161371
  if (!endsWith(path, "*")) {
161445
- return !stringContains(path, "*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray;
161372
+ return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray;
161446
161373
  }
161447
161374
  const pathPrefix = path.slice(0, path.length - 1);
161448
161375
  const remainingFragment = tryRemovePrefix(fragment, pathPrefix);
@@ -161512,7 +161439,7 @@ function removeLeadingDirectorySeparator(path) {
161512
161439
  }
161513
161440
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
161514
161441
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
161515
- const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0);
161442
+ const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes("*"));
161516
161443
  if (fragmentDirectory !== void 0) {
161517
161444
  const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
161518
161445
  return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
@@ -161628,7 +161555,7 @@ function isPathRelativeToScript(path) {
161628
161555
  var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
161629
161556
  var nodeModulesDependencyKeys = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
161630
161557
  function containsSlash(fragment) {
161631
- return stringContains(fragment, directorySeparator);
161558
+ return fragment.includes(directorySeparator);
161632
161559
  }
161633
161560
  function isRequireCallArgument(node) {
161634
161561
  return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require";
@@ -166089,11 +166016,11 @@ function addRegionOutliningSpans(sourceFile, out) {
166089
166016
  }
166090
166017
  var regionDelimiterRegExp = /^#(end)?region(?:\s+(.*))?(?:\r)?$/;
166091
166018
  function isRegionDelimiter(lineText) {
166092
- lineText = trimStringStart(lineText);
166019
+ lineText = lineText.trimStart();
166093
166020
  if (!startsWith(lineText, "//")) {
166094
166021
  return null;
166095
166022
  }
166096
- lineText = trimString(lineText.slice(2));
166023
+ lineText = lineText.slice(2).trim();
166097
166024
  return regionDelimiterRegExp.exec(lineText);
166098
166025
  }
166099
166026
  function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) {
@@ -170323,7 +170250,7 @@ function isSemicolonInsertionContext(context) {
170323
170250
  return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile);
170324
170251
  }
170325
170252
  function isNotPropertyAccessOnIntegerLiteral(context) {
170326
- return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().indexOf(".") !== -1;
170253
+ return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes(".");
170327
170254
  }
170328
170255
 
170329
170256
  // src/services/formatting/rulesMap.ts
@@ -171495,7 +171422,7 @@ var SmartIndenter;
171495
171422
  }
171496
171423
  const containerList = getListByPosition(position, precedingToken.parent, sourceFile);
171497
171424
  if (containerList && !rangeContainsRange(containerList, precedingToken)) {
171498
- const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1;
171425
+ const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind);
171499
171426
  const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize;
171500
171427
  return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize;
171501
171428
  }
@@ -173526,7 +173453,6 @@ __export(ts_exports2, {
173526
173453
  isNamedImports: () => isNamedImports,
173527
173454
  isNamedImportsOrExports: () => isNamedImportsOrExports,
173528
173455
  isNamedTupleMember: () => isNamedTupleMember,
173529
- isNamedTupleMemberName: () => isNamedTupleMemberName,
173530
173456
  isNamespaceBody: () => isNamespaceBody,
173531
173457
  isNamespaceExport: () => isNamespaceExport,
173532
173458
  isNamespaceExportDeclaration: () => isNamespaceExportDeclaration,
@@ -173889,8 +173815,6 @@ __export(ts_exports2, {
173889
173815
  outFile: () => outFile,
173890
173816
  packageIdToPackageName: () => packageIdToPackageName,
173891
173817
  packageIdToString: () => packageIdToString,
173892
- padLeft: () => padLeft,
173893
- padRight: () => padRight,
173894
173818
  paramHelper: () => paramHelper,
173895
173819
  parameterIsThisKeyword: () => parameterIsThisKeyword,
173896
173820
  parameterNamePart: () => parameterNamePart,
@@ -174097,7 +174021,6 @@ __export(ts_exports2, {
174097
174021
  startsWithDirectory: () => startsWithDirectory,
174098
174022
  startsWithUnderscore: () => startsWithUnderscore,
174099
174023
  startsWithUseStrict: () => startsWithUseStrict,
174100
- stringContains: () => stringContains,
174101
174024
  stringContainsAt: () => stringContainsAt,
174102
174025
  stringToToken: () => stringToToken,
174103
174026
  stripQuotes: () => stripQuotes,
@@ -174184,9 +174107,6 @@ __export(ts_exports2, {
174184
174107
  transpile: () => transpile,
174185
174108
  transpileModule: () => transpileModule,
174186
174109
  transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions,
174187
- trimString: () => trimString,
174188
- trimStringEnd: () => trimStringEnd,
174189
- trimStringStart: () => trimStringStart,
174190
174110
  tryAddToSet: () => tryAddToSet,
174191
174111
  tryAndIgnoreErrors: () => tryAndIgnoreErrors,
174192
174112
  tryCast: () => tryCast,
@@ -175505,7 +175425,7 @@ var TextStorage = class {
175505
175425
  }
175506
175426
  };
175507
175427
  function isDynamicFileName(fileName) {
175508
- return fileName[0] === "^" || (stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) && getBaseFileName(fileName)[0] === "^" || stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator);
175428
+ return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
175509
175429
  }
175510
175430
  var ScriptInfo = class {
175511
175431
  constructor(host, fileName, scriptKind, hasMixedContent, path, initialVersion) {
@@ -176897,7 +176817,7 @@ var Project3 = class _Project {
176897
176817
  }
176898
176818
  removeExistingTypings(include) {
176899
176819
  const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost);
176900
- return include.filter((i) => existing.indexOf(i) < 0);
176820
+ return include.filter((i) => !existing.includes(i));
176901
176821
  }
176902
176822
  updateGraphWorker() {
176903
176823
  var _a, _b;
@@ -181090,7 +181010,7 @@ Dynamic files must always be opened with service's current directory or service
181090
181010
  this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`);
181091
181011
  if (rule2.types) {
181092
181012
  for (const type of rule2.types) {
181093
- if (typeAcqInclude.indexOf(type) < 0) {
181013
+ if (!typeAcqInclude.includes(type)) {
181094
181014
  typeAcqInclude.push(type);
181095
181015
  }
181096
181016
  }
@@ -181109,13 +181029,13 @@ Dynamic files must always be opened with service's current directory or service
181109
181029
  return groupNumberOrString;
181110
181030
  }).join("");
181111
181031
  });
181112
- if (excludeRules.indexOf(processedRule) === -1) {
181032
+ if (!excludeRules.includes(processedRule)) {
181113
181033
  excludeRules.push(processedRule);
181114
181034
  }
181115
181035
  }
181116
181036
  } else {
181117
181037
  const escaped = _ProjectService.escapeFilenameForRegex(root);
181118
- if (excludeRules.indexOf(escaped) < 0) {
181038
+ if (!excludeRules.includes(escaped)) {
181119
181039
  excludeRules.push(escaped);
181120
181040
  }
181121
181041
  }
@@ -181139,7 +181059,7 @@ Dynamic files must always be opened with service's current directory or service
181139
181059
  this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`);
181140
181060
  excludedFiles.push(normalizedNames[i]);
181141
181061
  exclude = true;
181142
- if (typeAcqInclude.indexOf(typeName) < 0) {
181062
+ if (!typeAcqInclude.includes(typeName)) {
181143
181063
  typeAcqInclude.push(typeName);
181144
181064
  }
181145
181065
  }
@@ -184610,7 +184530,7 @@ ${e.message}`;
184610
184530
  if (languageServiceDisabled) {
184611
184531
  return;
184612
184532
  }
184613
- const fileNamesInProject = fileNames.filter((value) => !stringContains(value, "lib.d.ts"));
184533
+ const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts"));
184614
184534
  if (fileNamesInProject.length === 0) {
184615
184535
  return;
184616
184536
  }
@@ -188090,7 +188010,6 @@ start(initializeNodeSystem(), require("os").platform());
188090
188010
  isNamedImports,
188091
188011
  isNamedImportsOrExports,
188092
188012
  isNamedTupleMember,
188093
- isNamedTupleMemberName,
188094
188013
  isNamespaceBody,
188095
188014
  isNamespaceExport,
188096
188015
  isNamespaceExportDeclaration,
@@ -188453,8 +188372,6 @@ start(initializeNodeSystem(), require("os").platform());
188453
188372
  outFile,
188454
188373
  packageIdToPackageName,
188455
188374
  packageIdToString,
188456
- padLeft,
188457
- padRight,
188458
188375
  paramHelper,
188459
188376
  parameterIsThisKeyword,
188460
188377
  parameterNamePart,
@@ -188661,7 +188578,6 @@ start(initializeNodeSystem(), require("os").platform());
188661
188578
  startsWithDirectory,
188662
188579
  startsWithUnderscore,
188663
188580
  startsWithUseStrict,
188664
- stringContains,
188665
188581
  stringContainsAt,
188666
188582
  stringToToken,
188667
188583
  stripQuotes,
@@ -188748,9 +188664,6 @@ start(initializeNodeSystem(), require("os").platform());
188748
188664
  transpile,
188749
188665
  transpileModule,
188750
188666
  transpileOptionValueCompilerOptions,
188751
- trimString,
188752
- trimStringEnd,
188753
- trimStringStart,
188754
188667
  tryAddToSet,
188755
188668
  tryAndIgnoreErrors,
188756
188669
  tryCast,