typescript 4.5.1-rc → 4.5.5

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.
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".1-rc";
297
+ ts.version = "4.5.5";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -335,7 +335,7 @@ var ts;
335
335
  var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
336
336
  if (constructor)
337
337
  return constructor;
338
- throw new Error("TypeScript requires an environment that provides a compatible native " + name + " implementation.");
338
+ throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
339
339
  }
340
340
  })(ts || (ts = {}));
341
341
  /* @internal */
@@ -1698,7 +1698,7 @@ var ts;
1698
1698
  function cast(value, test) {
1699
1699
  if (value !== undefined && test(value))
1700
1700
  return value;
1701
- return ts.Debug.fail("Invalid cast. The supplied value " + value + " did not pass the test '" + ts.Debug.getFunctionName(test) + "'.");
1701
+ return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
1702
1702
  }
1703
1703
  ts.cast = cast;
1704
1704
  /** Does nothing. */
@@ -1789,7 +1789,7 @@ var ts;
1789
1789
  function memoizeOne(callback) {
1790
1790
  var map = new ts.Map();
1791
1791
  return function (arg) {
1792
- var key = typeof arg + ":" + arg;
1792
+ var key = "".concat(typeof arg, ":").concat(arg);
1793
1793
  var value = map.get(key);
1794
1794
  if (value === undefined && !map.has(key)) {
1795
1795
  value = callback(arg);
@@ -2239,7 +2239,7 @@ var ts;
2239
2239
  ts.createGetCanonicalFileName = createGetCanonicalFileName;
2240
2240
  function patternText(_a) {
2241
2241
  var prefix = _a.prefix, suffix = _a.suffix;
2242
- return prefix + "*" + suffix;
2242
+ return "".concat(prefix, "*").concat(suffix);
2243
2243
  }
2244
2244
  ts.patternText = patternText;
2245
2245
  /**
@@ -2552,7 +2552,7 @@ var ts;
2552
2552
  }
2553
2553
  function fail(message, stackCrawlMark) {
2554
2554
  debugger;
2555
- var e = new Error(message ? "Debug Failure. " + message : "Debug Failure.");
2555
+ var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
2556
2556
  if (Error.captureStackTrace) {
2557
2557
  Error.captureStackTrace(e, stackCrawlMark || fail);
2558
2558
  }
@@ -2560,12 +2560,12 @@ var ts;
2560
2560
  }
2561
2561
  Debug.fail = fail;
2562
2562
  function failBadSyntaxKind(node, message, stackCrawlMark) {
2563
- return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind);
2563
+ return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
2564
2564
  }
2565
2565
  Debug.failBadSyntaxKind = failBadSyntaxKind;
2566
2566
  function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
2567
2567
  if (!expression) {
2568
- message = message ? "False expression: " + message : "False expression.";
2568
+ message = message ? "False expression: ".concat(message) : "False expression.";
2569
2569
  if (verboseDebugInfo) {
2570
2570
  message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
2571
2571
  }
@@ -2575,26 +2575,26 @@ var ts;
2575
2575
  Debug.assert = assert;
2576
2576
  function assertEqual(a, b, msg, msg2, stackCrawlMark) {
2577
2577
  if (a !== b) {
2578
- var message = msg ? msg2 ? msg + " " + msg2 : msg : "";
2579
- fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual);
2578
+ var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
2579
+ fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
2580
2580
  }
2581
2581
  }
2582
2582
  Debug.assertEqual = assertEqual;
2583
2583
  function assertLessThan(a, b, msg, stackCrawlMark) {
2584
2584
  if (a >= b) {
2585
- fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan);
2585
+ fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
2586
2586
  }
2587
2587
  }
2588
2588
  Debug.assertLessThan = assertLessThan;
2589
2589
  function assertLessThanOrEqual(a, b, stackCrawlMark) {
2590
2590
  if (a > b) {
2591
- fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual);
2591
+ fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
2592
2592
  }
2593
2593
  }
2594
2594
  Debug.assertLessThanOrEqual = assertLessThanOrEqual;
2595
2595
  function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
2596
2596
  if (a < b) {
2597
- fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual);
2597
+ fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
2598
2598
  }
2599
2599
  }
2600
2600
  Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
@@ -2635,42 +2635,42 @@ var ts;
2635
2635
  function assertNever(member, message, stackCrawlMark) {
2636
2636
  if (message === void 0) { message = "Illegal value:"; }
2637
2637
  var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2638
- return fail(message + " " + detail, stackCrawlMark || assertNever);
2638
+ return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
2639
2639
  }
2640
2640
  Debug.assertNever = assertNever;
2641
2641
  function assertEachNode(nodes, test, message, stackCrawlMark) {
2642
2642
  if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
2643
- assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode);
2643
+ assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
2644
2644
  }
2645
2645
  }
2646
2646
  Debug.assertEachNode = assertEachNode;
2647
2647
  function assertNode(node, test, message, stackCrawlMark) {
2648
2648
  if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
2649
- assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode);
2649
+ assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNode);
2650
2650
  }
2651
2651
  }
2652
2652
  Debug.assertNode = assertNode;
2653
2653
  function assertNotNode(node, test, message, stackCrawlMark) {
2654
2654
  if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
2655
- assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " should not have passed test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNotNode);
2655
+ assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " should not have passed test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNotNode);
2656
2656
  }
2657
2657
  }
2658
2658
  Debug.assertNotNode = assertNotNode;
2659
2659
  function assertOptionalNode(node, test, message, stackCrawlMark) {
2660
2660
  if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
2661
- assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode);
2661
+ assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertOptionalNode);
2662
2662
  }
2663
2663
  }
2664
2664
  Debug.assertOptionalNode = assertOptionalNode;
2665
2665
  function assertOptionalToken(node, kind, message, stackCrawlMark) {
2666
2666
  if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
2667
- assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken);
2667
+ assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " was not a '").concat(formatSyntaxKind(kind), "' token."); }, stackCrawlMark || assertOptionalToken);
2668
2668
  }
2669
2669
  }
2670
2670
  Debug.assertOptionalToken = assertOptionalToken;
2671
2671
  function assertMissingNode(node, message, stackCrawlMark) {
2672
2672
  if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
2673
- assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode);
2673
+ assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
2674
2674
  }
2675
2675
  }
2676
2676
  Debug.assertMissingNode = assertMissingNode;
@@ -2691,7 +2691,7 @@ var ts;
2691
2691
  }
2692
2692
  Debug.getFunctionName = getFunctionName;
2693
2693
  function formatSymbol(symbol) {
2694
- return "{ name: " + ts.unescapeLeadingUnderscores(symbol.escapedName) + "; flags: " + formatSymbolFlags(symbol.flags) + "; declarations: " + ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }) + " }";
2694
+ return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
2695
2695
  }
2696
2696
  Debug.formatSymbol = formatSymbol;
2697
2697
  /**
@@ -2712,7 +2712,7 @@ var ts;
2712
2712
  break;
2713
2713
  }
2714
2714
  if (enumValue !== 0 && enumValue & value) {
2715
- result = "" + result + (result ? "|" : "") + enumName;
2715
+ result = "".concat(result).concat(result ? "|" : "").concat(enumName);
2716
2716
  remainingFlags &= ~enumValue;
2717
2717
  }
2718
2718
  }
@@ -2822,7 +2822,7 @@ var ts;
2822
2822
  this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
2823
2823
  "UnknownFlow";
2824
2824
  var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
2825
- return "" + flowHeader + (remainingFlags ? " (" + formatFlowFlags(remainingFlags) + ")" : "");
2825
+ return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
2826
2826
  }
2827
2827
  },
2828
2828
  __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
@@ -2861,7 +2861,7 @@ var ts;
2861
2861
  // We don't care, this is debug code that's only enabled with a debugger attached -
2862
2862
  // we're just taking note of it for anyone checking regex performance in the future.
2863
2863
  defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
2864
- return "NodeArray " + defaultValue;
2864
+ return "NodeArray ".concat(defaultValue);
2865
2865
  }
2866
2866
  }
2867
2867
  });
@@ -2916,7 +2916,7 @@ var ts;
2916
2916
  var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
2917
2917
  "Symbol";
2918
2918
  var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
2919
- return symbolHeader + " '" + ts.symbolName(this) + "'" + (remainingSymbolFlags ? " (" + formatSymbolFlags(remainingSymbolFlags) + ")" : "");
2919
+ return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
2920
2920
  }
2921
2921
  },
2922
2922
  __debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
@@ -2926,11 +2926,11 @@ var ts;
2926
2926
  __tsDebuggerDisplay: {
2927
2927
  value: function () {
2928
2928
  var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
2929
- this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType " + JSON.stringify(this.value) :
2930
- this.flags & 2048 /* BigIntLiteral */ ? "LiteralType " + (this.value.negative ? "-" : "") + this.value.base10Value + "n" :
2929
+ this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
2930
+ this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
2931
2931
  this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
2932
2932
  this.flags & 32 /* Enum */ ? "EnumType" :
2933
- this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType " + this.intrinsicName :
2933
+ this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
2934
2934
  this.flags & 1048576 /* Union */ ? "UnionType" :
2935
2935
  this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
2936
2936
  this.flags & 4194304 /* Index */ ? "IndexType" :
@@ -2949,7 +2949,7 @@ var ts;
2949
2949
  "ObjectType" :
2950
2950
  "Type";
2951
2951
  var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
2952
- return "" + typeHeader + (this.symbol ? " '" + ts.symbolName(this.symbol) + "'" : "") + (remainingObjectFlags ? " (" + formatObjectFlags(remainingObjectFlags) + ")" : "");
2952
+ return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
2953
2953
  }
2954
2954
  },
2955
2955
  __debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
@@ -2985,11 +2985,11 @@ var ts;
2985
2985
  __tsDebuggerDisplay: {
2986
2986
  value: function () {
2987
2987
  var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
2988
- ts.isIdentifier(this) ? "Identifier '" + ts.idText(this) + "'" :
2989
- ts.isPrivateIdentifier(this) ? "PrivateIdentifier '" + ts.idText(this) + "'" :
2990
- ts.isStringLiteral(this) ? "StringLiteral " + JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...") :
2991
- ts.isNumericLiteral(this) ? "NumericLiteral " + this.text :
2992
- ts.isBigIntLiteral(this) ? "BigIntLiteral " + this.text + "n" :
2988
+ ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
2989
+ ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
2990
+ ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
2991
+ ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
2992
+ ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
2993
2993
  ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
2994
2994
  ts.isParameter(this) ? "ParameterDeclaration" :
2995
2995
  ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
@@ -3021,7 +3021,7 @@ var ts;
3021
3021
  ts.isNamedTupleMember(this) ? "NamedTupleMember" :
3022
3022
  ts.isImportTypeNode(this) ? "ImportTypeNode" :
3023
3023
  formatSyntaxKind(this.kind);
3024
- return "" + nodeHeader + (this.flags ? " (" + formatNodeFlags(this.flags) + ")" : "");
3024
+ return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
3025
3025
  }
3026
3026
  },
3027
3027
  __debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
@@ -3068,10 +3068,10 @@ var ts;
3068
3068
  Debug.enableDebugInfo = enableDebugInfo;
3069
3069
  function formatDeprecationMessage(name, error, errorAfter, since, message) {
3070
3070
  var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
3071
- deprecationMessage += "'" + name + "' ";
3072
- deprecationMessage += since ? "has been deprecated since v" + since : "is deprecated";
3073
- deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v" + errorAfter + "." : ".";
3074
- deprecationMessage += message ? " " + ts.formatStringFromArgs(message, [name], 0) : "";
3071
+ deprecationMessage += "'".concat(name, "' ");
3072
+ deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
3073
+ deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
3074
+ deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
3075
3075
  return deprecationMessage;
3076
3076
  }
3077
3077
  function createErrorDeprecation(name, errorAfter, since, message) {
@@ -3202,11 +3202,11 @@ var ts;
3202
3202
  }
3203
3203
  };
3204
3204
  Version.prototype.toString = function () {
3205
- var result = this.major + "." + this.minor + "." + this.patch;
3205
+ var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
3206
3206
  if (ts.some(this.prerelease))
3207
- result += "-" + this.prerelease.join(".");
3207
+ result += "-".concat(this.prerelease.join("."));
3208
3208
  if (ts.some(this.build))
3209
- result += "+" + this.build.join(".");
3209
+ result += "+".concat(this.build.join("."));
3210
3210
  return result;
3211
3211
  };
3212
3212
  Version.zero = new Version(0, 0, 0);
@@ -3473,7 +3473,7 @@ var ts;
3473
3473
  return ts.map(comparators, formatComparator).join(" ");
3474
3474
  }
3475
3475
  function formatComparator(comparator) {
3476
- return "" + comparator.operator + comparator.operand;
3476
+ return "".concat(comparator.operator).concat(comparator.operand);
3477
3477
  }
3478
3478
  })(ts || (ts = {}));
3479
3479
  /*@internal*/
@@ -3771,7 +3771,7 @@ var ts;
3771
3771
  fs = require("fs");
3772
3772
  }
3773
3773
  catch (e) {
3774
- throw new Error("tracing requires having fs\n(original error: " + (e.message || e) + ")");
3774
+ throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
3775
3775
  }
3776
3776
  }
3777
3777
  mode = tracingMode;
@@ -3783,11 +3783,11 @@ var ts;
3783
3783
  if (!fs.existsSync(traceDir)) {
3784
3784
  fs.mkdirSync(traceDir, { recursive: true });
3785
3785
  }
3786
- var countPart = mode === "build" ? "." + process.pid + "-" + ++traceCount
3787
- : mode === "server" ? "." + process.pid
3786
+ var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
3787
+ : mode === "server" ? ".".concat(process.pid)
3788
3788
  : "";
3789
- var tracePath = ts.combinePaths(traceDir, "trace" + countPart + ".json");
3790
- var typesPath = ts.combinePaths(traceDir, "types" + countPart + ".json");
3789
+ var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
3790
+ var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
3791
3791
  legend.push({
3792
3792
  configFilePath: configFilePath,
3793
3793
  tracePath: tracePath,
@@ -3877,7 +3877,7 @@ var ts;
3877
3877
  }
3878
3878
  // test if [time,endTime) straddles a sampling point
3879
3879
  else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
3880
- writeEvent("X", phase, name, args, "\"dur\":" + (endTime - time), time);
3880
+ writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
3881
3881
  }
3882
3882
  }
3883
3883
  function writeEvent(eventType, phase, name, args, extras, time) {
@@ -3886,11 +3886,11 @@ var ts;
3886
3886
  if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
3887
3887
  return;
3888
3888
  ts.performance.mark("beginTracing");
3889
- fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"" + eventType + "\",\"cat\":\"" + phase + "\",\"ts\":" + time + ",\"name\":\"" + name + "\"");
3889
+ fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
3890
3890
  if (extras)
3891
- fs.writeSync(traceFd, "," + extras);
3891
+ fs.writeSync(traceFd, ",".concat(extras));
3892
3892
  if (args)
3893
- fs.writeSync(traceFd, ",\"args\":" + JSON.stringify(args));
3893
+ fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
3894
3894
  fs.writeSync(traceFd, "}");
3895
3895
  ts.performance.mark("endTracing");
3896
3896
  ts.performance.measure("Tracing", "beginTracing", "endTracing");
@@ -5067,8 +5067,6 @@ var ts;
5067
5067
  // 'Narrowable' types are types where narrowing actually narrows.
5068
5068
  // This *should* be every type other than null, undefined, void, and never
5069
5069
  TypeFlags[TypeFlags["Narrowable"] = 536624127] = "Narrowable";
5070
- /* @internal */
5071
- TypeFlags[TypeFlags["NotPrimitiveUnion"] = 468598819] = "NotPrimitiveUnion";
5072
5070
  // The following flags are aggregated during union and intersection type construction
5073
5071
  /* @internal */
5074
5072
  TypeFlags[TypeFlags["IncludesMask"] = 205258751] = "IncludesMask";
@@ -5081,6 +5079,10 @@ var ts;
5081
5079
  TypeFlags[TypeFlags["IncludesWildcard"] = 8388608] = "IncludesWildcard";
5082
5080
  /* @internal */
5083
5081
  TypeFlags[TypeFlags["IncludesEmptyObject"] = 16777216] = "IncludesEmptyObject";
5082
+ /* @internal */
5083
+ TypeFlags[TypeFlags["IncludesInstantiable"] = 33554432] = "IncludesInstantiable";
5084
+ /* @internal */
5085
+ TypeFlags[TypeFlags["NotPrimitiveUnion"] = 36323363] = "NotPrimitiveUnion";
5084
5086
  })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
5085
5087
  // Types included in TypeFlags.ObjectFlagsType have an objectFlags property. Some ObjectFlags
5086
5088
  // are specific to certain types and reuse the same bit position. Those ObjectFlags require a check
@@ -6695,7 +6697,7 @@ var ts;
6695
6697
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
6696
6698
  ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
6697
6699
  function getLevel(envVar, level) {
6698
- return system.getEnvironmentVariable(envVar + "_" + level.toUpperCase());
6700
+ return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
6699
6701
  }
6700
6702
  function getCustomLevels(baseVariable) {
6701
6703
  var customLevels;
@@ -7160,7 +7162,7 @@ var ts;
7160
7162
  }
7161
7163
  function onTimerToUpdateChildWatches() {
7162
7164
  timerToUpdateChildWatches = undefined;
7163
- ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
7165
+ ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
7164
7166
  var start = ts.timestamp();
7165
7167
  var invokeMap = new ts.Map();
7166
7168
  while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
@@ -7173,7 +7175,7 @@ var ts;
7173
7175
  var hasChanges = updateChildWatches(dirName, dirPath, options);
7174
7176
  invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
7175
7177
  }
7176
- ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
7178
+ ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
7177
7179
  callbackCache.forEach(function (callbacks, rootDirName) {
7178
7180
  var existing = invokeMap.get(rootDirName);
7179
7181
  if (existing) {
@@ -7189,7 +7191,7 @@ var ts;
7189
7191
  }
7190
7192
  });
7191
7193
  var elapsed = ts.timestamp() - start;
7192
- ts.sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
7194
+ ts.sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
7193
7195
  }
7194
7196
  function removeChildWatches(parentWatcher) {
7195
7197
  if (!parentWatcher)
@@ -7649,7 +7651,7 @@ var ts;
7649
7651
  var remappedPaths = new ts.Map();
7650
7652
  var normalizedDir = ts.normalizeSlashes(__dirname);
7651
7653
  // Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
7652
- var fileUrlRoot = "file://" + (ts.getRootLength(normalizedDir) === 1 ? "" : "/") + normalizedDir;
7654
+ var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
7653
7655
  for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
7654
7656
  var node = _a[_i];
7655
7657
  if (node.callFrame.url) {
@@ -7658,7 +7660,7 @@ var ts;
7658
7660
  node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
7659
7661
  }
7660
7662
  else if (!nativePattern.test(url)) {
7661
- node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external" + externalFileCounter + ".js")).get(url);
7663
+ node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
7662
7664
  externalFileCounter++;
7663
7665
  }
7664
7666
  }
@@ -7674,7 +7676,7 @@ var ts;
7674
7676
  if (!err) {
7675
7677
  try {
7676
7678
  if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
7677
- profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
7679
+ profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
7678
7680
  }
7679
7681
  }
7680
7682
  catch (_c) {
@@ -7776,7 +7778,7 @@ var ts;
7776
7778
  * @param createWatcher
7777
7779
  */
7778
7780
  function invokeCallbackAndUpdateWatcher(createWatcher) {
7779
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
7781
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
7780
7782
  // Call the callback for current directory
7781
7783
  callback("rename", "");
7782
7784
  // If watcher is not closed, update it
@@ -7801,7 +7803,7 @@ var ts;
7801
7803
  }
7802
7804
  }
7803
7805
  if (hitSystemWatcherLimit) {
7804
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
7806
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
7805
7807
  return watchPresentFileSystemEntryWithFsWatchFile();
7806
7808
  }
7807
7809
  try {
@@ -7817,7 +7819,7 @@ var ts;
7817
7819
  // Eg. on linux the number of watches are limited and one could easily exhaust watches and the exception ENOSPC is thrown when creating watcher at that point
7818
7820
  // so instead of throwing error, use fs.watchFile
7819
7821
  hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
7820
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
7822
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
7821
7823
  return watchPresentFileSystemEntryWithFsWatchFile();
7822
7824
  }
7823
7825
  }
@@ -7955,7 +7957,7 @@ var ts;
7955
7957
  }
7956
7958
  }
7957
7959
  function readDirectory(path, extensions, excludes, includes, depth) {
7958
- return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath, directoryExists);
7960
+ return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
7959
7961
  }
7960
7962
  function fileSystemEntryExists(path, entryKind) {
7961
7963
  // Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve
@@ -10119,7 +10121,7 @@ var ts;
10119
10121
  line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
10120
10122
  }
10121
10123
  else {
10122
- ts.Debug.fail("Bad line number. Line: " + line + ", lineStarts.length: " + lineStarts.length + " , line map is correct? " + (debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
10124
+ ts.Debug.fail("Bad line number. Line: ".concat(line, ", lineStarts.length: ").concat(lineStarts.length, " , line map is correct? ").concat(debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
10123
10125
  }
10124
10126
  }
10125
10127
  var res = lineStarts[line] + character;
@@ -12999,7 +13001,7 @@ var ts;
12999
13001
  return typeof comment === "string" ? comment
13000
13002
  : comment === null || comment === void 0 ? void 0 : comment.map(function (c) {
13001
13003
  // TODO: Other kinds here
13002
- return c.kind === 319 /* JSDocText */ ? c.text : "{@link " + (c.name ? ts.entityNameToString(c.name) + " " : "") + c.text + "}";
13004
+ return c.kind === 319 /* JSDocText */ ? c.text : "{@link ".concat(c.name ? ts.entityNameToString(c.name) + " " : "").concat(c.text, "}");
13003
13005
  }).join("");
13004
13006
  }
13005
13007
  ts.getTextOfJSDocComment = getTextOfJSDocComment;
@@ -14269,8 +14271,8 @@ var ts;
14269
14271
  }
14270
14272
  function packageIdToString(_a) {
14271
14273
  var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
14272
- var fullName = subModuleName ? name + "/" + subModuleName : name;
14273
- return fullName + "@" + version;
14274
+ var fullName = subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
14275
+ return "".concat(fullName, "@").concat(version);
14274
14276
  }
14275
14277
  ts.packageIdToString = packageIdToString;
14276
14278
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
@@ -14349,7 +14351,7 @@ var ts;
14349
14351
  function nodePosToString(node) {
14350
14352
  var file = getSourceFileOfNode(node);
14351
14353
  var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
14352
- return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")";
14354
+ return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
14353
14355
  }
14354
14356
  ts.nodePosToString = nodePosToString;
14355
14357
  function getEndLinePosition(line, sourceFile) {
@@ -14488,7 +14490,7 @@ var ts;
14488
14490
  ts.isPinnedComment = isPinnedComment;
14489
14491
  function createCommentDirectivesMap(sourceFile, commentDirectives) {
14490
14492
  var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
14491
- "" + ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line,
14493
+ "".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
14492
14494
  commentDirective,
14493
14495
  ]); }));
14494
14496
  var usedLines = new ts.Map();
@@ -14505,10 +14507,10 @@ var ts;
14505
14507
  });
14506
14508
  }
14507
14509
  function markUsed(line) {
14508
- if (!directivesByLine.has("" + line)) {
14510
+ if (!directivesByLine.has("".concat(line))) {
14509
14511
  return false;
14510
14512
  }
14511
- usedLines.set("" + line, true);
14513
+ usedLines.set("".concat(line), true);
14512
14514
  return true;
14513
14515
  }
14514
14516
  }
@@ -14723,7 +14725,7 @@ var ts;
14723
14725
  }
14724
14726
  return node.text;
14725
14727
  }
14726
- return ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
14728
+ return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
14727
14729
  }
14728
14730
  ts.getLiteralText = getLiteralText;
14729
14731
  function canUseOriginalText(node, flags) {
@@ -16031,7 +16033,7 @@ var ts;
16031
16033
  }
16032
16034
  ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
16033
16035
  function getExternalModuleRequireArgument(node) {
16034
- return isRequireVariableDeclaration(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
16036
+ return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
16035
16037
  }
16036
16038
  ts.getExternalModuleRequireArgument = getExternalModuleRequireArgument;
16037
16039
  function isInternalModuleImportEqualsDeclaration(node) {
@@ -16089,17 +16091,29 @@ var ts;
16089
16091
  * Returns true if the node is a VariableDeclaration initialized to a require call (see `isRequireCall`).
16090
16092
  * This function does not test if the node is in a JavaScript file or not.
16091
16093
  */
16092
- function isRequireVariableDeclaration(node) {
16094
+ function isVariableDeclarationInitializedToRequire(node) {
16095
+ return isVariableDeclarationInitializedWithRequireHelper(node, /*allowAccessedRequire*/ false);
16096
+ }
16097
+ ts.isVariableDeclarationInitializedToRequire = isVariableDeclarationInitializedToRequire;
16098
+ /**
16099
+ * Like {@link isVariableDeclarationInitializedToRequire} but allows things like `require("...").foo.bar` or `require("...")["baz"]`.
16100
+ */
16101
+ function isVariableDeclarationInitializedToBareOrAccessedRequire(node) {
16102
+ return isVariableDeclarationInitializedWithRequireHelper(node, /*allowAccessedRequire*/ true);
16103
+ }
16104
+ ts.isVariableDeclarationInitializedToBareOrAccessedRequire = isVariableDeclarationInitializedToBareOrAccessedRequire;
16105
+ function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {
16093
16106
  if (node.kind === 202 /* BindingElement */) {
16094
16107
  node = node.parent.parent;
16095
16108
  }
16096
- return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), /*requireStringLiteralLikeArgument*/ true);
16109
+ return ts.isVariableDeclaration(node) &&
16110
+ !!node.initializer &&
16111
+ isRequireCall(allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, /*requireStringLiteralLikeArgument*/ true);
16097
16112
  }
16098
- ts.isRequireVariableDeclaration = isRequireVariableDeclaration;
16099
16113
  function isRequireVariableStatement(node) {
16100
16114
  return ts.isVariableStatement(node)
16101
16115
  && node.declarationList.declarations.length > 0
16102
- && ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl); });
16116
+ && ts.every(node.declarationList.declarations, function (decl) { return isVariableDeclarationInitializedToRequire(decl); });
16103
16117
  }
16104
16118
  ts.isRequireVariableStatement = isRequireVariableStatement;
16105
16119
  function isSingleOrDoubleQuote(charCode) {
@@ -17254,11 +17268,11 @@ var ts;
17254
17268
  }
17255
17269
  ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
17256
17270
  function getPropertyNameForUniqueESSymbol(symbol) {
17257
- return "__@" + ts.getSymbolId(symbol) + "@" + symbol.escapedName;
17271
+ return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
17258
17272
  }
17259
17273
  ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
17260
17274
  function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
17261
- return "__#" + ts.getSymbolId(containingClassSymbol) + "@" + description;
17275
+ return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
17262
17276
  }
17263
17277
  ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
17264
17278
  function isKnownSymbol(symbol) {
@@ -19951,7 +19965,7 @@ var ts;
19951
19965
  }
19952
19966
  ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
19953
19967
  function getJSXRuntimeImport(base, options) {
19954
- return base ? base + "/" + (options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
19968
+ return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
19955
19969
  }
19956
19970
  ts.getJSXRuntimeImport = getJSXRuntimeImport;
19957
19971
  function hasZeroOrOneAsteriskCharacter(str) {
@@ -20068,7 +20082,7 @@ var ts;
20068
20082
  }
20069
20083
  var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
20070
20084
  ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
20071
- var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))";
20085
+ var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
20072
20086
  var filesMatcher = {
20073
20087
  /**
20074
20088
  * Matches any single directory segment unless it is the last segment and a .min.js file
@@ -20081,7 +20095,7 @@ var ts;
20081
20095
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
20082
20096
  * files or directories, does not match subdirectories that start with a . character
20083
20097
  */
20084
- doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
20098
+ doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
20085
20099
  replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
20086
20100
  };
20087
20101
  var directoriesMatcher = {
@@ -20090,7 +20104,7 @@ var ts;
20090
20104
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
20091
20105
  * files or directories, does not match subdirectories that start with a . character
20092
20106
  */
20093
- doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
20107
+ doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
20094
20108
  replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
20095
20109
  };
20096
20110
  var excludeMatcher = {
@@ -20108,10 +20122,10 @@ var ts;
20108
20122
  if (!patterns || !patterns.length) {
20109
20123
  return undefined;
20110
20124
  }
20111
- var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
20125
+ var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
20112
20126
  // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
20113
20127
  var terminator = usage === "exclude" ? "($|/)" : "$";
20114
- return "^(" + pattern + ")" + terminator;
20128
+ return "^(".concat(pattern, ")").concat(terminator);
20115
20129
  }
20116
20130
  ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
20117
20131
  function getRegularExpressionsForWildcards(specs, basePath, usage) {
@@ -20133,7 +20147,7 @@ var ts;
20133
20147
  ts.isImplicitGlob = isImplicitGlob;
20134
20148
  function getPatternFromSpec(spec, basePath, usage) {
20135
20149
  var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
20136
- return pattern && "^(" + pattern + ")" + (usage === "exclude" ? "($|/)" : "$");
20150
+ return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
20137
20151
  }
20138
20152
  ts.getPatternFromSpec = getPatternFromSpec;
20139
20153
  function getSubPatternFromSpec(spec, basePath, usage, _a) {
@@ -20211,11 +20225,11 @@ var ts;
20211
20225
  currentDirectory = ts.normalizePath(currentDirectory);
20212
20226
  var absolutePath = ts.combinePaths(currentDirectory, path);
20213
20227
  return {
20214
- includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
20228
+ includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
20215
20229
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
20216
20230
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
20217
20231
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
20218
- basePaths: getBasePaths(absolutePath, includes, useCaseSensitiveFileNames)
20232
+ basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
20219
20233
  };
20220
20234
  }
20221
20235
  ts.getFileMatcherPatterns = getFileMatcherPatterns;
@@ -20224,7 +20238,7 @@ var ts;
20224
20238
  }
20225
20239
  ts.getRegexFromPattern = getRegexFromPattern;
20226
20240
  /** @param path directory of the tsconfig.json */
20227
- function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath, directoryExists) {
20241
+ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
20228
20242
  path = ts.normalizePath(path);
20229
20243
  currentDirectory = ts.normalizePath(currentDirectory);
20230
20244
  var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
@@ -20237,20 +20251,18 @@ var ts;
20237
20251
  var visited = new ts.Map();
20238
20252
  var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
20239
20253
  for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
20240
- var absoluteBasePath = _a[_i];
20241
- if (directoryExists(absoluteBasePath)) {
20242
- visitDirectory(absoluteBasePath, depth);
20243
- }
20254
+ var basePath = _a[_i];
20255
+ visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth);
20244
20256
  }
20245
20257
  return ts.flatten(results);
20246
- function visitDirectory(absolutePath, depth) {
20258
+ function visitDirectory(path, absolutePath, depth) {
20247
20259
  var canonicalPath = toCanonical(realpath(absolutePath));
20248
20260
  if (visited.has(canonicalPath))
20249
20261
  return;
20250
20262
  visited.set(canonicalPath, true);
20251
- var _a = getFileSystemEntries(absolutePath), files = _a.files, directories = _a.directories;
20263
+ var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
20252
20264
  var _loop_1 = function (current) {
20253
- var name = ts.combinePaths(absolutePath, current);
20265
+ var name = ts.combinePaths(path, current);
20254
20266
  var absoluteName = ts.combinePaths(absolutePath, current);
20255
20267
  if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
20256
20268
  return "continue";
@@ -20278,10 +20290,11 @@ var ts;
20278
20290
  }
20279
20291
  for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
20280
20292
  var current = _d[_c];
20293
+ var name = ts.combinePaths(path, current);
20281
20294
  var absoluteName = ts.combinePaths(absolutePath, current);
20282
20295
  if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
20283
20296
  (!excludeRegex || !excludeRegex.test(absoluteName))) {
20284
- visitDirectory(absoluteName, depth);
20297
+ visitDirectory(name, absoluteName, depth);
20285
20298
  }
20286
20299
  }
20287
20300
  }
@@ -20289,11 +20302,10 @@ var ts;
20289
20302
  ts.matchFiles = matchFiles;
20290
20303
  /**
20291
20304
  * Computes the unique non-wildcard base paths amongst the provided include patterns.
20292
- * @returns Absolute directory paths
20293
20305
  */
20294
- function getBasePaths(absoluteTsconfigPath, includes, useCaseSensitiveFileNames) {
20306
+ function getBasePaths(path, includes, useCaseSensitiveFileNames) {
20295
20307
  // Storage for our results in the form of literal paths (e.g. the paths as written by the user).
20296
- var basePaths = [absoluteTsconfigPath];
20308
+ var basePaths = [path];
20297
20309
  if (includes) {
20298
20310
  // Storage for literal base paths amongst the include patterns.
20299
20311
  var includeBasePaths = [];
@@ -20301,14 +20313,14 @@ var ts;
20301
20313
  var include = includes_1[_i];
20302
20314
  // We also need to check the relative paths by converting them to absolute and normalizing
20303
20315
  // in case they escape the base path (e.g "..\somedirectory")
20304
- var absoluteIncludePath = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(absoluteTsconfigPath, include));
20316
+ var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include));
20305
20317
  // Append the literal and canonical candidate base paths.
20306
- includeBasePaths.push(getIncludeBasePath(absoluteIncludePath));
20318
+ includeBasePaths.push(getIncludeBasePath(absolute));
20307
20319
  }
20308
20320
  // Sort the offsets array using either the literal or canonical path representations.
20309
20321
  includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
20310
20322
  var _loop_2 = function (includeBasePath) {
20311
- if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, absoluteTsconfigPath, !useCaseSensitiveFileNames); })) {
20323
+ if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
20312
20324
  basePaths.push(includeBasePath);
20313
20325
  }
20314
20326
  };
@@ -20494,7 +20506,7 @@ var ts;
20494
20506
  */
20495
20507
  function extensionFromPath(path) {
20496
20508
  var ext = tryGetExtensionFromPath(path);
20497
- return ext !== undefined ? ext : ts.Debug.fail("File " + path + " has unknown extension.");
20509
+ return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
20498
20510
  }
20499
20511
  ts.extensionFromPath = extensionFromPath;
20500
20512
  function isAnySupportedFileExtension(path) {
@@ -26483,7 +26495,7 @@ var ts;
26483
26495
  case 326 /* JSDocAugmentsTag */: return "augments";
26484
26496
  case 327 /* JSDocImplementsTag */: return "implements";
26485
26497
  default:
26486
- return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
26498
+ return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
26487
26499
  }
26488
26500
  }
26489
26501
  var rawTextScanner;
@@ -26811,7 +26823,7 @@ var ts;
26811
26823
  };
26812
26824
  var definedTextGetter_1 = function (path) {
26813
26825
  var result = textGetter_1(path);
26814
- return result !== undefined ? result : "/* Input file " + path + " was missing */\r\n";
26826
+ return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
26815
26827
  };
26816
26828
  var buildInfo_1;
26817
26829
  var getAndCacheBuildInfo_1 = function (getText) {
@@ -31349,7 +31361,7 @@ var ts;
31349
31361
  for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
31350
31362
  var keyword = viableKeywordSuggestions_1[_i];
31351
31363
  if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
31352
- return keyword + " " + expressionText.slice(keyword.length);
31364
+ return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
31353
31365
  }
31354
31366
  }
31355
31367
  return undefined;
@@ -38113,7 +38125,7 @@ var ts;
38113
38125
  if (namedArgRegExCache.has(name)) {
38114
38126
  return namedArgRegExCache.get(name);
38115
38127
  }
38116
- var result = new RegExp("(\\s" + name + "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))", "im");
38128
+ var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
38117
38129
  namedArgRegExCache.set(name, result);
38118
38130
  return result;
38119
38131
  }
@@ -39575,8 +39587,8 @@ var ts;
39575
39587
  }
39576
39588
  ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
39577
39589
  function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
39578
- var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
39579
- return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
39590
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
39591
+ return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
39580
39592
  }
39581
39593
  /* @internal */
39582
39594
  function parseCustomTypeOption(opt, value, errors) {
@@ -40370,10 +40382,10 @@ var ts;
40370
40382
  var newValue = compilerOptionsMap.get(cmd.name);
40371
40383
  var defaultValue = getDefaultValueForOption(cmd);
40372
40384
  if (newValue !== defaultValue) {
40373
- result.push("" + tab + cmd.name + ": " + newValue);
40385
+ result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
40374
40386
  }
40375
40387
  else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
40376
- result.push("" + tab + cmd.name + ": " + defaultValue);
40388
+ result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
40377
40389
  }
40378
40390
  });
40379
40391
  return result.join(newLine) + newLine;
@@ -40424,19 +40436,19 @@ var ts;
40424
40436
  if (entries.length !== 0) {
40425
40437
  entries.push({ value: "" });
40426
40438
  }
40427
- entries.push({ value: "/* " + category + " */" });
40439
+ entries.push({ value: "/* ".concat(category, " */") });
40428
40440
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
40429
40441
  var option = options_1[_i];
40430
40442
  var optionName = void 0;
40431
40443
  if (compilerOptionsMap.has(option.name)) {
40432
- optionName = "\"" + option.name + "\": " + JSON.stringify(compilerOptionsMap.get(option.name)) + ((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
40444
+ optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
40433
40445
  }
40434
40446
  else {
40435
- optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
40447
+ optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
40436
40448
  }
40437
40449
  entries.push({
40438
40450
  value: optionName,
40439
- description: "/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */"
40451
+ description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
40440
40452
  });
40441
40453
  marginLength = Math.max(optionName.length, marginLength);
40442
40454
  }
@@ -40445,25 +40457,25 @@ var ts;
40445
40457
  var tab = makePadding(2);
40446
40458
  var result = [];
40447
40459
  result.push("{");
40448
- result.push(tab + "\"compilerOptions\": {");
40449
- result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
40460
+ result.push("".concat(tab, "\"compilerOptions\": {"));
40461
+ result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file), " */"));
40450
40462
  result.push("");
40451
40463
  // Print out each row, aligning all the descriptions on the same column.
40452
40464
  for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
40453
40465
  var entry = entries_2[_a];
40454
40466
  var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
40455
- result.push(value && "" + tab + tab + value + (description && (makePadding(marginLength - value.length + 2) + description)));
40467
+ result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
40456
40468
  }
40457
40469
  if (fileNames.length) {
40458
- result.push(tab + "},");
40459
- result.push(tab + "\"files\": [");
40470
+ result.push("".concat(tab, "},"));
40471
+ result.push("".concat(tab, "\"files\": ["));
40460
40472
  for (var i = 0; i < fileNames.length; i++) {
40461
- result.push("" + tab + tab + JSON.stringify(fileNames[i]) + (i === fileNames.length - 1 ? "" : ","));
40473
+ result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
40462
40474
  }
40463
- result.push(tab + "]");
40475
+ result.push("".concat(tab, "]"));
40464
40476
  }
40465
40477
  else {
40466
- result.push(tab + "}");
40478
+ result.push("".concat(tab, "}"));
40467
40479
  }
40468
40480
  result.push("}");
40469
40481
  return result.join(newLine) + newLine;
@@ -40861,7 +40873,7 @@ var ts;
40861
40873
  if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
40862
40874
  var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
40863
40875
  if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
40864
- extendedConfigPath = extendedConfigPath + ".json";
40876
+ extendedConfigPath = "".concat(extendedConfigPath, ".json");
40865
40877
  if (!host.fileExists(extendedConfigPath)) {
40866
40878
  errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
40867
40879
  return undefined;
@@ -41106,7 +41118,7 @@ var ts;
41106
41118
  // Valid only if *.json specified
41107
41119
  if (!jsonOnlyIncludeRegexes) {
41108
41120
  var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
41109
- var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^" + pattern + "$"; });
41121
+ var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
41110
41122
  jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
41111
41123
  }
41112
41124
  var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
@@ -41542,7 +41554,7 @@ var ts;
41542
41554
  var bestVersionKey = result.version, bestVersionPaths = result.paths;
41543
41555
  if (typeof bestVersionPaths !== "object") {
41544
41556
  if (state.traceEnabled) {
41545
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['" + bestVersionKey + "']", "object", typeof bestVersionPaths);
41557
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
41546
41558
  }
41547
41559
  return;
41548
41560
  }
@@ -41653,7 +41665,10 @@ var ts;
41653
41665
  }
41654
41666
  }
41655
41667
  var failedLookupLocations = [];
41656
- var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.AllFeatures, conditions: ["node", "require", "types"] };
41668
+ var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
41669
+ ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
41670
+ NodeResolutionFeatures.None;
41671
+ var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
41657
41672
  var resolved = primaryLookup();
41658
41673
  var primary = true;
41659
41674
  if (!resolved) {
@@ -41920,7 +41935,7 @@ var ts;
41920
41935
  };
41921
41936
  return cache;
41922
41937
  function getUnderlyingCacheKey(specifier, mode) {
41923
- var result = mode === undefined ? specifier : mode + "|" + specifier;
41938
+ var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
41924
41939
  memoizedReverseKeys.set(result, [specifier, mode]);
41925
41940
  return result;
41926
41941
  }
@@ -41951,7 +41966,7 @@ var ts;
41951
41966
  }
41952
41967
  function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
41953
41968
  ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
41954
- return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode + "|" + nonRelativeModuleName, createPerModuleNameCache);
41969
+ return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
41955
41970
  }
41956
41971
  function createPerModuleNameCache() {
41957
41972
  var directoryPathMap = new ts.Map();
@@ -42098,10 +42113,10 @@ var ts;
42098
42113
  result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
42099
42114
  break;
42100
42115
  default:
42101
- return ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
42116
+ return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
42102
42117
  }
42103
42118
  if (result && result.resolvedModule)
42104
- ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\"");
42119
+ ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
42105
42120
  ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
42106
42121
  if (perFolderCache) {
42107
42122
  perFolderCache.set(moduleName, resolutionMode, result);
@@ -42304,7 +42319,7 @@ var ts;
42304
42319
  function resolveJSModule(moduleName, initialDir, host) {
42305
42320
  var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
42306
42321
  if (!resolvedModule) {
42307
- throw new Error("Could not resolve JS module '" + moduleName + "' starting at '" + initialDir + "'. Looked in: " + failedLookupLocations.join(", "));
42322
+ throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
42308
42323
  }
42309
42324
  return resolvedModule.resolvedFileName;
42310
42325
  }
@@ -42328,13 +42343,15 @@ var ts;
42328
42343
  // not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
42329
42344
  NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
42330
42345
  NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
42346
+ NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
42347
+ NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
42331
42348
  NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
42332
42349
  })(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
42333
42350
  function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42334
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Imports | NodeResolutionFeatures.SelfName | NodeResolutionFeatures.Exports, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42351
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42335
42352
  }
42336
42353
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42337
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.AllFeatures, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42354
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42338
42355
  }
42339
42356
  function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42340
42357
  var containingDirectory = ts.getDirectoryPath(containingFile);
@@ -42417,7 +42434,7 @@ var ts;
42417
42434
  if (traceEnabled) {
42418
42435
  trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
42419
42436
  }
42420
- ts.Debug.assert(host.fileExists(real), path + " linked to nonexistent file " + real);
42437
+ ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
42421
42438
  return real;
42422
42439
  }
42423
42440
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -42803,7 +42820,7 @@ var ts;
42803
42820
  return undefined;
42804
42821
  }
42805
42822
  var trailingParts = parts.slice(nameParts.length);
42806
- return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
42823
+ return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
42807
42824
  }
42808
42825
  function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
42809
42826
  if (!scope.packageJsonContent.exports) {
@@ -43131,7 +43148,7 @@ var ts;
43131
43148
  }
43132
43149
  /* @internal */
43133
43150
  function getTypesPackageName(packageName) {
43134
- return "@types/" + mangleScopedPackageName(packageName);
43151
+ return "@types/".concat(mangleScopedPackageName(packageName));
43135
43152
  }
43136
43153
  ts.getTypesPackageName = getTypesPackageName;
43137
43154
  /* @internal */
@@ -43532,7 +43549,7 @@ var ts;
43532
43549
  if (name) {
43533
43550
  if (ts.isAmbientModule(node)) {
43534
43551
  var moduleName = ts.getTextOfIdentifierOrLiteral(name);
43535
- return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
43552
+ return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
43536
43553
  }
43537
43554
  if (name.kind === 161 /* ComputedPropertyName */) {
43538
43555
  var nameExpression = name.expression;
@@ -43589,7 +43606,7 @@ var ts;
43589
43606
  case 163 /* Parameter */:
43590
43607
  // Parameters with names are handled at the top of this function. Parameters
43591
43608
  // without names can only come from JSDocFunctionTypes.
43592
- ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
43609
+ ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: ".concat(ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind, ", expected JSDocFunctionType"); });
43593
43610
  var functionType = node.parent;
43594
43611
  var index = functionType.parameters.indexOf(node);
43595
43612
  return "arg" + index;
@@ -43701,7 +43718,7 @@ var ts;
43701
43718
  var relatedInformation_1 = [];
43702
43719
  if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
43703
43720
  // export type T; - may have meant export type { T }?
43704
- relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { " + ts.unescapeLeadingUnderscores(node.name.escapedText) + " }"));
43721
+ relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
43705
43722
  }
43706
43723
  var declarationName_1 = ts.getNameOfDeclaration(node) || node;
43707
43724
  ts.forEach(symbol.declarations, function (declaration, index) {
@@ -45774,7 +45791,7 @@ var ts;
45774
45791
  }
45775
45792
  }
45776
45793
  function bindSourceFileAsExternalModule() {
45777
- bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\"");
45794
+ bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
45778
45795
  }
45779
45796
  function bindExportAssignment(node) {
45780
45797
  if (!container.symbol || !container.symbol.exports) {
@@ -46253,7 +46270,7 @@ var ts;
46253
46270
  checkStrictModeEvalOrArguments(node, node.name);
46254
46271
  }
46255
46272
  if (!ts.isBindingPattern(node.name)) {
46256
- if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node) && !ts.getJSDocTypeTag(node)) {
46273
+ if (ts.isInJSFile(node) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node) && !ts.getJSDocTypeTag(node)) {
46257
46274
  declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);
46258
46275
  }
46259
46276
  else if (ts.isBlockOrCatchScoped(node)) {
@@ -47863,7 +47880,7 @@ var ts;
47863
47880
  if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
47864
47881
  var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
47865
47882
  var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
47866
- var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path + "|" + secondFile_1.path, function () {
47883
+ var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
47867
47884
  return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
47868
47885
  });
47869
47886
  var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
@@ -48297,11 +48314,12 @@ var ts;
48297
48314
  *
48298
48315
  * @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
48299
48316
  */
48300
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
48317
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
48301
48318
  if (excludeGlobals === void 0) { excludeGlobals = false; }
48302
- return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
48319
+ if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
48320
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
48303
48321
  }
48304
- function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
48322
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
48305
48323
  var _a, _b, _c;
48306
48324
  var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
48307
48325
  var result;
@@ -48618,7 +48636,7 @@ var ts;
48618
48636
  }
48619
48637
  }
48620
48638
  if (!result) {
48621
- if (nameNotFoundMessage) {
48639
+ if (nameNotFoundMessage && produceDiagnostics) {
48622
48640
  if (!errorLocation ||
48623
48641
  !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
48624
48642
  !checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -48628,7 +48646,7 @@ var ts;
48628
48646
  !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
48629
48647
  !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
48630
48648
  var suggestion = void 0;
48631
- if (suggestionCount < maximumSuggestionCount) {
48649
+ if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
48632
48650
  suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
48633
48651
  var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
48634
48652
  if (isGlobalScopeAugmentationDeclaration) {
@@ -48664,7 +48682,7 @@ var ts;
48664
48682
  return undefined;
48665
48683
  }
48666
48684
  // Perform extra checks only if error reporting was requested
48667
- if (nameNotFoundMessage) {
48685
+ if (nameNotFoundMessage && produceDiagnostics) {
48668
48686
  if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
48669
48687
  // We have a match, but the reference occurred within a property initializer and the identifier also binds
48670
48688
  // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
@@ -49031,7 +49049,7 @@ var ts;
49031
49049
  && isAliasableOrJsExpression(node.parent.right)
49032
49050
  || node.kind === 295 /* ShorthandPropertyAssignment */
49033
49051
  || node.kind === 294 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer)
49034
- || ts.isRequireVariableDeclaration(node);
49052
+ || ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node);
49035
49053
  }
49036
49054
  function isAliasableOrJsExpression(e) {
49037
49055
  return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
@@ -50002,7 +50020,7 @@ var ts;
50002
50020
  if (!sigs || !sigs.length) {
50003
50021
  sigs = getSignaturesOfStructuredType(type, 1 /* Construct */);
50004
50022
  }
50005
- if ((sigs && sigs.length) || getPropertyOfType(type, "default" /* Default */)) {
50023
+ if ((sigs && sigs.length) || getPropertyOfType(type, "default" /* Default */, /*skipObjectFunctionPropertyAugment*/ true)) {
50006
50024
  var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
50007
50025
  return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
50008
50026
  }
@@ -50502,7 +50520,7 @@ var ts;
50502
50520
  var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
50503
50521
  // Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
50504
50522
  var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
50505
- var key = (useOnlyExternalAliasing ? 0 : 1) + "|" + (firstRelevantLocation && getNodeId(firstRelevantLocation)) + "|" + meaning;
50523
+ var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
50506
50524
  if (cache.has(key)) {
50507
50525
  return cache.get(key);
50508
50526
  }
@@ -51350,7 +51368,7 @@ var ts;
51350
51368
  context.symbolDepth = new ts.Map();
51351
51369
  }
51352
51370
  var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
51353
- var key = getTypeId(type) + "|" + context.flags;
51371
+ var key = "".concat(getTypeId(type), "|").concat(context.flags);
51354
51372
  if (links) {
51355
51373
  links.serializedTypes || (links.serializedTypes = new ts.Map());
51356
51374
  }
@@ -51619,7 +51637,7 @@ var ts;
51619
51637
  }
51620
51638
  }
51621
51639
  if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
51622
- typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... " + (properties.length - i) + " more ...", /*questionToken*/ undefined, /*type*/ undefined));
51640
+ typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
51623
51641
  addPropertyToElementList(properties[properties.length - 1], context, typeElements);
51624
51642
  break;
51625
51643
  }
@@ -51734,7 +51752,7 @@ var ts;
51734
51752
  else if (types.length > 2) {
51735
51753
  return [
51736
51754
  typeToTypeNodeHelper(types[0], context),
51737
- ts.factory.createTypeReferenceNode("... " + (types.length - 2) + " more ...", /*typeArguments*/ undefined),
51755
+ ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
51738
51756
  typeToTypeNodeHelper(types[types.length - 1], context)
51739
51757
  ];
51740
51758
  }
@@ -51748,7 +51766,7 @@ var ts;
51748
51766
  var type = types_2[_i];
51749
51767
  i++;
51750
51768
  if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
51751
- result_5.push(ts.factory.createTypeReferenceNode("... " + (types.length - i) + " more ...", /*typeArguments*/ undefined));
51769
+ result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
51752
51770
  var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
51753
51771
  if (typeNode_1) {
51754
51772
  result_5.push(typeNode_1);
@@ -52256,7 +52274,7 @@ var ts;
52256
52274
  var text = rawtext;
52257
52275
  while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
52258
52276
  i++;
52259
- text = rawtext + "_" + i;
52277
+ text = "".concat(rawtext, "_").concat(i);
52260
52278
  }
52261
52279
  if (text !== rawtext) {
52262
52280
  result = ts.factory.createIdentifier(text, result.typeArguments);
@@ -52582,7 +52600,7 @@ var ts;
52582
52600
  function getNameForJSDocFunctionParameter(p, index) {
52583
52601
  return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
52584
52602
  : getEffectiveDotDotDotForParameter(p) ? "args"
52585
- : "arg" + index;
52603
+ : "arg".concat(index);
52586
52604
  }
52587
52605
  function rewriteModuleSpecifier(parent, lit) {
52588
52606
  if (bundled) {
@@ -53667,7 +53685,7 @@ var ts;
53667
53685
  return results_1;
53668
53686
  }
53669
53687
  // The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
53670
- return ts.Debug.fail("Unhandled class member kind! " + (p.__debugFlags || p.flags));
53688
+ return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
53671
53689
  };
53672
53690
  }
53673
53691
  function serializePropertySymbolForInterface(p, baseType) {
@@ -53742,7 +53760,7 @@ var ts;
53742
53760
  if (ref) {
53743
53761
  return ref;
53744
53762
  }
53745
- var tempName = getUnusedName(rootName + "_base");
53763
+ var tempName = getUnusedName("".concat(rootName, "_base"));
53746
53764
  var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
53747
53765
  ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
53748
53766
  ], 2 /* Const */));
@@ -53789,7 +53807,7 @@ var ts;
53789
53807
  var original = input;
53790
53808
  while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
53791
53809
  i++;
53792
- input = original + "_" + i;
53810
+ input = "".concat(original, "_").concat(i);
53793
53811
  }
53794
53812
  (_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
53795
53813
  if (id) {
@@ -53897,15 +53915,15 @@ var ts;
53897
53915
  if (nameType.flags & 384 /* StringOrNumberLiteral */) {
53898
53916
  var name = "" + nameType.value;
53899
53917
  if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
53900
- return "\"" + ts.escapeString(name, 34 /* doubleQuote */) + "\"";
53918
+ return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
53901
53919
  }
53902
53920
  if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
53903
- return "[" + name + "]";
53921
+ return "[".concat(name, "]");
53904
53922
  }
53905
53923
  return name;
53906
53924
  }
53907
53925
  if (nameType.flags & 8192 /* UniqueESSymbol */) {
53908
- return "[" + getNameOfSymbolAsWritten(nameType.symbol, context) + "]";
53926
+ return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
53909
53927
  }
53910
53928
  }
53911
53929
  }
@@ -56679,7 +56697,7 @@ var ts;
56679
56697
  !leftName ? rightName :
56680
56698
  !rightName ? leftName :
56681
56699
  undefined;
56682
- var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg" + i);
56700
+ var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
56683
56701
  paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
56684
56702
  params[i] = paramSymbol;
56685
56703
  }
@@ -58598,7 +58616,7 @@ var ts;
58598
58616
  return result;
58599
58617
  }
58600
58618
  function getAliasId(aliasSymbol, aliasTypeArguments) {
58601
- return aliasSymbol ? "@" + getSymbolId(aliasSymbol) + (aliasTypeArguments ? ":" + getTypeListId(aliasTypeArguments) : "") : "";
58619
+ return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
58602
58620
  }
58603
58621
  // This function is used to propagate certain flags when creating new object type references and union types.
58604
58622
  // It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
@@ -58784,7 +58802,7 @@ var ts;
58784
58802
  return undefined;
58785
58803
  }
58786
58804
  function getSymbolPath(symbol) {
58787
- return symbol.parent ? getSymbolPath(symbol.parent) + "." + symbol.escapedName : symbol.escapedName;
58805
+ return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
58788
58806
  }
58789
58807
  function getUnresolvedSymbolForEntityName(name) {
58790
58808
  var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
@@ -58795,7 +58813,7 @@ var ts;
58795
58813
  var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
58796
58814
  name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
58797
58815
  undefined;
58798
- var path = parentSymbol ? getSymbolPath(parentSymbol) + "." + text : text;
58816
+ var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
58799
58817
  var result = unresolvedSymbols.get(path);
58800
58818
  if (!result) {
58801
58819
  unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
@@ -58868,7 +58886,7 @@ var ts;
58868
58886
  if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
58869
58887
  return baseType;
58870
58888
  }
58871
- var id = getTypeId(baseType) + ">" + getTypeId(substitute);
58889
+ var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
58872
58890
  var cached = substitutionTypes.get(id);
58873
58891
  if (cached) {
58874
58892
  return cached;
@@ -59069,7 +59087,7 @@ var ts;
59069
59087
  }
59070
59088
  function getGlobalSymbol(name, meaning, diagnostic) {
59071
59089
  // Don't track references for global symbols anyway, so value if `isReference` is arbitrary
59072
- return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
59090
+ return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
59073
59091
  }
59074
59092
  function getGlobalType(name, arity, reportErrors) {
59075
59093
  var symbol = getGlobalTypeSymbol(name, reportErrors);
@@ -59529,6 +59547,8 @@ var ts;
59529
59547
  // We ignore 'never' types in unions
59530
59548
  if (!(flags & 131072 /* Never */)) {
59531
59549
  includes |= flags & 205258751 /* IncludesMask */;
59550
+ if (flags & 465829888 /* Instantiable */)
59551
+ includes |= 33554432 /* IncludesInstantiable */;
59532
59552
  if (type === wildcardType)
59533
59553
  includes |= 8388608 /* IncludesWildcard */;
59534
59554
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
@@ -59742,7 +59762,7 @@ var ts;
59742
59762
  origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
59743
59763
  }
59744
59764
  }
59745
- var objectFlags = (includes & 468598819 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
59765
+ var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
59746
59766
  (includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
59747
59767
  return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
59748
59768
  }
@@ -59790,9 +59810,9 @@ var ts;
59790
59810
  return types[0];
59791
59811
  }
59792
59812
  var typeKey = !origin ? getTypeListId(types) :
59793
- origin.flags & 1048576 /* Union */ ? "|" + getTypeListId(origin.types) :
59794
- origin.flags & 2097152 /* Intersection */ ? "&" + getTypeListId(origin.types) :
59795
- "#" + origin.type.id + "|" + getTypeListId(types); // origin type id alone is insufficient, as `keyof x` may resolve to multiple WIP values while `x` is still resolving
59813
+ origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
59814
+ origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
59815
+ "#".concat(origin.type.id, "|").concat(getTypeListId(types)); // origin type id alone is insufficient, as `keyof x` may resolve to multiple WIP values while `x` is still resolving
59796
59816
  var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
59797
59817
  var type = unionTypes.get(id);
59798
59818
  if (!type) {
@@ -60314,7 +60334,7 @@ var ts;
60314
60334
  if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
60315
60335
  return stringType;
60316
60336
  }
60317
- var id = getTypeListId(newTypes) + "|" + ts.map(newTexts, function (t) { return t.length; }).join(",") + "|" + newTexts.join("");
60337
+ var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
60318
60338
  var type = templateLiteralTypes.get(id);
60319
60339
  if (!type) {
60320
60340
  templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
@@ -60374,7 +60394,7 @@ var ts;
60374
60394
  return str;
60375
60395
  }
60376
60396
  function getStringMappingTypeForGenericType(symbol, type) {
60377
- var id = getSymbolId(symbol) + "," + getTypeId(type);
60397
+ var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
60378
60398
  var result = stringMappingTypes.get(id);
60379
60399
  if (!result) {
60380
60400
  stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
@@ -61394,7 +61414,7 @@ var ts;
61394
61414
  function createUniqueESSymbolType(symbol) {
61395
61415
  var type = createType(8192 /* UniqueESSymbol */);
61396
61416
  type.symbol = symbol;
61397
- type.escapedName = "__@" + type.symbol.escapedName + "@" + getSymbolId(type.symbol);
61417
+ type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
61398
61418
  return type;
61399
61419
  }
61400
61420
  function getESSymbolLikeTypeForNode(node) {
@@ -62937,7 +62957,7 @@ var ts;
62937
62957
  return true;
62938
62958
  }
62939
62959
  if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {
62940
- var related = relation.get(getRelationKey(source, target, 0 /* None */, relation));
62960
+ var related = relation.get(getRelationKey(source, target, 0 /* None */, relation, /*ignoreConstraints*/ false));
62941
62961
  if (related !== undefined) {
62942
62962
  return !!(related & 1 /* Succeeded */);
62943
62963
  }
@@ -63083,24 +63103,24 @@ var ts;
63083
63103
  case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
63084
63104
  // Parenthesize a `new` if there is one
63085
63105
  if (path.indexOf("new ") === 0) {
63086
- path = "(" + path + ")";
63106
+ path = "(".concat(path, ")");
63087
63107
  }
63088
63108
  var str = "" + args[0];
63089
63109
  // If leading, just print back the arg (irrespective of if it's a valid identifier)
63090
63110
  if (path.length === 0) {
63091
- path = "" + str;
63111
+ path = "".concat(str);
63092
63112
  }
63093
63113
  // Otherwise write a dotted name if possible
63094
63114
  else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
63095
- path = path + "." + str;
63115
+ path = "".concat(path, ".").concat(str);
63096
63116
  }
63097
63117
  // Failing that, check if the name is already a computed name
63098
63118
  else if (str[0] === "[" && str[str.length - 1] === "]") {
63099
- path = "" + path + str;
63119
+ path = "".concat(path).concat(str);
63100
63120
  }
63101
63121
  // And finally write out a computed name as a last resort
63102
63122
  else {
63103
- path = path + "[" + str + "]";
63123
+ path = "".concat(path, "[").concat(str, "]");
63104
63124
  }
63105
63125
  break;
63106
63126
  }
@@ -63129,7 +63149,7 @@ var ts;
63129
63149
  msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
63130
63150
  ? ""
63131
63151
  : "...";
63132
- path = "" + prefix + path + "(" + params + ")";
63152
+ path = "".concat(prefix).concat(path, "(").concat(params, ")");
63133
63153
  }
63134
63154
  break;
63135
63155
  }
@@ -63142,7 +63162,7 @@ var ts;
63142
63162
  break;
63143
63163
  }
63144
63164
  default:
63145
- return ts.Debug.fail("Unhandled Diagnostic: " + msg.code);
63165
+ return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
63146
63166
  }
63147
63167
  }
63148
63168
  if (path) {
@@ -63786,7 +63806,8 @@ var ts;
63786
63806
  if (overflow) {
63787
63807
  return 0 /* False */;
63788
63808
  }
63789
- var id = getRelationKey(source, target, intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0), relation);
63809
+ var keyIntersectionState = intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0);
63810
+ var id = getRelationKey(source, target, keyIntersectionState, relation, /*ingnoreConstraints*/ false);
63790
63811
  var entry = relation.get(id);
63791
63812
  if (entry !== undefined) {
63792
63813
  if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) {
@@ -63813,16 +63834,13 @@ var ts;
63813
63834
  targetStack = [];
63814
63835
  }
63815
63836
  else {
63816
- // generate a key where all type parameter id positions are replaced with unconstrained type parameter ids
63817
- // this isn't perfect - nested type references passed as type arguments will muck up the indexes and thus
63818
- // prevent finding matches- but it should hit up the common cases
63819
- var broadestEquivalentId = id.split(",").map(function (i) { return i.replace(/-\d+/g, function (_match, offset) {
63820
- var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
63821
- return "=" + index;
63822
- }); }).join(",");
63837
+ // A key that starts with "*" is an indication that we have type references that reference constrained
63838
+ // type parameters. For such keys we also check against the key we would have gotten if all type parameters
63839
+ // were unconstrained.
63840
+ var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, /*ignoreConstraints*/ true) : undefined;
63823
63841
  for (var i = 0; i < maybeCount; i++) {
63824
63842
  // If source and target are already being compared, consider them related with assumptions
63825
- if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
63843
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63826
63844
  return 3 /* Maybe */;
63827
63845
  }
63828
63846
  }
@@ -64117,7 +64135,7 @@ var ts;
64117
64135
  originalErrorInfo = undefined;
64118
64136
  }
64119
64137
  }
64120
- else if (isGenericMappedType(target)) {
64138
+ else if (isGenericMappedType(target) && relation !== identityRelation) {
64121
64139
  // Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
64122
64140
  var keysRemapped = !!target.declaration.nameType;
64123
64141
  var templateType = getTemplateTypeFromMappedType(target);
@@ -65329,48 +65347,56 @@ var ts;
65329
65347
  function isTypeReferenceWithGenericArguments(type) {
65330
65348
  return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t); });
65331
65349
  }
65332
- /**
65333
- * getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
65334
- * where A.id=111 and number.id=12
65335
- */
65336
- function getTypeReferenceId(type, typeParameters, depth) {
65337
- if (depth === void 0) { depth = 0; }
65338
- var result = "" + type.target.id;
65339
- for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
65340
- var t = _a[_i];
65341
- if (isUnconstrainedTypeParameter(t)) {
65342
- var index = typeParameters.indexOf(t);
65343
- if (index < 0) {
65344
- index = typeParameters.length;
65345
- typeParameters.push(t);
65350
+ function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {
65351
+ var typeParameters = [];
65352
+ var constraintMarker = "";
65353
+ var sourceId = getTypeReferenceId(source, 0);
65354
+ var targetId = getTypeReferenceId(target, 0);
65355
+ return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
65356
+ // getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
65357
+ // where A.id=111 and number.id=12
65358
+ function getTypeReferenceId(type, depth) {
65359
+ if (depth === void 0) { depth = 0; }
65360
+ var result = "" + type.target.id;
65361
+ for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
65362
+ var t = _a[_i];
65363
+ if (t.flags & 262144 /* TypeParameter */) {
65364
+ if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {
65365
+ var index = typeParameters.indexOf(t);
65366
+ if (index < 0) {
65367
+ index = typeParameters.length;
65368
+ typeParameters.push(t);
65369
+ }
65370
+ result += "=" + index;
65371
+ continue;
65372
+ }
65373
+ // We mark type references that reference constrained type parameters such that we know to obtain
65374
+ // and look for a "broadest equivalent key" in the cache.
65375
+ constraintMarker = "*";
65376
+ }
65377
+ else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
65378
+ result += "<" + getTypeReferenceId(t, depth + 1) + ">";
65379
+ continue;
65346
65380
  }
65347
- result += "=" + index;
65348
- }
65349
- else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
65350
- result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
65351
- }
65352
- else {
65353
65381
  result += "-" + t.id;
65354
65382
  }
65383
+ return result;
65355
65384
  }
65356
- return result;
65357
65385
  }
65358
65386
  /**
65359
65387
  * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters.
65360
65388
  * For other cases, the types ids are used.
65361
65389
  */
65362
- function getRelationKey(source, target, intersectionState, relation) {
65390
+ function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
65363
65391
  if (relation === identityRelation && source.id > target.id) {
65364
65392
  var temp = source;
65365
65393
  source = target;
65366
65394
  target = temp;
65367
65395
  }
65368
65396
  var postFix = intersectionState ? ":" + intersectionState : "";
65369
- if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) {
65370
- var typeParameters = [];
65371
- return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + postFix;
65372
- }
65373
- return source.id + "," + target.id + postFix;
65397
+ return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
65398
+ getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
65399
+ "".concat(source.id, ",").concat(target.id).concat(postFix);
65374
65400
  }
65375
65401
  // Invoke the callback for each underlying property symbol of the given symbol and return the first
65376
65402
  // value that isn't undefined.
@@ -65418,28 +65444,35 @@ var ts;
65418
65444
  !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
65419
65445
  }
65420
65446
  // Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
65421
- // for 5 or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
65447
+ // for maxDepth or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
65422
65448
  // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
65423
- // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least 5
65449
+ // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least maxDepth
65424
65450
  // levels, but unequal at some level beyond that.
65425
- // In addition, this will also detect when an indexed access has been chained off of 5 or more times (which is essentially
65426
- // the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding false positives
65427
- // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
65428
- // It also detects when a recursive type reference has expanded 5 or more times, eg, if the true branch of
65451
+ // In addition, this will also detect when an indexed access has been chained off of maxDepth more times (which is
65452
+ // essentially the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
65453
+ // false positives for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
65454
+ // It also detects when a recursive type reference has expanded maxDepth or more times, e.g. if the true branch of
65429
65455
  // `type A<T> = null extends T ? [A<NonNullable<T>>] : [T]`
65430
- // has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`
65431
- // in such cases we need to terminate the expansion, and we do so here.
65456
+ // has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`. In such cases we need
65457
+ // to terminate the expansion, and we do so here.
65432
65458
  function isDeeplyNestedType(type, stack, depth, maxDepth) {
65433
- if (maxDepth === void 0) { maxDepth = 5; }
65459
+ if (maxDepth === void 0) { maxDepth = 3; }
65434
65460
  if (depth >= maxDepth) {
65435
65461
  var identity_1 = getRecursionIdentity(type);
65436
65462
  var count = 0;
65463
+ var lastTypeId = 0;
65437
65464
  for (var i = 0; i < depth; i++) {
65438
- if (getRecursionIdentity(stack[i]) === identity_1) {
65439
- count++;
65440
- if (count >= maxDepth) {
65441
- return true;
65465
+ var t = stack[i];
65466
+ if (getRecursionIdentity(t) === identity_1) {
65467
+ // We only count occurrences with a higher type id than the previous occurrence, since higher
65468
+ // type ids are an indicator of newer instantiations caused by recursion.
65469
+ if (t.id >= lastTypeId) {
65470
+ count++;
65471
+ if (count >= maxDepth) {
65472
+ return true;
65473
+ }
65442
65474
  }
65475
+ lastTypeId = t.id;
65443
65476
  }
65444
65477
  }
65445
65478
  }
@@ -66178,7 +66211,8 @@ var ts;
66178
66211
  (resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) ||
66179
66212
  param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
66180
66213
  var newName = "arg" + param.parent.parameters.indexOf(param);
66181
- errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, ts.declarationNameToString(param.name));
66214
+ var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
66215
+ errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
66182
66216
  return;
66183
66217
  }
66184
66218
  diagnostic = declaration.dotDotDotToken ?
@@ -67481,11 +67515,11 @@ var ts;
67481
67515
  case 79 /* Identifier */:
67482
67516
  if (!ts.isThisInTypeQuery(node)) {
67483
67517
  var symbol = getResolvedSymbol(node);
67484
- return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType) + "|" + getSymbolId(symbol) : undefined;
67518
+ return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
67485
67519
  }
67486
67520
  // falls through
67487
67521
  case 108 /* ThisKeyword */:
67488
- return "0|" + (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType);
67522
+ return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
67489
67523
  case 229 /* NonNullExpression */:
67490
67524
  case 211 /* ParenthesizedExpression */:
67491
67525
  return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
@@ -71247,7 +71281,7 @@ var ts;
71247
71281
  !leftName ? rightName :
71248
71282
  !rightName ? leftName :
71249
71283
  undefined;
71250
- var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg" + i);
71284
+ var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
71251
71285
  paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
71252
71286
  params[i] = paramSymbol;
71253
71287
  }
@@ -73028,7 +73062,7 @@ var ts;
73028
73062
  }
73029
73063
  function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
73030
73064
  ts.Debug.assert(outerName !== undefined, "outername should always be defined");
73031
- var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
73065
+ var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
73032
73066
  ts.Debug.assertEqual(outerName, name, "name should equal outerName");
73033
73067
  var symbol = getSymbol(symbols, name, meaning);
73034
73068
  // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
@@ -78551,7 +78585,9 @@ var ts;
78551
78585
  var typeReferenceNode = ts.tryCast(node.parent, ts.isTypeReferenceType);
78552
78586
  if (!typeReferenceNode)
78553
78587
  return undefined;
78554
- var typeParameters = getTypeParametersForTypeReference(typeReferenceNode); // TODO: GH#18217
78588
+ var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
78589
+ if (!typeParameters)
78590
+ return undefined;
78555
78591
  var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
78556
78592
  return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
78557
78593
  }
@@ -80416,7 +80452,7 @@ var ts;
80416
80452
  }
80417
80453
  // For a commonjs `const x = require`, validate the alias and exit
80418
80454
  var symbol = getSymbolOfNode(node);
80419
- if (symbol.flags & 2097152 /* Alias */ && ts.isRequireVariableDeclaration(node)) {
80455
+ if (symbol.flags & 2097152 /* Alias */ && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)) {
80420
80456
  checkAliasSymbol(node);
80421
80457
  return;
80422
80458
  }
@@ -81158,7 +81194,7 @@ var ts;
81158
81194
  function getPropertyNameForKnownSymbolName(symbolName) {
81159
81195
  var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
81160
81196
  var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
81161
- return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@" + symbolName;
81197
+ return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
81162
81198
  }
81163
81199
  /**
81164
81200
  * Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
@@ -88130,7 +88166,7 @@ var ts;
88130
88166
  value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
88131
88167
  value === 62 ? 43 /* plus */ :
88132
88168
  value === 63 ? 47 /* slash */ :
88133
- ts.Debug.fail(value + ": not a base64 value");
88169
+ ts.Debug.fail("".concat(value, ": not a base64 value"));
88134
88170
  }
88135
88171
  function base64FormatDecode(ch) {
88136
88172
  return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
@@ -88205,7 +88241,7 @@ var ts;
88205
88241
  var mappings = ts.arrayFrom(decoder, processMapping);
88206
88242
  if (decoder.error !== undefined) {
88207
88243
  if (host.log) {
88208
- host.log("Encountered error while decoding sourcemap: " + decoder.error);
88244
+ host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
88209
88245
  }
88210
88246
  decodedMappings = ts.emptyArray;
88211
88247
  }
@@ -91871,7 +91907,7 @@ var ts;
91871
91907
  var propertyName = ts.isPropertyAccessExpression(originalNode)
91872
91908
  ? ts.declarationNameToString(originalNode.name)
91873
91909
  : ts.getTextOfNode(originalNode.argumentExpression);
91874
- ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + propertyName + " ");
91910
+ ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
91875
91911
  }
91876
91912
  return substitute;
91877
91913
  }
@@ -93263,8 +93299,8 @@ var ts;
93263
93299
  }
93264
93300
  function createHoistedVariableForClass(name, node) {
93265
93301
  var className = getPrivateIdentifierEnvironment().className;
93266
- var prefix = className ? "_" + className : "";
93267
- var identifier = factory.createUniqueName(prefix + "_" + name, 16 /* Optimistic */);
93302
+ var prefix = className ? "_".concat(className) : "";
93303
+ var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
93268
93304
  if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
93269
93305
  addBlockScopedVariable(identifier);
93270
93306
  }
@@ -95162,7 +95198,7 @@ var ts;
95162
95198
  specifierSourceImports = ts.createMap();
95163
95199
  currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
95164
95200
  }
95165
- var generatedName = factory.createUniqueName("_" + name, 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
95201
+ var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
95166
95202
  var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
95167
95203
  generatedName.generatedImportReference = specifier;
95168
95204
  specifierSourceImports.set(name, specifier);
@@ -96301,11 +96337,11 @@ var ts;
96301
96337
  }
96302
96338
  else {
96303
96339
  if (node.kind === 245 /* BreakStatement */) {
96304
- labelMarker = "break-" + label.escapedText;
96340
+ labelMarker = "break-".concat(label.escapedText);
96305
96341
  setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
96306
96342
  }
96307
96343
  else {
96308
- labelMarker = "continue-" + label.escapedText;
96344
+ labelMarker = "continue-".concat(label.escapedText);
96309
96345
  setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
96310
96346
  }
96311
96347
  }
@@ -105114,7 +105150,7 @@ var ts;
105114
105150
  return getTypeAliasDeclarationVisibilityError;
105115
105151
  }
105116
105152
  else {
105117
- return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.SyntaxKind[node.kind]);
105153
+ return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
105118
105154
  }
105119
105155
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
105120
105156
  if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
@@ -105325,7 +105361,7 @@ var ts;
105325
105361
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
105326
105362
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
105327
105363
  default:
105328
- return ts.Debug.fail("Unknown parent for parameter: " + ts.SyntaxKind[node.parent.kind]);
105364
+ return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
105329
105365
  }
105330
105366
  }
105331
105367
  function getTypeParameterConstraintVisibilityError() {
@@ -106083,7 +106119,7 @@ var ts;
106083
106119
  while (ts.length(lateMarkedStatements)) {
106084
106120
  var i = lateMarkedStatements.shift();
106085
106121
  if (!ts.isLateVisibilityPaintedStatement(i)) {
106086
- return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " + (ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
106122
+ return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: ".concat(ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
106087
106123
  }
106088
106124
  var priorNeedsDeclare = needsDeclare;
106089
106125
  needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
@@ -106272,7 +106308,7 @@ var ts;
106272
106308
  return cleanup(input);
106273
106309
  return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
106274
106310
  }
106275
- default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
106311
+ default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
106276
106312
  }
106277
106313
  }
106278
106314
  if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
@@ -106563,7 +106599,7 @@ var ts;
106563
106599
  if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
106564
106600
  // We must add a temporary declaration for the extends clause expression
106565
106601
  var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
106566
- var newId_1 = factory.createUniqueName(oldId + "_base", 16 /* Optimistic */);
106602
+ var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
106567
106603
  getSymbolAccessibilityDiagnostic = function () { return ({
106568
106604
  diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
106569
106605
  errorNode: extendsClause_1,
@@ -106604,7 +106640,7 @@ var ts;
106604
106640
  }
106605
106641
  }
106606
106642
  // Anything left unhandled is an error, so this should be unreachable
106607
- return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.SyntaxKind[input.kind]);
106643
+ return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
106608
106644
  function cleanup(node) {
106609
106645
  if (isEnclosingDeclaration(input)) {
106610
106646
  enclosingDeclaration = previousEnclosingDeclaration;
@@ -107496,13 +107532,13 @@ var ts;
107496
107532
  if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
107497
107533
  return;
107498
107534
  if (js && configFile.options.sourceMap) {
107499
- addOutput(js + ".map");
107535
+ addOutput("".concat(js, ".map"));
107500
107536
  }
107501
107537
  if (ts.getEmitDeclarations(configFile.options)) {
107502
107538
  var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
107503
107539
  addOutput(dts);
107504
107540
  if (configFile.options.declarationMap) {
107505
- addOutput(dts + ".map");
107541
+ addOutput("".concat(dts, ".map"));
107506
107542
  }
107507
107543
  }
107508
107544
  }
@@ -107571,7 +107607,7 @@ var ts;
107571
107607
  function getFirstProjectOutput(configFile, ignoreCase) {
107572
107608
  if (ts.outFile(configFile.options)) {
107573
107609
  var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
107574
- return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output");
107610
+ return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
107575
107611
  }
107576
107612
  var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
107577
107613
  for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
@@ -107590,7 +107626,7 @@ var ts;
107590
107626
  var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
107591
107627
  if (buildInfoPath)
107592
107628
  return buildInfoPath;
107593
- return ts.Debug.fail("project " + configFile.options.configFilePath + " expected to have at least one output");
107629
+ return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
107594
107630
  }
107595
107631
  ts.getFirstProjectOutput = getFirstProjectOutput;
107596
107632
  /*@internal*/
@@ -107816,7 +107852,7 @@ var ts;
107816
107852
  if (sourceMappingURL) {
107817
107853
  if (!writer.isAtStartOfLine())
107818
107854
  writer.rawWrite(newLine);
107819
- writer.writeComment("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Tools can sometimes see this line as a source mapping url comment
107855
+ writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
107820
107856
  }
107821
107857
  // Write the source map
107822
107858
  if (sourceMapFilePath) {
@@ -107865,7 +107901,7 @@ var ts;
107865
107901
  // Encode the sourceMap into the sourceMap url
107866
107902
  var sourceMapText = sourceMapGenerator.toString();
107867
107903
  var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
107868
- return "data:application/json;base64," + base64SourceMapText;
107904
+ return "data:application/json;base64,".concat(base64SourceMapText);
107869
107905
  }
107870
107906
  var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
107871
107907
  if (mapOptions.mapRoot) {
@@ -108045,7 +108081,7 @@ var ts;
108045
108081
  return;
108046
108082
  break;
108047
108083
  default:
108048
- ts.Debug.fail("Unexpected path: " + name);
108084
+ ts.Debug.fail("Unexpected path: ".concat(name));
108049
108085
  }
108050
108086
  outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
108051
108087
  },
@@ -108905,7 +108941,7 @@ var ts;
108905
108941
  return writeTokenNode(node, writeKeyword);
108906
108942
  if (ts.isTokenKind(node.kind))
108907
108943
  return writeTokenNode(node, writePunctuation);
108908
- ts.Debug.fail("Unhandled SyntaxKind: " + ts.Debug.formatSyntaxKind(node.kind) + ".");
108944
+ ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
108909
108945
  }
108910
108946
  function emitMappedTypeParameter(node) {
108911
108947
  emit(node.name);
@@ -109075,13 +109111,13 @@ var ts;
109075
109111
  }
109076
109112
  }
109077
109113
  function emitPlaceholder(hint, node, snippet) {
109078
- nonEscapingWrite("${" + snippet.order + ":"); // `${2:`
109114
+ nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
109079
109115
  pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
109080
109116
  nonEscapingWrite("}"); // `}`
109081
109117
  // `${2:...}`
109082
109118
  }
109083
109119
  function emitTabStop(snippet) {
109084
- nonEscapingWrite("$" + snippet.order);
109120
+ nonEscapingWrite("$".concat(snippet.order));
109085
109121
  }
109086
109122
  //
109087
109123
  // Identifiers
@@ -110803,17 +110839,17 @@ var ts;
110803
110839
  writeLine();
110804
110840
  }
110805
110841
  if (currentSourceFile && currentSourceFile.moduleName) {
110806
- writeComment("/// <amd-module name=\"" + currentSourceFile.moduleName + "\" />");
110842
+ writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
110807
110843
  writeLine();
110808
110844
  }
110809
110845
  if (currentSourceFile && currentSourceFile.amdDependencies) {
110810
110846
  for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
110811
110847
  var dep = _b[_a];
110812
110848
  if (dep.name) {
110813
- writeComment("/// <amd-dependency name=\"" + dep.name + "\" path=\"" + dep.path + "\" />");
110849
+ writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
110814
110850
  }
110815
110851
  else {
110816
- writeComment("/// <amd-dependency path=\"" + dep.path + "\" />");
110852
+ writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
110817
110853
  }
110818
110854
  writeLine();
110819
110855
  }
@@ -110821,7 +110857,7 @@ var ts;
110821
110857
  for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
110822
110858
  var directive = files_2[_c];
110823
110859
  var pos = writer.getTextPos();
110824
- writeComment("/// <reference path=\"" + directive.fileName + "\" />");
110860
+ writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
110825
110861
  if (bundleFileInfo)
110826
110862
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
110827
110863
  writeLine();
@@ -110829,7 +110865,7 @@ var ts;
110829
110865
  for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
110830
110866
  var directive = types_24[_d];
110831
110867
  var pos = writer.getTextPos();
110832
- writeComment("/// <reference types=\"" + directive.fileName + "\" />");
110868
+ writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
110833
110869
  if (bundleFileInfo)
110834
110870
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
110835
110871
  writeLine();
@@ -110837,7 +110873,7 @@ var ts;
110837
110873
  for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
110838
110874
  var directive = libs_1[_e];
110839
110875
  var pos = writer.getTextPos();
110840
- writeComment("/// <reference lib=\"" + directive.fileName + "\" />");
110876
+ writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
110841
110877
  if (bundleFileInfo)
110842
110878
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
110843
110879
  writeLine();
@@ -111612,9 +111648,9 @@ var ts;
111612
111648
  var textSourceNode = node.textSourceNode;
111613
111649
  if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
111614
111650
  var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
111615
- return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(text) + "\"" :
111616
- neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(text) + "\"" :
111617
- "\"" + ts.escapeNonAsciiString(text) + "\"";
111651
+ return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
111652
+ neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
111653
+ "\"".concat(ts.escapeNonAsciiString(text), "\"");
111618
111654
  }
111619
111655
  else {
111620
111656
  return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
@@ -112091,8 +112127,8 @@ var ts;
112091
112127
  }
112092
112128
  function formatSynthesizedComment(comment) {
112093
112129
  return comment.kind === 3 /* MultiLineCommentTrivia */
112094
- ? "/*" + comment.text + "*/"
112095
- : "//" + comment.text;
112130
+ ? "/*".concat(comment.text, "*/")
112131
+ : "//".concat(comment.text);
112096
112132
  }
112097
112133
  function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
112098
112134
  enterComment();
@@ -112600,7 +112636,7 @@ var ts;
112600
112636
  var rootResult = tryReadDirectory(rootDir, rootDirPath);
112601
112637
  var rootSymLinkResult;
112602
112638
  if (rootResult !== undefined) {
112603
- return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath, directoryExists);
112639
+ return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
112604
112640
  }
112605
112641
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
112606
112642
  function getFileSystemEntries(dir) {
@@ -112813,7 +112849,7 @@ var ts;
112813
112849
  var watchedDirPath = _a.watchedDirPath, fileOrDirectory = _a.fileOrDirectory, fileOrDirectoryPath = _a.fileOrDirectoryPath, configFileName = _a.configFileName, options = _a.options, program = _a.program, extraFileExtensions = _a.extraFileExtensions, currentDirectory = _a.currentDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, writeLog = _a.writeLog, toPath = _a.toPath;
112814
112850
  var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
112815
112851
  if (!newPath) {
112816
- writeLog("Project: " + configFileName + " Detected ignored path: " + fileOrDirectory);
112852
+ writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
112817
112853
  return true;
112818
112854
  }
112819
112855
  fileOrDirectoryPath = newPath;
@@ -112822,11 +112858,11 @@ var ts;
112822
112858
  // If the the added or created file or directory is not supported file name, ignore the file
112823
112859
  // But when watched directory is added/removed, we need to reload the file list
112824
112860
  if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
112825
- writeLog("Project: " + configFileName + " Detected file add/remove of non supported extension: " + fileOrDirectory);
112861
+ writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
112826
112862
  return true;
112827
112863
  }
112828
112864
  if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
112829
- writeLog("Project: " + configFileName + " Detected excluded file: " + fileOrDirectory);
112865
+ writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
112830
112866
  return true;
112831
112867
  }
112832
112868
  if (!program)
@@ -112850,7 +112886,7 @@ var ts;
112850
112886
  var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
112851
112887
  if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
112852
112888
  hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
112853
- writeLog("Project: " + configFileName + " Detected output file: " + fileOrDirectory);
112889
+ writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
112854
112890
  return true;
112855
112891
  }
112856
112892
  return false;
@@ -112918,36 +112954,36 @@ var ts;
112918
112954
  host.useCaseSensitiveFileNames();
112919
112955
  }
112920
112956
  function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
112921
- log("ExcludeWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112957
+ log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112922
112958
  return {
112923
- close: function () { return log("ExcludeWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)); }
112959
+ close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
112924
112960
  };
112925
112961
  }
112926
112962
  function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
112927
- log("FileWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112963
+ log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112928
112964
  var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
112929
112965
  return {
112930
112966
  close: function () {
112931
- log("FileWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112967
+ log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112932
112968
  watcher.close();
112933
112969
  }
112934
112970
  };
112935
112971
  }
112936
112972
  function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
112937
- var watchInfo = "DirectoryWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112973
+ var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112938
112974
  log(watchInfo);
112939
112975
  var start = ts.timestamp();
112940
112976
  var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
112941
112977
  var elapsed = ts.timestamp() - start;
112942
- log("Elapsed:: " + elapsed + "ms " + watchInfo);
112978
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
112943
112979
  return {
112944
112980
  close: function () {
112945
- var watchInfo = "DirectoryWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112981
+ var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112946
112982
  log(watchInfo);
112947
112983
  var start = ts.timestamp();
112948
112984
  watcher.close();
112949
112985
  var elapsed = ts.timestamp() - start;
112950
- log("Elapsed:: " + elapsed + "ms " + watchInfo);
112986
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
112951
112987
  }
112952
112988
  };
112953
112989
  }
@@ -112957,16 +112993,16 @@ var ts;
112957
112993
  for (var _i = 0; _i < arguments.length; _i++) {
112958
112994
  args[_i] = arguments[_i];
112959
112995
  }
112960
- var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher") + ":: Triggered with " + args[0] + " " + (args[1] !== undefined ? args[1] : "") + ":: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112996
+ var triggerredInfo = "".concat(key === "watchFile" ? "FileWatcher" : "DirectoryWatcher", ":: Triggered with ").concat(args[0], " ").concat(args[1] !== undefined ? args[1] : "", ":: ").concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112961
112997
  log(triggerredInfo);
112962
112998
  var start = ts.timestamp();
112963
112999
  cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
112964
113000
  var elapsed = ts.timestamp() - start;
112965
- log("Elapsed:: " + elapsed + "ms " + triggerredInfo);
113001
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
112966
113002
  }, flags, options, detailInfo1, detailInfo2); };
112967
113003
  }
112968
113004
  function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
112969
- return "WatchInfo: " + file + " " + flags + " " + JSON.stringify(options) + " " + (getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : detailInfo1 + " " + detailInfo2);
113005
+ return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
112970
113006
  }
112971
113007
  }
112972
113008
  ts.getWatchFactory = getWatchFactory;
@@ -113273,12 +113309,12 @@ var ts;
113273
113309
  }
113274
113310
  ts.formatDiagnostics = formatDiagnostics;
113275
113311
  function formatDiagnostic(diagnostic, host) {
113276
- var errorMessage = ts.diagnosticCategoryName(diagnostic) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine();
113312
+ var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
113277
113313
  if (diagnostic.file) {
113278
113314
  var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
113279
113315
  var fileName = diagnostic.file.fileName;
113280
113316
  var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
113281
- return relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): " + errorMessage;
113317
+ return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
113282
113318
  }
113283
113319
  return errorMessage;
113284
113320
  }
@@ -113366,9 +113402,9 @@ var ts;
113366
113402
  var output = "";
113367
113403
  output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
113368
113404
  output += ":";
113369
- output += color("" + (firstLine + 1), ForegroundColorEscapeSequences.Yellow);
113405
+ output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
113370
113406
  output += ":";
113371
- output += color("" + (firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
113407
+ output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
113372
113408
  return output;
113373
113409
  }
113374
113410
  ts.formatLocation = formatLocation;
@@ -113382,7 +113418,7 @@ var ts;
113382
113418
  output += " - ";
113383
113419
  }
113384
113420
  output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
113385
- output += formatColorAndReset(" TS" + diagnostic.code + ": ", ForegroundColorEscapeSequences.Grey);
113421
+ output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
113386
113422
  output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
113387
113423
  if (diagnostic.file) {
113388
113424
  output += host.getNewLine();
@@ -113491,7 +113527,7 @@ var ts;
113491
113527
  var result = void 0;
113492
113528
  var mode = getModeForResolutionAtIndex(containingFile, i);
113493
113529
  i++;
113494
- var cacheKey = mode !== undefined ? mode + "|" + name : name;
113530
+ var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
113495
113531
  if (cache.has(cacheKey)) {
113496
113532
  result = cache.get(cacheKey);
113497
113533
  }
@@ -115575,7 +115611,7 @@ var ts;
115575
115611
  path += (i === 2 ? "/" : "-") + components[i];
115576
115612
  i++;
115577
115613
  }
115578
- var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_" + libFileName + "__.ts");
115614
+ var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
115579
115615
  var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
115580
115616
  if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
115581
115617
  return localOverrideModuleResult.resolvedModule.resolvedFileName;
@@ -116396,12 +116432,12 @@ var ts;
116396
116432
  }
116397
116433
  function directoryExistsIfProjectReferenceDeclDir(dir) {
116398
116434
  var dirPath = host.toPath(dir);
116399
- var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator;
116435
+ var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
116400
116436
  return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
116401
116437
  // Any parent directory of declaration dir
116402
116438
  ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
116403
116439
  // Any directory inside declaration dir
116404
- ts.startsWith(dirPath, declDirPath + "/"); });
116440
+ ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
116405
116441
  }
116406
116442
  function handleDirectoryCouldBeSymlink(directory) {
116407
116443
  var _a;
@@ -116454,7 +116490,7 @@ var ts;
116454
116490
  if (isFile && result) {
116455
116491
  // Store the real path for the file'
116456
116492
  var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
116457
- symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), ""));
116493
+ symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
116458
116494
  }
116459
116495
  return result;
116460
116496
  }) || false;
@@ -116912,7 +116948,7 @@ var ts;
116912
116948
  /*forceDtsEmit*/ true);
116913
116949
  var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
116914
116950
  if (firstDts_1) {
116915
- ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */]), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
116951
+ ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */]), "File extension for signature expected to be dts", function () { return "Found: ".concat(ts.getAnyExtensionFromPath(firstDts_1.name), " for ").concat(firstDts_1.name, ":: All output files: ").concat(JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; }))); });
116916
116952
  latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
116917
116953
  if (exportedModulesMapCache && latestSignature !== prevSignature) {
116918
116954
  updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
@@ -117420,7 +117456,7 @@ var ts;
117420
117456
  return;
117421
117457
  }
117422
117458
  else {
117423
- ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
117459
+ ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: ".concat(affectedFile.fileName));
117424
117460
  }
117425
117461
  if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
117426
117462
  forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
@@ -118565,7 +118601,7 @@ var ts;
118565
118601
  failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
118566
118602
  var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
118567
118603
  var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
118568
- ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath);
118604
+ ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
118569
118605
  if (failedLookupPathSplit.length > rootSplitLength + 1) {
118570
118606
  // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
118571
118607
  return {
@@ -119547,13 +119583,15 @@ var ts;
119547
119583
  if (host.fileExists(packageJsonPath)) {
119548
119584
  var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
119549
119585
  // TODO: Inject `require` or `import` condition based on the intended import mode
119550
- var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
119551
- if (fromExports) {
119552
- var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
119553
- return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
119554
- }
119555
- if (packageJsonContent.exports) {
119556
- return { moduleFileToTry: path, blockedByExports: true };
119586
+ if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
119587
+ var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
119588
+ if (fromExports) {
119589
+ var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
119590
+ return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
119591
+ }
119592
+ if (packageJsonContent.exports) {
119593
+ return { moduleFileToTry: path, blockedByExports: true };
119594
+ }
119557
119595
  }
119558
119596
  var versionPaths = packageJsonContent.typesVersions
119559
119597
  ? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
@@ -119677,7 +119715,7 @@ var ts;
119677
119715
  }
119678
119716
  function getJSExtensionForFile(fileName, options) {
119679
119717
  var _a;
119680
- return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension " + ts.extensionFromPath(fileName) + " is unsupported:: FileName:: " + fileName);
119718
+ return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
119681
119719
  }
119682
119720
  function tryGetJSExtensionForFile(fileName, options) {
119683
119721
  var ext = ts.tryGetExtensionFromPath(fileName);
@@ -119780,8 +119818,8 @@ var ts;
119780
119818
  return pretty ?
119781
119819
  function (diagnostic, newLine, options) {
119782
119820
  clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
119783
- var output = "[" + ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] ";
119784
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (newLine + newLine);
119821
+ var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
119822
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
119785
119823
  system.write(output);
119786
119824
  } :
119787
119825
  function (diagnostic, newLine, options) {
@@ -119789,8 +119827,8 @@ var ts;
119789
119827
  if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
119790
119828
  output += newLine;
119791
119829
  }
119792
- output += getLocaleTimeString(system) + " - ";
119793
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + getPlainDiagnosticFollowingNewLines(diagnostic, newLine);
119830
+ output += "".concat(getLocaleTimeString(system), " - ");
119831
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
119794
119832
  system.write(output);
119795
119833
  };
119796
119834
  }
@@ -119818,7 +119856,7 @@ var ts;
119818
119856
  if (errorCount === 0)
119819
119857
  return "";
119820
119858
  var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
119821
- return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine;
119859
+ return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
119822
119860
  }
119823
119861
  ts.getErrorSummaryText = getErrorSummaryText;
119824
119862
  function isBuilderProgram(program) {
@@ -119844,9 +119882,9 @@ var ts;
119844
119882
  var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
119845
119883
  for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
119846
119884
  var file = _c[_i];
119847
- write("" + toFileName(file, relativeFileName));
119848
- (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" " + fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText); });
119849
- (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" " + d.messageText); });
119885
+ write("".concat(toFileName(file, relativeFileName)));
119886
+ (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
119887
+ (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
119850
119888
  }
119851
119889
  }
119852
119890
  ts.explainFiles = explainFiles;
@@ -119886,7 +119924,7 @@ var ts;
119886
119924
  if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
119887
119925
  return false;
119888
119926
  var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
119889
- return !!pattern && ts.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(fileName);
119927
+ return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
119890
119928
  });
119891
119929
  }
119892
119930
  ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
@@ -119895,7 +119933,7 @@ var ts;
119895
119933
  var options = program.getCompilerOptions();
119896
119934
  if (ts.isReferencedFile(reason)) {
119897
119935
  var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
119898
- var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"" + referenceLocation.text + "\"";
119936
+ var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
119899
119937
  var message = void 0;
119900
119938
  ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
119901
119939
  switch (reason.kind) {
@@ -120019,7 +120057,7 @@ var ts;
120019
120057
  var currentDir_1 = program.getCurrentDirectory();
120020
120058
  ts.forEach(emittedFiles, function (file) {
120021
120059
  var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
120022
- write("TSFILE: " + filepath);
120060
+ write("TSFILE: ".concat(filepath));
120023
120061
  });
120024
120062
  listFiles(program, write);
120025
120063
  }
@@ -120347,7 +120385,7 @@ var ts;
120347
120385
  }
120348
120386
  var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
120349
120387
  var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
120350
- writeLog("Current directory: " + currentDirectory + " CaseSensitiveFileNames: " + useCaseSensitiveFileNames);
120388
+ writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
120351
120389
  var configFileWatcher;
120352
120390
  if (configFileName) {
120353
120391
  configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
@@ -120496,10 +120534,10 @@ var ts;
120496
120534
  function createNewProgram(hasInvalidatedResolution) {
120497
120535
  // Compile the program
120498
120536
  writeLog("CreatingProgramWith::");
120499
- writeLog(" roots: " + JSON.stringify(rootFileNames));
120500
- writeLog(" options: " + JSON.stringify(compilerOptions));
120537
+ writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
120538
+ writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
120501
120539
  if (projectReferences)
120502
- writeLog(" projectReferences: " + JSON.stringify(projectReferences));
120540
+ writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
120503
120541
  var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
120504
120542
  hasChangedCompilerOptions = false;
120505
120543
  hasChangedConfigFileParsingErrors = false;
@@ -120660,7 +120698,7 @@ var ts;
120660
120698
  return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
120661
120699
  }
120662
120700
  var pending = clearInvalidateResolutionsOfFailedLookupLocations();
120663
- writeLog("Scheduling invalidateFailedLookup" + (pending ? ", Cancelled earlier one" : ""));
120701
+ writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
120664
120702
  timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
120665
120703
  }
120666
120704
  function invalidateResolutionsOfFailedLookup() {
@@ -120720,7 +120758,7 @@ var ts;
120720
120758
  synchronizeProgram();
120721
120759
  }
120722
120760
  function reloadConfigFile() {
120723
- writeLog("Reloading config file: " + configFileName);
120761
+ writeLog("Reloading config file: ".concat(configFileName));
120724
120762
  reloadLevel = ts.ConfigFileProgramReloadLevel.None;
120725
120763
  if (cachedDirectoryStructureHost) {
120726
120764
  cachedDirectoryStructureHost.clearCache();
@@ -120761,7 +120799,7 @@ var ts;
120761
120799
  return config.parsedCommandLine;
120762
120800
  }
120763
120801
  }
120764
- writeLog("Loading config file: " + configFileName);
120802
+ writeLog("Loading config file: ".concat(configFileName));
120765
120803
  var parsedCommandLine = host.getParsedCommandLine ?
120766
120804
  host.getParsedCommandLine(configFileName) :
120767
120805
  getParsedCommandLineFromConfigFileHost(configFileName);
@@ -121065,8 +121103,8 @@ var ts;
121065
121103
  */
121066
121104
  function createBuilderStatusReporter(system, pretty) {
121067
121105
  return function (diagnostic) {
121068
- var output = pretty ? "[" + ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] " : ts.getLocaleTimeString(system) + " - ";
121069
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (system.newLine + system.newLine);
121106
+ var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
121107
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
121070
121108
  system.write(output);
121071
121109
  };
121072
121110
  }
@@ -121841,7 +121879,7 @@ var ts;
121841
121879
  function listEmittedFile(_a, proj, file) {
121842
121880
  var write = _a.write;
121843
121881
  if (write && proj.options.listEmittedFiles) {
121844
- write("TSFILE: " + file);
121882
+ write("TSFILE: ".concat(file));
121845
121883
  }
121846
121884
  }
121847
121885
  function getOldProgram(_a, proj, parsed) {
@@ -121870,7 +121908,7 @@ var ts;
121870
121908
  function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
121871
121909
  var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
121872
121910
  reportAndStoreErrors(state, resolvedPath, diagnostics);
121873
- state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
121911
+ state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
121874
121912
  if (canEmitBuildInfo)
121875
121913
  return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
121876
121914
  afterProgramDone(state, program, config);
@@ -121898,7 +121936,7 @@ var ts;
121898
121936
  if (!host.fileExists(inputFile)) {
121899
121937
  return {
121900
121938
  type: ts.UpToDateStatusType.Unbuildable,
121901
- reason: inputFile + " does not exist"
121939
+ reason: "".concat(inputFile, " does not exist")
121902
121940
  };
121903
121941
  }
121904
121942
  if (!force) {
@@ -122257,7 +122295,7 @@ var ts;
122257
122295
  }
122258
122296
  }
122259
122297
  if (filesToDelete) {
122260
- reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join(""));
122298
+ reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * ".concat(f); }).join(""));
122261
122299
  }
122262
122300
  return ts.ExitStatus.Success;
122263
122301
  }
@@ -122590,7 +122628,7 @@ var ts;
122590
122628
  function nowString() {
122591
122629
  // E.g. "12:34:56.789"
122592
122630
  var d = new Date();
122593
- return ts.padLeft(d.getHours().toString(), 2, "0") + ":" + ts.padLeft(d.getMinutes().toString(), 2, "0") + ":" + ts.padLeft(d.getSeconds().toString(), 2, "0") + "." + ts.padLeft(d.getMilliseconds().toString(), 3, "0");
122631
+ return "".concat(ts.padLeft(d.getHours().toString(), 2, "0"), ":").concat(ts.padLeft(d.getMinutes().toString(), 2, "0"), ":").concat(ts.padLeft(d.getSeconds().toString(), 2, "0"), ".").concat(ts.padLeft(d.getMilliseconds().toString(), 3, "0"));
122594
122632
  }
122595
122633
  server.nowString = nowString;
122596
122634
  })(server = ts.server || (ts.server = {}));
@@ -122601,7 +122639,7 @@ var ts;
122601
122639
  var JsTyping;
122602
122640
  (function (JsTyping) {
122603
122641
  function isTypingUpToDate(cachedTyping, availableTypingVersions) {
122604
- var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts" + ts.versionMajorMinor) || ts.getProperty(availableTypingVersions, "latest"));
122642
+ var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
122605
122643
  return availableVersion.compareTo(cachedTyping.version) <= 0;
122606
122644
  }
122607
122645
  JsTyping.isTypingUpToDate = isTypingUpToDate;
@@ -122654,7 +122692,7 @@ var ts;
122654
122692
  "worker_threads",
122655
122693
  "zlib"
122656
122694
  ];
122657
- JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:" + name; });
122695
+ JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
122658
122696
  JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
122659
122697
  JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
122660
122698
  function nonRelativeModuleNameForTypingCache(moduleName) {
@@ -122733,7 +122771,7 @@ var ts;
122733
122771
  var excludeTypingName = exclude_1[_i];
122734
122772
  var didDelete = inferredTypings.delete(excludeTypingName);
122735
122773
  if (didDelete && log)
122736
- log("Typing for " + excludeTypingName + " is in exclude list, will be ignored.");
122774
+ log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
122737
122775
  }
122738
122776
  var newTypingNames = [];
122739
122777
  var cachedTypingPaths = [];
@@ -122747,7 +122785,7 @@ var ts;
122747
122785
  });
122748
122786
  var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
122749
122787
  if (log)
122750
- log("Result: " + JSON.stringify(result));
122788
+ log("Result: ".concat(JSON.stringify(result)));
122751
122789
  return result;
122752
122790
  function addInferredTyping(typingName) {
122753
122791
  if (!inferredTypings.has(typingName)) {
@@ -122756,7 +122794,7 @@ var ts;
122756
122794
  }
122757
122795
  function addInferredTypings(typingNames, message) {
122758
122796
  if (log)
122759
- log(message + ": " + JSON.stringify(typingNames));
122797
+ log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
122760
122798
  ts.forEach(typingNames, addInferredTyping);
122761
122799
  }
122762
122800
  /**
@@ -122769,7 +122807,7 @@ var ts;
122769
122807
  filesToWatch.push(jsonPath);
122770
122808
  var jsonConfig = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); }).config;
122771
122809
  var jsonTypingNames = ts.flatMap([jsonConfig.dependencies, jsonConfig.devDependencies, jsonConfig.optionalDependencies, jsonConfig.peerDependencies], ts.getOwnKeys);
122772
- addInferredTypings(jsonTypingNames, "Typing names in '" + jsonPath + "' dependencies");
122810
+ addInferredTypings(jsonTypingNames, "Typing names in '".concat(jsonPath, "' dependencies"));
122773
122811
  }
122774
122812
  /**
122775
122813
  * Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
@@ -122808,7 +122846,7 @@ var ts;
122808
122846
  // depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar`
122809
122847
  var fileNames = host.readDirectory(packagesFolderPath, [".json" /* Json */], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
122810
122848
  if (log)
122811
- log("Searching for typing names in " + packagesFolderPath + "; all files: " + JSON.stringify(fileNames));
122849
+ log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(fileNames)));
122812
122850
  var packageNames = [];
122813
122851
  for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
122814
122852
  var fileName = fileNames_1[_i];
@@ -122835,7 +122873,7 @@ var ts;
122835
122873
  if (ownTypes) {
122836
122874
  var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
122837
122875
  if (log)
122838
- log(" Package '" + packageJson.name + "' provides its own types.");
122876
+ log(" Package '".concat(packageJson.name, "' provides its own types."));
122839
122877
  inferredTypings.set(packageJson.name, absolutePath);
122840
122878
  }
122841
122879
  else {
@@ -122907,15 +122945,15 @@ var ts;
122907
122945
  var kind = isScopeName ? "Scope" : "Package";
122908
122946
  switch (result) {
122909
122947
  case 1 /* EmptyName */:
122910
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot be empty";
122948
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
122911
122949
  case 2 /* NameTooLong */:
122912
- return "'" + typing + "':: " + kind + " name '" + name + "' should be less than " + maxPackageNameLength + " characters";
122950
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
122913
122951
  case 3 /* NameStartsWithDot */:
122914
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '.'";
122952
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
122915
122953
  case 4 /* NameStartsWithUnderscore */:
122916
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '_'";
122954
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
122917
122955
  case 5 /* NameContainsNonURISafeCharacters */:
122918
- return "'" + typing + "':: " + kind + " name '" + name + "' contains non URI safe characters";
122956
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
122919
122957
  case 0 /* Ok */:
122920
122958
  return ts.Debug.fail(); // Shouldn't have called this.
122921
122959
  default:
@@ -124511,7 +124549,7 @@ var ts;
124511
124549
  isWhiteSpaceOnlyJsxText(child);
124512
124550
  if (lookInPreviousChild) {
124513
124551
  // actual start of the node is past the position - previous token should be at the end of previous child
124514
- var candidate_1 = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i, sourceFile);
124552
+ var candidate_1 = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i, sourceFile, n.kind);
124515
124553
  return candidate_1 && findRightmostToken(candidate_1, sourceFile);
124516
124554
  }
124517
124555
  else {
@@ -124525,7 +124563,7 @@ var ts;
124525
124563
  // the only known case is when position is at the end of the file.
124526
124564
  // Try to find the rightmost token in the file without filtering.
124527
124565
  // Namely we are skipping the check: 'position < node.end'
124528
- var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile);
124566
+ var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile, n.kind);
124529
124567
  return candidate && findRightmostToken(candidate, sourceFile);
124530
124568
  }
124531
124569
  }
@@ -124541,17 +124579,19 @@ var ts;
124541
124579
  if (children.length === 0) {
124542
124580
  return n;
124543
124581
  }
124544
- var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile);
124582
+ var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile, n.kind);
124545
124583
  return candidate && findRightmostToken(candidate, sourceFile);
124546
124584
  }
124547
124585
  /**
124548
124586
  * Finds the rightmost child to the left of `children[exclusiveStartPosition]` which is a non-all-whitespace token or has constituent tokens.
124549
124587
  */
124550
- function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sourceFile) {
124588
+ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sourceFile, parentKind) {
124551
124589
  for (var i = exclusiveStartPosition - 1; i >= 0; i--) {
124552
124590
  var child = children[i];
124553
124591
  if (isWhiteSpaceOnlyJsxText(child)) {
124554
- ts.Debug.assert(i > 0, "`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");
124592
+ if (i === 0 && (parentKind === 11 /* JsxText */ || parentKind === 278 /* JsxSelfClosingElement */)) {
124593
+ ts.Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");
124594
+ }
124555
124595
  }
124556
124596
  else if (nodeHasTokens(children[i], sourceFile)) {
124557
124597
  return children[i];
@@ -125473,7 +125513,7 @@ var ts;
125473
125513
  var prefix = ts.isJSDocLink(link) ? "link"
125474
125514
  : ts.isJSDocLinkCode(link) ? "linkcode"
125475
125515
  : "linkplain";
125476
- var parts = [linkPart("{@" + prefix + " ")];
125516
+ var parts = [linkPart("{@".concat(prefix, " "))];
125477
125517
  if (!link.name) {
125478
125518
  if (link.text)
125479
125519
  parts.push(linkTextPart(link.text));
@@ -125721,7 +125761,7 @@ var ts;
125721
125761
  function getUniqueName(baseName, sourceFile) {
125722
125762
  var nameText = baseName;
125723
125763
  for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
125724
- nameText = baseName + "_" + i;
125764
+ nameText = "".concat(baseName, "_").concat(i);
125725
125765
  }
125726
125766
  return nameText;
125727
125767
  }
@@ -125831,7 +125871,7 @@ var ts;
125831
125871
  // Editors can pass in undefined or empty string - we want to infer the preference in those cases.
125832
125872
  var quotePreference = getQuotePreference(sourceFile, preferences);
125833
125873
  var quoted = JSON.stringify(text);
125834
- return quotePreference === 0 /* Single */ ? "'" + ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"') + "'" : quoted;
125874
+ return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
125835
125875
  }
125836
125876
  ts.quote = quote;
125837
125877
  function isEqualityOperatorKind(kind) {
@@ -126203,7 +126243,7 @@ var ts;
126203
126243
  var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
126204
126244
  // Scoped packages
126205
126245
  if (ts.startsWith(components[0], "@")) {
126206
- return components[0] + "/" + components[1];
126246
+ return "".concat(components[0], "/").concat(components[1]);
126207
126247
  }
126208
126248
  return components[0];
126209
126249
  }
@@ -126310,13 +126350,13 @@ var ts;
126310
126350
  ts.getNameForExportedSymbol = getNameForExportedSymbol;
126311
126351
  function getSymbolParentOrFail(symbol) {
126312
126352
  var _a;
126313
- return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: " + ts.Debug.formatSymbolFlags(symbol.flags) + ". " +
126314
- ("Declarations: " + ((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
126353
+ return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
126354
+ "Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
126315
126355
  var kind = ts.Debug.formatSyntaxKind(d.kind);
126316
126356
  var inJS = ts.isInJSFile(d);
126317
126357
  var expression = d.expression;
126318
- return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: " + ts.Debug.formatSyntaxKind(expression.kind) + ")" : "");
126319
- }).join(", ")) + "."));
126358
+ return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
126359
+ }).join(", "), "."));
126320
126360
  }
126321
126361
  /**
126322
126362
  * Useful to check whether a string contains another string at a specific index
@@ -126524,7 +126564,7 @@ var ts;
126524
126564
  : checker.tryFindAmbientModule(info.moduleName));
126525
126565
  var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
126526
126566
  ? checker.resolveExternalModuleSymbol(moduleSymbol)
126527
- : checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '" + info.symbolName + "' by key '" + info.symbolTableKey + "' in module " + moduleSymbol.name);
126567
+ : checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '".concat(info.symbolName, "' by key '").concat(info.symbolTableKey, "' in module ").concat(moduleSymbol.name));
126528
126568
  symbols.set(id, [symbol, moduleSymbol]);
126529
126569
  return {
126530
126570
  symbol: symbol,
@@ -126537,7 +126577,7 @@ var ts;
126537
126577
  }
126538
126578
  function key(importedName, symbol, ambientModuleName, checker) {
126539
126579
  var moduleKey = ambientModuleName || "";
126540
- return importedName + "|" + ts.getSymbolId(ts.skipAlias(symbol, checker)) + "|" + moduleKey;
126580
+ return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
126541
126581
  }
126542
126582
  function parseKey(key) {
126543
126583
  var symbolName = key.substring(0, key.indexOf("|"));
@@ -126617,7 +126657,7 @@ var ts;
126617
126657
  if (autoImportProvider) {
126618
126658
  var start = ts.timestamp();
126619
126659
  forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), function (module, file) { return cb(module, file, autoImportProvider, /*isFromPackageJson*/ true); });
126620
- (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: " + (ts.timestamp() - start));
126660
+ (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
126621
126661
  }
126622
126662
  }
126623
126663
  ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
@@ -126671,7 +126711,7 @@ var ts;
126671
126711
  }
126672
126712
  });
126673
126713
  });
126674
- (_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in " + (ts.timestamp() - start) + " ms");
126714
+ (_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
126675
126715
  return cache;
126676
126716
  }
126677
126717
  ts.getExportInfoMap = getExportInfoMap;
@@ -127204,7 +127244,7 @@ var ts;
127204
127244
  return { spans: spans, endOfLineState: 0 /* None */ };
127205
127245
  function pushClassification(start, end, type) {
127206
127246
  var length = end - start;
127207
- ts.Debug.assert(length > 0, "Classification had non-positive length of " + length);
127247
+ ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
127208
127248
  spans.push(start);
127209
127249
  spans.push(length);
127210
127250
  spans.push(type);
@@ -128072,7 +128112,7 @@ var ts;
128072
128112
  case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
128073
128113
  case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
128074
128114
  case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
128075
- case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension " + ".tsbuildinfo" /* TsBuildInfo */ + " is unsupported.");
128115
+ case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
128076
128116
  case undefined: return "" /* none */;
128077
128117
  default:
128078
128118
  return ts.Debug.assertNever(extension);
@@ -128801,10 +128841,10 @@ var ts;
128801
128841
  var resolvedFromCacheCount = 0;
128802
128842
  var cacheAttemptCount = 0;
128803
128843
  var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
128804
- var hitRateMessage = cacheAttemptCount ? " (" + (resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1) + "% hit rate)" : "";
128805
- (_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix + ": resolved " + resolvedCount + " module specifiers, plus " + ambientCount + " ambient and " + resolvedFromCacheCount + " from cache" + hitRateMessage);
128806
- (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix + ": response is " + (resolutionLimitExceeded ? "incomplete" : "complete"));
128807
- (_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix + ": " + (ts.timestamp() - start));
128844
+ var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
128845
+ (_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, "".concat(logPrefix, ": resolved ").concat(resolvedCount, " module specifiers, plus ").concat(ambientCount, " ambient and ").concat(resolvedFromCacheCount, " from cache").concat(hitRateMessage));
128846
+ (_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
128847
+ (_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
128808
128848
  return result;
128809
128849
  function tryResolve(exportInfo, isFromAmbientModule) {
128810
128850
  if (isFromAmbientModule) {
@@ -128968,7 +129008,7 @@ var ts;
128968
129008
  return (location === null || location === void 0 ? void 0 : location.kind) === 79 /* Identifier */ ? ts.createTextSpanFromNode(location) : undefined;
128969
129009
  }
128970
129010
  function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences) {
128971
- var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
129011
+ var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, isRightOfOpenTag = completionData.isRightOfOpenTag, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
128972
129012
  // Verify if the file is JSX language variant
128973
129013
  if (ts.getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {
128974
129014
  var completionInfo = getJsxClosingTagCompletion(location, sourceFile);
@@ -128979,7 +129019,7 @@ var ts;
128979
129019
  var entries = [];
128980
129020
  if (isUncheckedFile(sourceFile, compilerOptions)) {
128981
129021
  var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
128982
- /*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
129022
+ /*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
128983
129023
  getJSCompletionEntries(sourceFile, location.pos, uniqueNames, ts.getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
128984
129024
  }
128985
129025
  else {
@@ -128987,7 +129027,7 @@ var ts;
128987
129027
  return undefined;
128988
129028
  }
128989
129029
  getCompletionEntriesFromSymbols(symbols, entries,
128990
- /*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
129030
+ /*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
128991
129031
  }
128992
129032
  if (keywordFilters !== 0 /* None */) {
128993
129033
  var entryNames = new ts.Set(entries.map(function (e) { return e.name; }));
@@ -129093,7 +129133,7 @@ var ts;
129093
129133
  function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
129094
129134
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
129095
129135
  }
129096
- function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind) {
129136
+ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, isJsxIdentifierExpected, isRightOfOpenTag) {
129097
129137
  var _a, _b;
129098
129138
  var insertText;
129099
129139
  var replacementSpan = ts.getReplacementSpanForContextToken(replacementToken);
@@ -129107,15 +129147,15 @@ var ts;
129107
129147
  var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
129108
129148
  if (origin && originIsThisType(origin)) {
129109
129149
  insertText = needsConvertPropertyAccess
129110
- ? "this" + (insertQuestionDot ? "?." : "") + "[" + quotePropertyName(sourceFile, preferences, name) + "]"
129111
- : "this" + (insertQuestionDot ? "?." : ".") + name;
129150
+ ? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
129151
+ : "this".concat(insertQuestionDot ? "?." : ".").concat(name);
129112
129152
  }
129113
129153
  // We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
129114
129154
  // Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro.
129115
129155
  else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
129116
- insertText = useBraces ? needsConvertPropertyAccess ? "[" + quotePropertyName(sourceFile, preferences, name) + "]" : "[" + name + "]" : name;
129156
+ insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
129117
129157
  if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
129118
- insertText = "?." + insertText;
129158
+ insertText = "?.".concat(insertText);
129119
129159
  }
129120
129160
  var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
129121
129161
  ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
@@ -129129,7 +129169,7 @@ var ts;
129129
129169
  if (isJsxInitializer) {
129130
129170
  if (insertText === undefined)
129131
129171
  insertText = name;
129132
- insertText = "{" + insertText + "}";
129172
+ insertText = "{".concat(insertText, "}");
129133
129173
  if (typeof isJsxInitializer !== "boolean") {
129134
129174
  replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
129135
129175
  }
@@ -129142,8 +129182,8 @@ var ts;
129142
129182
  if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
129143
129183
  awaitText = ";";
129144
129184
  }
129145
- awaitText += "(await " + propertyAccessToConvert.expression.getText() + ")";
129146
- insertText = needsConvertPropertyAccess ? "" + awaitText + insertText : "" + awaitText + (insertQuestionDot ? "?." : ".") + insertText;
129185
+ awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
129186
+ insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
129147
129187
  replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
129148
129188
  }
129149
129189
  if (originIsResolvedExport(origin)) {
@@ -129164,8 +129204,7 @@ var ts;
129164
129204
  source = CompletionSource.ClassMemberSnippet;
129165
129205
  }
129166
129206
  }
129167
- var kind = ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location);
129168
- if (kind === "JSX attribute" /* jsxAttribute */ && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
129207
+ if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
129169
129208
  var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
129170
129209
  var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
129171
129210
  // If is boolean like or undefined, don't return a snippet we want just to return the completion.
@@ -129174,7 +129213,7 @@ var ts;
129174
129213
  && !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
129175
129214
  if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
129176
129215
  // If is string like or undefined use quotes
129177
- insertText = ts.escapeSnippetText(name) + "=" + ts.quote(sourceFile, preferences, "$1");
129216
+ insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
129178
129217
  isSnippet = true;
129179
129218
  }
129180
129219
  else {
@@ -129183,12 +129222,9 @@ var ts;
129183
129222
  }
129184
129223
  }
129185
129224
  if (useBraces_1) {
129186
- insertText = ts.escapeSnippetText(name) + "={$1}";
129225
+ insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
129187
129226
  isSnippet = true;
129188
129227
  }
129189
- if (isSnippet) {
129190
- replacementSpan = ts.createTextSpanFromNode(location, sourceFile);
129191
- }
129192
129228
  }
129193
129229
  if (insertText !== undefined && !preferences.includeCompletionsWithInsertText) {
129194
129230
  return undefined;
@@ -129206,7 +129242,7 @@ var ts;
129206
129242
  // entries (like JavaScript identifier entries).
129207
129243
  return {
129208
129244
  name: name,
129209
- kind: kind,
129245
+ kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
129210
129246
  kindModifiers: ts.SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
129211
129247
  sortText: sortText,
129212
129248
  source: source,
@@ -129273,7 +129309,7 @@ var ts;
129273
129309
  removeComments: true,
129274
129310
  module: options.module,
129275
129311
  target: options.target,
129276
- omitTrailingSemicolon: true,
129312
+ omitTrailingSemicolon: false,
129277
129313
  newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
129278
129314
  });
129279
129315
  var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
@@ -129329,9 +129365,9 @@ var ts;
129329
129365
  }
129330
129366
  node = ts.factory.updateModifiers(node, modifiers & (~presentModifiers));
129331
129367
  completionNodes.push(node);
129332
- }, body, isAbstract);
129368
+ }, body, 2 /* Property */, isAbstract);
129333
129369
  if (completionNodes.length) {
129334
- insertText = printer.printSnippetList(1 /* MultiLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
129370
+ insertText = printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
129335
129371
  }
129336
129372
  return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder };
129337
129373
  }
@@ -129450,14 +129486,14 @@ var ts;
129450
129486
  var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
129451
129487
  var isTopLevelTypeOnly = ((_b = (_a = ts.tryCast(importCompletionNode, ts.isImportDeclaration)) === null || _a === void 0 ? void 0 : _a.importClause) === null || _b === void 0 ? void 0 : _b.isTypeOnly) || ((_c = ts.tryCast(importCompletionNode, ts.isImportEqualsDeclaration)) === null || _c === void 0 ? void 0 : _c.isTypeOnly);
129452
129488
  var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
129453
- var topLevelTypeOnlyText = isTopLevelTypeOnly ? " " + ts.tokenToString(151 /* TypeKeyword */) + " " : " ";
129454
- var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */) + " " : "";
129489
+ var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
129490
+ var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
129455
129491
  var suffix = useSemicolons ? ";" : "";
129456
129492
  switch (importKind) {
129457
- case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import" + topLevelTypeOnlyText + ts.escapeSnippetText(name) + tabStop + " = require(" + quotedModuleSpecifier + ")" + suffix };
129458
- case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import" + topLevelTypeOnlyText + ts.escapeSnippetText(name) + tabStop + " from " + quotedModuleSpecifier + suffix };
129459
- case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import" + topLevelTypeOnlyText + "* as " + ts.escapeSnippetText(name) + " from " + quotedModuleSpecifier + suffix };
129460
- case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import" + topLevelTypeOnlyText + "{ " + importSpecifierTypeOnlyText + ts.escapeSnippetText(name) + tabStop + " } from " + quotedModuleSpecifier + suffix };
129493
+ case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
129494
+ case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
129495
+ case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
129496
+ case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
129461
129497
  }
129462
129498
  }
129463
129499
  function quotePropertyName(sourceFile, preferences, name) {
@@ -129481,7 +129517,7 @@ var ts;
129481
129517
  return CompletionSource.ThisProperty;
129482
129518
  }
129483
129519
  }
129484
- function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap) {
129520
+ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag) {
129485
129521
  var _a;
129486
129522
  var start = ts.timestamp();
129487
129523
  var variableDeclaration = getVariableDeclaration(location);
@@ -129502,7 +129538,7 @@ var ts;
129502
129538
  var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
129503
129539
  var sortTextId = (_a = symbolToSortTextIdMap === null || symbolToSortTextIdMap === void 0 ? void 0 : symbolToSortTextIdMap[ts.getSymbolId(symbol)]) !== null && _a !== void 0 ? _a : 11 /* LocationPriority */;
129504
129540
  var sortText = (isDeprecated(symbol, typeChecker) ? 8 /* DeprecatedOffset */ + sortTextId : sortTextId).toString();
129505
- var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind);
129541
+ var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, isJsxIdentifierExpected, isRightOfOpenTag);
129506
129542
  if (!entry) {
129507
129543
  continue;
129508
129544
  }
@@ -130096,6 +130132,7 @@ var ts;
130096
130132
  symbolToSortTextIdMap: symbolToSortTextIdMap,
130097
130133
  isTypeOnlyLocation: isTypeOnlyLocation,
130098
130134
  isJsxIdentifierExpected: isJsxIdentifierExpected,
130135
+ isRightOfOpenTag: isRightOfOpenTag,
130099
130136
  importCompletionNode: importCompletionNode,
130100
130137
  hasUnresolvedAutoImports: hasUnresolvedAutoImports,
130101
130138
  };
@@ -132356,7 +132393,7 @@ var ts;
132356
132393
  }
132357
132394
  function getDocumentRegistryEntry(bucketEntry, scriptKind) {
132358
132395
  var entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(ts.Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided"));
132359
- ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:" + scriptKind + " and sourceFile.scriptKind: " + (entry === null || entry === void 0 ? void 0 : entry.sourceFile.scriptKind) + ", !entry: " + !entry);
132396
+ ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:".concat(scriptKind, " and sourceFile.scriptKind: ").concat(entry === null || entry === void 0 ? void 0 : entry.sourceFile.scriptKind, ", !entry: ").concat(!entry));
132360
132397
  return entry;
132361
132398
  }
132362
132399
  function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
@@ -133027,7 +133064,7 @@ var ts;
133027
133064
  ts.Debug.assert(parent.name === node);
133028
133065
  return true;
133029
133066
  case 202 /* BindingElement */:
133030
- return ts.isInJSFile(node) && ts.isRequireVariableDeclaration(parent);
133067
+ return ts.isInJSFile(node) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(parent);
133031
133068
  default:
133032
133069
  return false;
133033
133070
  }
@@ -133368,7 +133405,7 @@ var ts;
133368
133405
  sourceFile: def.file,
133369
133406
  name: def.reference.fileName,
133370
133407
  kind: "string" /* string */,
133371
- displayParts: [ts.displayPart("\"" + def.reference.fileName + "\"", ts.SymbolDisplayPartKind.stringLiteral)]
133408
+ displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
133372
133409
  };
133373
133410
  }
133374
133411
  default:
@@ -133948,7 +133985,7 @@ var ts;
133948
133985
  if (symbol.flags & 33554432 /* Transient */)
133949
133986
  return undefined;
133950
133987
  // Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
133951
- ts.Debug.fail("Unexpected symbol at " + ts.Debug.formatSyntaxKind(node.kind) + ": " + ts.Debug.formatSymbol(symbol));
133988
+ ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
133952
133989
  }
133953
133990
  return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
133954
133991
  ? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
@@ -134427,7 +134464,7 @@ var ts;
134427
134464
  // Use the parent symbol if the location is commonjs require syntax on javascript files only.
134428
134465
  if (ts.isInJSFile(referenceLocation)
134429
134466
  && referenceLocation.parent.kind === 202 /* BindingElement */
134430
- && ts.isRequireVariableDeclaration(referenceLocation.parent)) {
134467
+ && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent)) {
134431
134468
  referenceSymbol = referenceLocation.parent.symbol;
134432
134469
  // The parent will not have a symbol if it's an ObjectBindingPattern (when destructuring is used). In
134433
134470
  // this case, just skip it, since the bound identifiers are not an alias of the import.
@@ -135232,8 +135269,8 @@ var ts;
135232
135269
  var end = pos + 6; /* "static".length */
135233
135270
  var typeChecker = program.getTypeChecker();
135234
135271
  var symbol = typeChecker.getSymbolAtLocation(node.parent);
135235
- var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent) + " " : "";
135236
- return { text: prefix + "static {}", pos: pos, end: end };
135272
+ var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
135273
+ return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
135237
135274
  }
135238
135275
  var declName = isConstNamedExpression(node) ? node.parent.name :
135239
135276
  ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
@@ -136134,7 +136171,7 @@ var ts;
136134
136171
  return declaration.parent.kind === 268 /* NamedImports */;
136135
136172
  case 202 /* BindingElement */:
136136
136173
  case 253 /* VariableDeclaration */:
136137
- return ts.isInJSFile(declaration) && ts.isRequireVariableDeclaration(declaration);
136174
+ return ts.isInJSFile(declaration) && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(declaration);
136138
136175
  default:
136139
136176
  return false;
136140
136177
  }
@@ -136494,7 +136531,7 @@ var ts;
136494
136531
  function getJSDocTagCompletions() {
136495
136532
  return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
136496
136533
  return {
136497
- name: "@" + tagName,
136534
+ name: "@".concat(tagName),
136498
136535
  kind: "keyword" /* keyword */,
136499
136536
  kindModifiers: "",
136500
136537
  sortText: ts.Completions.SortText.LocationPriority
@@ -136626,11 +136663,11 @@ var ts;
136626
136663
  var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
136627
136664
  var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
136628
136665
  var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
136629
- return indentationStr + " * @param " + type + paramName + newLine;
136666
+ return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
136630
136667
  }).join("");
136631
136668
  }
136632
136669
  function returnsDocComment(indentationStr, newLine) {
136633
- return indentationStr + " * @returns" + newLine;
136670
+ return "".concat(indentationStr, " * @returns").concat(newLine);
136634
136671
  }
136635
136672
  function getCommentOwnerInfo(tokenAtPos, options) {
136636
136673
  return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
@@ -137417,6 +137454,9 @@ var ts;
137417
137454
  // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes.
137418
137455
  // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'!
137419
137456
  function areSameModule(a, b) {
137457
+ if (!a.body || !b.body) {
137458
+ return a.body === b.body;
137459
+ }
137420
137460
  return a.body.kind === b.body.kind && (a.body.kind !== 260 /* ModuleDeclaration */ || areSameModule(a.body, b.body));
137421
137461
  }
137422
137462
  /** Merge source into target. Source should be thrown away after this is called. */
@@ -137470,7 +137510,7 @@ var ts;
137470
137510
  }
137471
137511
  if (name) {
137472
137512
  var text = ts.isIdentifier(name) ? name.text
137473
- : ts.isElementAccessExpression(name) ? "[" + nodeText(name.argumentExpression) + "]"
137513
+ : ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
137474
137514
  : nodeText(name);
137475
137515
  if (text.length > 0) {
137476
137516
  return cleanText(text);
@@ -137480,7 +137520,7 @@ var ts;
137480
137520
  case 303 /* SourceFile */:
137481
137521
  var sourceFile = node;
137482
137522
  return ts.isExternalModule(sourceFile)
137483
- ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\""
137523
+ ? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
137484
137524
  : "<global>";
137485
137525
  case 270 /* ExportAssignment */:
137486
137526
  return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
@@ -137676,10 +137716,10 @@ var ts;
137676
137716
  if (name !== undefined) {
137677
137717
  name = cleanText(name);
137678
137718
  if (name.length > maxLength) {
137679
- return name + " callback";
137719
+ return "".concat(name, " callback");
137680
137720
  }
137681
137721
  var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
137682
- return name + "(" + args + ") callback";
137722
+ return "".concat(name, "(").concat(args, ") callback");
137683
137723
  }
137684
137724
  }
137685
137725
  return "<function>";
@@ -137692,7 +137732,7 @@ var ts;
137692
137732
  else if (ts.isPropertyAccessExpression(expr)) {
137693
137733
  var left = getCalledExpressionName(expr.expression);
137694
137734
  var right = expr.name.text;
137695
- return left === undefined ? right : left + "." + right;
137735
+ return left === undefined ? right : "".concat(left, ".").concat(right);
137696
137736
  }
137697
137737
  else {
137698
137738
  return undefined;
@@ -140124,7 +140164,7 @@ var ts;
140124
140164
  var _loop_9 = function (n) {
140125
140165
  // If the node is not a subspan of its parent, this is a big problem.
140126
140166
  // There have been crashes that might be caused by this violation.
140127
- ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: " + ts.Debug.formatSyntaxKind(n.kind) + ", parent: " + ts.Debug.formatSyntaxKind(n.parent.kind); });
140167
+ ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: ".concat(ts.Debug.formatSyntaxKind(n.kind), ", parent: ").concat(ts.Debug.formatSyntaxKind(n.parent.kind)); });
140128
140168
  var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
140129
140169
  if (argumentInfo) {
140130
140170
  return { value: argumentInfo };
@@ -140296,7 +140336,7 @@ var ts;
140296
140336
  (function (InlayHints) {
140297
140337
  var maxHintsLength = 30;
140298
140338
  var leadingParameterNameCommentRegexFactory = function (name) {
140299
- return new RegExp("^\\s?/\\*\\*?\\s?" + name + "\\s?\\*\\/\\s?$");
140339
+ return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
140300
140340
  };
140301
140341
  function shouldShowParameterNameHints(preferences) {
140302
140342
  return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
@@ -140360,7 +140400,7 @@ var ts;
140360
140400
  }
140361
140401
  function addParameterHints(text, position, isFirstVariadicArgument) {
140362
140402
  result.push({
140363
- text: "" + (isFirstVariadicArgument ? "..." : "") + truncation(text, maxHintsLength) + ":",
140403
+ text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
140364
140404
  position: position,
140365
140405
  kind: "Parameter" /* Parameter */,
140366
140406
  whitespaceAfter: true,
@@ -140368,7 +140408,7 @@ var ts;
140368
140408
  }
140369
140409
  function addTypeHints(text, position) {
140370
140410
  result.push({
140371
- text: ": " + truncation(text, maxHintsLength),
140411
+ text: ": ".concat(truncation(text, maxHintsLength)),
140372
140412
  position: position,
140373
140413
  kind: "Type" /* Type */,
140374
140414
  whitespaceBefore: true,
@@ -140376,7 +140416,7 @@ var ts;
140376
140416
  }
140377
140417
  function addEnumMemberValueHints(text, position) {
140378
140418
  result.push({
140379
- text: "= " + truncation(text, maxHintsLength),
140419
+ text: "= ".concat(truncation(text, maxHintsLength)),
140380
140420
  position: position,
140381
140421
  kind: "Enum" /* Enum */,
140382
140422
  whitespaceBefore: true,
@@ -140911,7 +140951,7 @@ var ts;
140911
140951
  }
140912
140952
  }
140913
140953
  function getKeyFromNode(exp) {
140914
- return exp.pos.toString() + ":" + exp.end.toString();
140954
+ return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
140915
140955
  }
140916
140956
  function canBeConvertedToClass(node, checker) {
140917
140957
  var _a, _b, _c, _d;
@@ -145029,7 +145069,7 @@ var ts;
145029
145069
  var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
145030
145070
  var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
145031
145071
  var indent = sourceFile.text.slice(lineStartPosition, startPosition);
145032
- var text = (insertAtLineStart ? "" : this.newLineCharacter) + "//" + commentText + this.newLineCharacter + indent;
145072
+ var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
145033
145073
  this.insertText(sourceFile, token.getStart(sourceFile), text);
145034
145074
  };
145035
145075
  ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
@@ -145229,7 +145269,7 @@ var ts;
145229
145269
  };
145230
145270
  ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
145231
145271
  var options = this.getInsertNodeAfterOptionsWorker(after);
145232
- return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n" + options.prefix : "\n") : options.prefix });
145272
+ return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
145233
145273
  };
145234
145274
  ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
145235
145275
  switch (node.kind) {
@@ -145263,7 +145303,7 @@ var ts;
145263
145303
  }
145264
145304
  else {
145265
145305
  // `x => {}` -> `function f(x) {}`
145266
- this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function " + name + "(");
145306
+ this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
145267
145307
  // Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
145268
145308
  this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
145269
145309
  }
@@ -145320,7 +145360,7 @@ var ts;
145320
145360
  var nextNode = containingList[index + 1];
145321
145361
  var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
145322
145362
  // write separator and leading trivia of the next element as suffix
145323
- var suffix = "" + ts.tokenToString(nextToken.kind) + sourceFile.text.substring(nextToken.end, startPos);
145363
+ var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
145324
145364
  this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
145325
145365
  }
145326
145366
  }
@@ -145365,7 +145405,7 @@ var ts;
145365
145405
  this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
145366
145406
  }
145367
145407
  else {
145368
- this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator) + " " });
145408
+ this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
145369
145409
  }
145370
145410
  }
145371
145411
  };
@@ -145467,7 +145507,7 @@ var ts;
145467
145507
  var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
145468
145508
  var _loop_12 = function (i) {
145469
145509
  ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
145470
- return JSON.stringify(normalized[i].range) + " and " + JSON.stringify(normalized[i + 1].range);
145510
+ return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
145471
145511
  });
145472
145512
  };
145473
145513
  // verify that change intervals do not overlap, except possibly at end points.
@@ -145564,7 +145604,7 @@ var ts;
145564
145604
  function applyChanges(text, changes) {
145565
145605
  for (var i = changes.length - 1; i >= 0; i--) {
145566
145606
  var _a = changes[i], span = _a.span, newText = _a.newText;
145567
- text = "" + text.substring(0, span.start) + newText + text.substring(ts.textSpanEnd(span));
145607
+ text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
145568
145608
  }
145569
145609
  return text;
145570
145610
  }
@@ -146695,9 +146735,6 @@ var ts;
146695
146735
  });
146696
146736
  function makeChange(changeTracker, sourceFile, pos) {
146697
146737
  var token = ts.getTokenAtPosition(sourceFile, pos);
146698
- if (!ts.isIdentifier(token)) {
146699
- return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.Debug.formatSyntaxKind(token.kind));
146700
- }
146701
146738
  var param = token.parent;
146702
146739
  if (!ts.isParameter(param)) {
146703
146740
  return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.Debug.formatSyntaxKind(token.kind));
@@ -146705,9 +146742,10 @@ var ts;
146705
146742
  var i = param.parent.parameters.indexOf(param);
146706
146743
  ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
146707
146744
  ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
146745
+ var typeNode = ts.factory.createTypeReferenceNode(param.name, /*typeArguments*/ undefined);
146708
146746
  var replacement = ts.factory.createParameterDeclaration(
146709
- /*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.factory.createTypeReferenceNode(token, /*typeArguments*/ undefined), param.initializer);
146710
- changeTracker.replaceNode(sourceFile, token, replacement);
146747
+ /*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, param.dotDotDotToken ? ts.factory.createArrayTypeNode(typeNode) : typeNode, param.initializer);
146748
+ changeTracker.replaceNode(sourceFile, param, replacement);
146711
146749
  }
146712
146750
  })(codefix = ts.codefix || (ts.codefix = {}));
146713
146751
  })(ts || (ts = {}));
@@ -148038,7 +148076,7 @@ var ts;
148038
148076
  if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
148039
148077
  || checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
148040
148078
  // Unconditionally add an underscore in case `text` is a keyword.
148041
- res.set(text, makeUniqueName("_" + text, identifiers));
148079
+ res.set(text, makeUniqueName("_".concat(text), identifiers));
148042
148080
  }
148043
148081
  });
148044
148082
  return res;
@@ -148138,7 +148176,7 @@ var ts;
148138
148176
  // `const a = require("b").c` --> `import { c as a } from "./b";
148139
148177
  return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
148140
148178
  default:
148141
- return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form " + name.kind);
148179
+ return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
148142
148180
  }
148143
148181
  }
148144
148182
  function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
@@ -148189,7 +148227,7 @@ var ts;
148189
148227
  case 168 /* MethodDeclaration */:
148190
148228
  return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
148191
148229
  default:
148192
- ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind " + prop.kind);
148230
+ ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
148193
148231
  }
148194
148232
  });
148195
148233
  return statements && [statements, false];
@@ -148323,7 +148361,7 @@ var ts;
148323
148361
  case 79 /* Identifier */:
148324
148362
  return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
148325
148363
  default:
148326
- return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind " + name.kind);
148364
+ return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
148327
148365
  }
148328
148366
  }
148329
148367
  /**
@@ -148380,7 +148418,7 @@ var ts;
148380
148418
  // Identifiers helpers
148381
148419
  function makeUniqueName(name, identifiers) {
148382
148420
  while (identifiers.original.has(name) || identifiers.additional.has(name)) {
148383
- name = "_" + name;
148421
+ name = "_".concat(name);
148384
148422
  }
148385
148423
  identifiers.additional.add(name);
148386
148424
  return name;
@@ -148460,7 +148498,7 @@ var ts;
148460
148498
  if (!qualifiedName)
148461
148499
  return undefined;
148462
148500
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
148463
- var newText = qualifiedName.left.text + "[\"" + qualifiedName.right.text + "\"]";
148501
+ var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
148464
148502
  return [codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, ts.Diagnostics.Rewrite_all_as_indexed_access_types)];
148465
148503
  },
148466
148504
  fixIds: [fixId],
@@ -148857,7 +148895,7 @@ var ts;
148857
148895
  break;
148858
148896
  }
148859
148897
  default:
148860
- ts.Debug.assertNever(fix, "fix wasn't never - got kind " + fix.kind);
148898
+ ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
148861
148899
  }
148862
148900
  function reduceAddAsTypeOnlyValues(prevValue, newValue) {
148863
148901
  // `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
@@ -148901,7 +148939,7 @@ var ts;
148901
148939
  return newEntry;
148902
148940
  }
148903
148941
  function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
148904
- return (topLevelTypeOnly ? 1 : 0) + "|" + moduleSpecifier;
148942
+ return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
148905
148943
  }
148906
148944
  }
148907
148945
  function writeFixes(changeTracker) {
@@ -149168,7 +149206,7 @@ var ts;
149168
149206
  var importKind = getImportKind(importingFile, exportKind, compilerOptions);
149169
149207
  return ts.mapDefined(importingFile.imports, function (moduleSpecifier) {
149170
149208
  var i = ts.importFromModuleSpecifier(moduleSpecifier);
149171
- if (ts.isRequireVariableDeclaration(i.parent)) {
149209
+ if (ts.isVariableDeclarationInitializedToRequire(i.parent)) {
149172
149210
  return checker.resolveExternalModuleName(moduleSpecifier) === moduleSymbol ? { declaration: i.parent, importKind: importKind, symbol: symbol, targetFlags: targetFlags } : undefined;
149173
149211
  }
149174
149212
  if (i.kind === 265 /* ImportDeclaration */ || i.kind === 264 /* ImportEqualsDeclaration */) {
@@ -149354,7 +149392,7 @@ var ts;
149354
149392
  case ts.ModuleKind.NodeNext:
149355
149393
  return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
149356
149394
  default:
149357
- return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind " + moduleKind);
149395
+ return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
149358
149396
  }
149359
149397
  }
149360
149398
  function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
@@ -149461,7 +149499,7 @@ var ts;
149461
149499
  switch (fix.kind) {
149462
149500
  case 0 /* UseNamespace */:
149463
149501
  addNamespaceQualifier(changes, sourceFile, fix);
149464
- return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix + "." + symbolName];
149502
+ return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
149465
149503
  case 1 /* JsdocTypeImport */:
149466
149504
  addImportType(changes, sourceFile, fix, quotePreference);
149467
149505
  return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
@@ -149485,7 +149523,7 @@ var ts;
149485
149523
  return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
149486
149524
  }
149487
149525
  default:
149488
- return ts.Debug.assertNever(fix, "Unexpected fix kind " + fix.kind);
149526
+ return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
149489
149527
  }
149490
149528
  }
149491
149529
  function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) {
@@ -149581,7 +149619,7 @@ var ts;
149581
149619
  }
149582
149620
  function getImportTypePrefix(moduleSpecifier, quotePreference) {
149583
149621
  var quote = ts.getQuoteFromPreference(quotePreference);
149584
- return "import(" + quote + moduleSpecifier + quote + ").";
149622
+ return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
149585
149623
  }
149586
149624
  function needsTypeOnly(_a) {
149587
149625
  var addAsTypeOnly = _a.addAsTypeOnly;
@@ -149674,7 +149712,7 @@ var ts;
149674
149712
  lastCharWasValid = isValid;
149675
149713
  }
149676
149714
  // Need `|| "_"` to ensure result isn't empty.
149677
- return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_" + res;
149715
+ return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
149678
149716
  }
149679
149717
  codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
149680
149718
  })(codefix = ts.codefix || (ts.codefix = {}));
@@ -150874,7 +150912,7 @@ var ts;
150874
150912
  break;
150875
150913
  }
150876
150914
  default:
150877
- ts.Debug.fail("Bad fixId: " + context.fixId);
150915
+ ts.Debug.fail("Bad fixId: ".concat(context.fixId));
150878
150916
  }
150879
150917
  });
150880
150918
  },
@@ -151322,7 +151360,7 @@ var ts;
151322
151360
  if (!isValidCharacter(character)) {
151323
151361
  return;
151324
151362
  }
151325
- var replacement = useHtmlEntity ? htmlEntity[character] : "{" + ts.quote(sourceFile, preferences, character) + "}";
151363
+ var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
151326
151364
  changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
151327
151365
  }
151328
151366
  })(codefix = ts.codefix || (ts.codefix = {}));
@@ -151513,11 +151551,11 @@ var ts;
151513
151551
  token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
151514
151552
  }
151515
151553
  if (ts.isIdentifier(token) && canPrefix(token)) {
151516
- changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_" + token.text));
151554
+ changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
151517
151555
  if (ts.isParameter(token.parent)) {
151518
151556
  ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
151519
151557
  if (ts.isIdentifier(tag.name)) {
151520
- changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_" + tag.name.text));
151558
+ changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
151521
151559
  }
151522
151560
  });
151523
151561
  }
@@ -151853,7 +151891,7 @@ var ts;
151853
151891
  }); }
151854
151892
  });
151855
151893
  function doChange(changes, sourceFile, name) {
151856
- changes.replaceNodeWithText(sourceFile, name, name.text + "()");
151894
+ changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
151857
151895
  }
151858
151896
  function getCallName(sourceFile, start) {
151859
151897
  var token = ts.getTokenAtPosition(sourceFile, start);
@@ -153002,7 +153040,7 @@ var ts;
153002
153040
  var parameters = [];
153003
153041
  var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
153004
153042
  var _loop_16 = function (i) {
153005
- var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg" + i));
153043
+ var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
153006
153044
  symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
153007
153045
  if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
153008
153046
  symbol.flags |= 16777216 /* Optional */;
@@ -153105,7 +153143,7 @@ var ts;
153105
153143
  codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
153106
153144
  ts.createTextChange(sourceFile.checkJsDirective
153107
153145
  ? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
153108
- : ts.createTextSpan(0, 0), "// @ts-nocheck" + newLineCharacter),
153146
+ : ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
153109
153147
  ])], ts.Diagnostics.Disable_checking_for_this_file),
153110
153148
  ];
153111
153149
  if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
@@ -153161,11 +153199,18 @@ var ts;
153161
153199
  };
153162
153200
  }
153163
153201
  codefix.getNoopSymbolTrackerWithResolver = getNoopSymbolTrackerWithResolver;
153202
+ var PreserveOptionalFlags;
153203
+ (function (PreserveOptionalFlags) {
153204
+ PreserveOptionalFlags[PreserveOptionalFlags["Method"] = 1] = "Method";
153205
+ PreserveOptionalFlags[PreserveOptionalFlags["Property"] = 2] = "Property";
153206
+ PreserveOptionalFlags[PreserveOptionalFlags["All"] = 3] = "All";
153207
+ })(PreserveOptionalFlags = codefix.PreserveOptionalFlags || (codefix.PreserveOptionalFlags = {}));
153164
153208
  /**
153165
153209
  * `addClassElement` will not be called if we can't figure out a representation for `symbol` in `enclosingDeclaration`.
153166
153210
  * @param body If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub.
153167
153211
  */
153168
- function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, isAmbient) {
153212
+ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional, isAmbient) {
153213
+ if (preserveOptional === void 0) { preserveOptional = 3 /* All */; }
153169
153214
  if (isAmbient === void 0) { isAmbient = false; }
153170
153215
  var declarations = symbol.getDeclarations();
153171
153216
  if (!(declarations && declarations.length)) {
@@ -153194,7 +153239,7 @@ var ts;
153194
153239
  }
153195
153240
  }
153196
153241
  addClassElement(ts.factory.createPropertyDeclaration(
153197
- /*decorators*/ undefined, modifiers, name, optional ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
153242
+ /*decorators*/ undefined, modifiers, name, optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
153198
153243
  /*initializer*/ undefined));
153199
153244
  break;
153200
153245
  case 171 /* GetAccessor */:
@@ -153258,13 +153303,13 @@ var ts;
153258
153303
  }
153259
153304
  else {
153260
153305
  ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count");
153261
- addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional, modifiers, quotePreference, body));
153306
+ addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body));
153262
153307
  }
153263
153308
  }
153264
153309
  break;
153265
153310
  }
153266
153311
  function outputMethod(quotePreference, signature, modifiers, name, body) {
153267
- var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder);
153312
+ var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder);
153268
153313
  if (method)
153269
153314
  addClassElement(method);
153270
153315
  }
@@ -153364,7 +153409,7 @@ var ts;
153364
153409
  var typeParameters = isJs || typeArguments === undefined
153365
153410
  ? undefined
153366
153411
  : ts.map(typeArguments, function (_, i) {
153367
- return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T" + i);
153412
+ return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
153368
153413
  });
153369
153414
  var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
153370
153415
  var type = isJs || contextualType === undefined
@@ -153399,7 +153444,7 @@ var ts;
153399
153444
  /*decorators*/ undefined,
153400
153445
  /*modifiers*/ undefined,
153401
153446
  /*dotDotDotToken*/ undefined,
153402
- /*name*/ names && names[i] || "arg" + i,
153447
+ /*name*/ names && names[i] || "arg".concat(i),
153403
153448
  /*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
153404
153449
  /*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
153405
153450
  /*initializer*/ undefined);
@@ -153650,7 +153695,7 @@ var ts;
153650
153695
  }
153651
153696
  var name = declaration.name.text;
153652
153697
  var startWithUnderscore = ts.startsWithUnderscore(name);
153653
- var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_" + name, file), declaration.name);
153698
+ var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
153654
153699
  var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
153655
153700
  return {
153656
153701
  isStatic: ts.hasStaticModifier(declaration),
@@ -154674,7 +154719,7 @@ var ts;
154674
154719
  changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
154675
154720
  break;
154676
154721
  default:
154677
- ts.Debug.fail("Unexpected exportNode kind " + exportNode.kind);
154722
+ ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
154678
154723
  }
154679
154724
  }
154680
154725
  }
@@ -154762,7 +154807,7 @@ var ts;
154762
154807
  break;
154763
154808
  }
154764
154809
  default:
154765
- ts.Debug.assertNever(parent, "Unexpected parent kind " + parent.kind);
154810
+ ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
154766
154811
  }
154767
154812
  }
154768
154813
  function makeImportSpecifier(propertyName, name) {
@@ -155326,7 +155371,7 @@ var ts;
155326
155371
  var newComment = ts.displayPartsToString(parameterDocComment);
155327
155372
  if (newComment.length) {
155328
155373
  ts.setSyntheticLeadingComments(result, [{
155329
- text: "*\n" + newComment.split("\n").map(function (c) { return " * " + c; }).join("\n") + "\n ",
155374
+ text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
155330
155375
  kind: 3 /* MultiLineCommentTrivia */,
155331
155376
  pos: -1,
155332
155377
  end: -1,
@@ -155471,7 +155516,7 @@ var ts;
155471
155516
  usedFunctionNames.set(description, true);
155472
155517
  functionActions.push({
155473
155518
  description: description,
155474
- name: "function_scope_" + i,
155519
+ name: "function_scope_".concat(i),
155475
155520
  kind: extractFunctionAction.kind
155476
155521
  });
155477
155522
  }
@@ -155479,7 +155524,7 @@ var ts;
155479
155524
  else if (!innermostErrorFunctionAction) {
155480
155525
  innermostErrorFunctionAction = {
155481
155526
  description: description,
155482
- name: "function_scope_" + i,
155527
+ name: "function_scope_".concat(i),
155483
155528
  notApplicableReason: getStringError(functionExtraction.errors),
155484
155529
  kind: extractFunctionAction.kind
155485
155530
  };
@@ -155495,7 +155540,7 @@ var ts;
155495
155540
  usedConstantNames.set(description_1, true);
155496
155541
  constantActions.push({
155497
155542
  description: description_1,
155498
- name: "constant_scope_" + i,
155543
+ name: "constant_scope_".concat(i),
155499
155544
  kind: extractConstantAction.kind
155500
155545
  });
155501
155546
  }
@@ -155503,7 +155548,7 @@ var ts;
155503
155548
  else if (!innermostErrorConstantAction) {
155504
155549
  innermostErrorConstantAction = {
155505
155550
  description: description,
155506
- name: "constant_scope_" + i,
155551
+ name: "constant_scope_".concat(i),
155507
155552
  notApplicableReason: getStringError(constantExtraction.errors),
155508
155553
  kind: extractConstantAction.kind
155509
155554
  };
@@ -156087,28 +156132,28 @@ var ts;
156087
156132
  case 212 /* FunctionExpression */:
156088
156133
  case 255 /* FunctionDeclaration */:
156089
156134
  return scope.name
156090
- ? "function '" + scope.name.text + "'"
156135
+ ? "function '".concat(scope.name.text, "'")
156091
156136
  : ts.ANONYMOUS;
156092
156137
  case 213 /* ArrowFunction */:
156093
156138
  return "arrow function";
156094
156139
  case 168 /* MethodDeclaration */:
156095
- return "method '" + scope.name.getText() + "'";
156140
+ return "method '".concat(scope.name.getText(), "'");
156096
156141
  case 171 /* GetAccessor */:
156097
- return "'get " + scope.name.getText() + "'";
156142
+ return "'get ".concat(scope.name.getText(), "'");
156098
156143
  case 172 /* SetAccessor */:
156099
- return "'set " + scope.name.getText() + "'";
156144
+ return "'set ".concat(scope.name.getText(), "'");
156100
156145
  default:
156101
- throw ts.Debug.assertNever(scope, "Unexpected scope kind " + scope.kind);
156146
+ throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
156102
156147
  }
156103
156148
  }
156104
156149
  function getDescriptionForClassLikeDeclaration(scope) {
156105
156150
  return scope.kind === 256 /* ClassDeclaration */
156106
- ? scope.name ? "class '" + scope.name.text + "'" : "anonymous class declaration"
156107
- : scope.name ? "class expression '" + scope.name.text + "'" : "anonymous class expression";
156151
+ ? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
156152
+ : scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
156108
156153
  }
156109
156154
  function getDescriptionForModuleLikeDeclaration(scope) {
156110
156155
  return scope.kind === 261 /* ModuleBlock */
156111
- ? "namespace '" + scope.parent.name.getText() + "'"
156156
+ ? "namespace '".concat(scope.parent.name.getText(), "'")
156112
156157
  : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
156113
156158
  }
156114
156159
  var SpecialScope;
@@ -157221,11 +157266,12 @@ var ts;
157221
157266
  var result = [];
157222
157267
  return visitor(selection) ? undefined : result;
157223
157268
  function visitor(node) {
157269
+ var _a;
157224
157270
  if (ts.isTypeReferenceNode(node)) {
157225
157271
  if (ts.isIdentifier(node.typeName)) {
157226
157272
  var symbol = checker.resolveName(node.typeName.text, node.typeName, 262144 /* TypeParameter */, /* excludeGlobals */ true);
157227
- if (symbol === null || symbol === void 0 ? void 0 : symbol.declarations) {
157228
- var declaration = ts.cast(ts.first(symbol.declarations), ts.isTypeParameterDeclaration);
157273
+ var declaration = ts.tryCast((_a = symbol === null || symbol === void 0 ? void 0 : symbol.declarations) === null || _a === void 0 ? void 0 : _a[0], ts.isTypeParameterDeclaration);
157274
+ if (declaration) {
157229
157275
  if (rangeContainsSkipTrivia(statement, declaration, file) && !rangeContainsSkipTrivia(selection, declaration, file)) {
157230
157276
  ts.pushIfUnique(result, declaration);
157231
157277
  }
@@ -157575,7 +157621,7 @@ var ts;
157575
157621
  case 253 /* VariableDeclaration */:
157576
157622
  return ts.tryCast(node.name, ts.isIdentifier);
157577
157623
  default:
157578
- return ts.Debug.assertNever(node, "Unexpected node kind " + node.kind);
157624
+ return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
157579
157625
  }
157580
157626
  }
157581
157627
  function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
@@ -157612,7 +157658,7 @@ var ts;
157612
157658
  case 253 /* VariableDeclaration */:
157613
157659
  return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
157614
157660
  default:
157615
- return ts.Debug.assertNever(node, "Unexpected node kind " + node.kind);
157661
+ return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
157616
157662
  }
157617
157663
  }
157618
157664
  function moduleSpecifierFromImport(i) {
@@ -157699,7 +157745,7 @@ var ts;
157699
157745
  deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
157700
157746
  break;
157701
157747
  default:
157702
- ts.Debug.assertNever(importDecl, "Unexpected import decl kind " + importDecl.kind);
157748
+ ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
157703
157749
  }
157704
157750
  }
157705
157751
  function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
@@ -157799,7 +157845,7 @@ var ts;
157799
157845
  var name = ts.combinePaths(inDirectory, newModuleName + extension);
157800
157846
  if (!host.fileExists(name))
157801
157847
  return newModuleName; // TODO: GH#18217
157802
- newModuleName = moduleName + "." + i;
157848
+ newModuleName = "".concat(moduleName, ".").concat(i);
157803
157849
  }
157804
157850
  }
157805
157851
  function getNewModuleName(movedSymbols) {
@@ -157906,7 +157952,7 @@ var ts;
157906
157952
  return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
157907
157953
  }
157908
157954
  default:
157909
- return ts.Debug.assertNever(i, "Unexpected import kind " + i.kind);
157955
+ return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
157910
157956
  }
157911
157957
  }
157912
157958
  function filterNamedBindings(namedBindings, keep) {
@@ -158021,7 +158067,7 @@ var ts;
158021
158067
  case 200 /* ObjectBindingPattern */:
158022
158068
  return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
158023
158069
  default:
158024
- return ts.Debug.assertNever(name, "Unexpected name kind " + name.kind);
158070
+ return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
158025
158071
  }
158026
158072
  }
158027
158073
  function nameOfTopLevelDeclaration(d) {
@@ -158082,7 +158128,7 @@ var ts;
158082
158128
  case 237 /* ExpressionStatement */:
158083
158129
  return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
158084
158130
  default:
158085
- return ts.Debug.assertNever(d, "Unexpected declaration kind " + d.kind);
158131
+ return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
158086
158132
  }
158087
158133
  }
158088
158134
  function addCommonjsExport(decl) {
@@ -158104,7 +158150,7 @@ var ts;
158104
158150
  case 237 /* ExpressionStatement */:
158105
158151
  return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
158106
158152
  default:
158107
- return ts.Debug.assertNever(decl, "Unexpected decl kind " + decl.kind);
158153
+ return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
158108
158154
  }
158109
158155
  }
158110
158156
  /** Creates `exports.x = x;` */
@@ -158742,7 +158788,7 @@ var ts;
158742
158788
  return [functionDeclaration.name, functionDeclaration.parent.name];
158743
158789
  return [functionDeclaration.parent.name];
158744
158790
  default:
158745
- return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind " + functionDeclaration.kind);
158791
+ return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
158746
158792
  }
158747
158793
  }
158748
158794
  })(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
@@ -159446,7 +159492,7 @@ var ts;
159446
159492
  var textPos = ts.scanner.getTextPos();
159447
159493
  if (textPos <= end) {
159448
159494
  if (token === 79 /* Identifier */) {
159449
- ts.Debug.fail("Did not expect " + ts.Debug.formatSyntaxKind(parent.kind) + " to have an Identifier in its trivia");
159495
+ ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
159450
159496
  }
159451
159497
  nodes.push(createNode(token, pos, textPos, parent));
159452
159498
  }
@@ -160328,7 +160374,7 @@ var ts;
160328
160374
  function getValidSourceFile(fileName) {
160329
160375
  var sourceFile = program.getSourceFile(fileName);
160330
160376
  if (!sourceFile) {
160331
- var error = new Error("Could not find source file: '" + fileName + "'.");
160377
+ var error = new Error("Could not find source file: '".concat(fileName, "'."));
160332
160378
  // We've been having trouble debugging this, so attach sidecar data for the tsserver log.
160333
160379
  // See https://github.com/microsoft/TypeScript/issues/30180.
160334
160380
  error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
@@ -161003,7 +161049,7 @@ var ts;
161003
161049
  var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
161004
161050
  : ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
161005
161051
  if (element && isUnclosedTag(element)) {
161006
- return { newText: "</" + element.openingElement.tagName.getText(sourceFile) + ">" };
161052
+ return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
161007
161053
  }
161008
161054
  var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
161009
161055
  : ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
@@ -161109,7 +161155,7 @@ var ts;
161109
161155
  pos = commentRange.end + 1;
161110
161156
  }
161111
161157
  else { // If it's not in a comment range, then we need to comment the uncommented portions.
161112
- var newPos = text.substring(pos, textRange.end).search("(" + openMultilineRegex + ")|(" + closeMultilineRegex + ")");
161158
+ var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
161113
161159
  isCommenting = insertComment !== undefined
161114
161160
  ? insertComment
161115
161161
  : isCommenting || !ts.isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); // If isCommenting is already true we don't need to check whitespace again.
@@ -161504,14 +161550,14 @@ var ts;
161504
161550
  case ts.LanguageServiceMode.PartialSemantic:
161505
161551
  invalidOperationsInPartialSemanticMode.forEach(function (key) {
161506
161552
  return ls[key] = function () {
161507
- throw new Error("LanguageService Operation: " + key + " not allowed in LanguageServiceMode.PartialSemantic");
161553
+ throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
161508
161554
  };
161509
161555
  });
161510
161556
  break;
161511
161557
  case ts.LanguageServiceMode.Syntactic:
161512
161558
  invalidOperationsInSyntacticMode.forEach(function (key) {
161513
161559
  return ls[key] = function () {
161514
- throw new Error("LanguageService Operation: " + key + " not allowed in LanguageServiceMode.Syntactic");
161560
+ throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
161515
161561
  };
161516
161562
  });
161517
161563
  break;
@@ -162493,13 +162539,13 @@ var ts;
162493
162539
  var result = action();
162494
162540
  if (logPerformance) {
162495
162541
  var end = ts.timestamp();
162496
- logger.log(actionDescription + " completed in " + (end - start) + " msec");
162542
+ logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
162497
162543
  if (ts.isString(result)) {
162498
162544
  var str = result;
162499
162545
  if (str.length > 128) {
162500
162546
  str = str.substring(0, 128) + "...";
162501
162547
  }
162502
- logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'");
162548
+ logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
162503
162549
  }
162504
162550
  }
162505
162551
  return result;
@@ -162581,7 +162627,7 @@ var ts;
162581
162627
  * Update the list of scripts known to the compiler
162582
162628
  */
162583
162629
  LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
162584
- this.forwardJSONCall("refresh(" + throwOnError + ")", function () { return null; } // eslint-disable-line no-null/no-null
162630
+ this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
162585
162631
  );
162586
162632
  };
162587
162633
  LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
@@ -162597,43 +162643,43 @@ var ts;
162597
162643
  };
162598
162644
  LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
162599
162645
  var _this = this;
162600
- return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
162646
+ return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
162601
162647
  };
162602
162648
  LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
162603
162649
  var _this = this;
162604
- return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
162650
+ return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
162605
162651
  };
162606
162652
  LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
162607
162653
  var _this = this;
162608
- return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
162654
+ return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
162609
162655
  // directly serialize the spans out to a string. This is much faster to decode
162610
162656
  // on the managed side versus a full JSON array.
162611
162657
  function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
162612
162658
  };
162613
162659
  LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
162614
162660
  var _this = this;
162615
- return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
162661
+ return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
162616
162662
  // directly serialize the spans out to a string. This is much faster to decode
162617
162663
  // on the managed side versus a full JSON array.
162618
162664
  function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
162619
162665
  };
162620
162666
  LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
162621
162667
  var _this = this;
162622
- return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName + "')", function () {
162668
+ return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
162623
162669
  var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
162624
162670
  return _this.realizeDiagnostics(diagnostics);
162625
162671
  });
162626
162672
  };
162627
162673
  LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
162628
162674
  var _this = this;
162629
- return this.forwardJSONCall("getSemanticDiagnostics('" + fileName + "')", function () {
162675
+ return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
162630
162676
  var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
162631
162677
  return _this.realizeDiagnostics(diagnostics);
162632
162678
  });
162633
162679
  };
162634
162680
  LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
162635
162681
  var _this = this;
162636
- return this.forwardJSONCall("getSuggestionDiagnostics('" + fileName + "')", function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
162682
+ return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
162637
162683
  };
162638
162684
  LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
162639
162685
  var _this = this;
@@ -162649,7 +162695,7 @@ var ts;
162649
162695
  */
162650
162696
  LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
162651
162697
  var _this = this;
162652
- return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
162698
+ return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
162653
162699
  };
162654
162700
  /// NAMEORDOTTEDNAMESPAN
162655
162701
  /**
@@ -162658,7 +162704,7 @@ var ts;
162658
162704
  */
162659
162705
  LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
162660
162706
  var _this = this;
162661
- return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")", function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
162707
+ return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
162662
162708
  };
162663
162709
  /**
162664
162710
  * STATEMENTSPAN
@@ -162666,12 +162712,12 @@ var ts;
162666
162712
  */
162667
162713
  LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
162668
162714
  var _this = this;
162669
- return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
162715
+ return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
162670
162716
  };
162671
162717
  /// SIGNATUREHELP
162672
162718
  LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
162673
162719
  var _this = this;
162674
- return this.forwardJSONCall("getSignatureHelpItems('" + fileName + "', " + position + ")", function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
162720
+ return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
162675
162721
  };
162676
162722
  /// GOTO DEFINITION
162677
162723
  /**
@@ -162680,7 +162726,7 @@ var ts;
162680
162726
  */
162681
162727
  LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
162682
162728
  var _this = this;
162683
- return this.forwardJSONCall("getDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
162729
+ return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
162684
162730
  };
162685
162731
  /**
162686
162732
  * Computes the definition location and file for the symbol
@@ -162688,7 +162734,7 @@ var ts;
162688
162734
  */
162689
162735
  LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
162690
162736
  var _this = this;
162691
- return this.forwardJSONCall("getDefinitionAndBoundSpan('" + fileName + "', " + position + ")", function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
162737
+ return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
162692
162738
  };
162693
162739
  /// GOTO Type
162694
162740
  /**
@@ -162697,7 +162743,7 @@ var ts;
162697
162743
  */
162698
162744
  LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
162699
162745
  var _this = this;
162700
- return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
162746
+ return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
162701
162747
  };
162702
162748
  /// GOTO Implementation
162703
162749
  /**
@@ -162706,37 +162752,37 @@ var ts;
162706
162752
  */
162707
162753
  LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
162708
162754
  var _this = this;
162709
- return this.forwardJSONCall("getImplementationAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
162755
+ return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
162710
162756
  };
162711
162757
  LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
162712
162758
  var _this = this;
162713
- return this.forwardJSONCall("getRenameInfo('" + fileName + "', " + position + ")", function () { return _this.languageService.getRenameInfo(fileName, position, options); });
162759
+ return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
162714
162760
  };
162715
162761
  LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
162716
162762
  var _this = this;
162717
- return this.forwardJSONCall("getSmartSelectionRange('" + fileName + "', " + position + ")", function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
162763
+ return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
162718
162764
  };
162719
162765
  LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
162720
162766
  var _this = this;
162721
- return this.forwardJSONCall("findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ", " + providePrefixAndSuffixTextForRename + ")", function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
162767
+ return this.forwardJSONCall("findRenameLocations('".concat(fileName, "', ").concat(position, ", ").concat(findInStrings, ", ").concat(findInComments, ", ").concat(providePrefixAndSuffixTextForRename, ")"), function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
162722
162768
  };
162723
162769
  /// GET BRACE MATCHING
162724
162770
  LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
162725
162771
  var _this = this;
162726
- return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
162772
+ return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
162727
162773
  };
162728
162774
  LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
162729
162775
  var _this = this;
162730
- return this.forwardJSONCall("isValidBraceCompletionAtPosition('" + fileName + "', " + position + ", " + openingBrace + ")", function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
162776
+ return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
162731
162777
  };
162732
162778
  LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
162733
162779
  var _this = this;
162734
- return this.forwardJSONCall("getSpanOfEnclosingComment('" + fileName + "', " + position + ")", function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
162780
+ return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
162735
162781
  };
162736
162782
  /// GET SMART INDENT
162737
162783
  LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
162738
162784
  var _this = this;
162739
- return this.forwardJSONCall("getIndentationAtPosition('" + fileName + "', " + position + ")", function () {
162785
+ return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
162740
162786
  var localOptions = JSON.parse(options);
162741
162787
  return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
162742
162788
  });
@@ -162744,23 +162790,23 @@ var ts;
162744
162790
  /// GET REFERENCES
162745
162791
  LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
162746
162792
  var _this = this;
162747
- return this.forwardJSONCall("getReferencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
162793
+ return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
162748
162794
  };
162749
162795
  LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
162750
162796
  var _this = this;
162751
- return this.forwardJSONCall("findReferences('" + fileName + "', " + position + ")", function () { return _this.languageService.findReferences(fileName, position); });
162797
+ return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
162752
162798
  };
162753
162799
  LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
162754
162800
  var _this = this;
162755
- return this.forwardJSONCall("getFileReferences('" + fileName + ")", function () { return _this.languageService.getFileReferences(fileName); });
162801
+ return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
162756
162802
  };
162757
162803
  LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
162758
162804
  var _this = this;
162759
- return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
162805
+ return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
162760
162806
  };
162761
162807
  LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
162762
162808
  var _this = this;
162763
- return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () {
162809
+ return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
162764
162810
  var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
162765
162811
  // workaround for VS document highlighting issue - keep only items from the initial file
162766
162812
  var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
@@ -162775,108 +162821,108 @@ var ts;
162775
162821
  */
162776
162822
  LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences) {
162777
162823
  var _this = this;
162778
- return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ", " + preferences + ")", function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences); });
162824
+ return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences); });
162779
162825
  };
162780
162826
  /** Get a string based representation of a completion list entry details */
162781
162827
  LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
162782
162828
  var _this = this;
162783
- return this.forwardJSONCall("getCompletionEntryDetails('" + fileName + "', " + position + ", '" + entryName + "')", function () {
162829
+ return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
162784
162830
  var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
162785
162831
  return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
162786
162832
  });
162787
162833
  };
162788
162834
  LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
162789
162835
  var _this = this;
162790
- return this.forwardJSONCall("getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")", function () {
162836
+ return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
162791
162837
  var localOptions = JSON.parse(options);
162792
162838
  return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
162793
162839
  });
162794
162840
  };
162795
162841
  LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
162796
162842
  var _this = this;
162797
- return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName + "')", function () {
162843
+ return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
162798
162844
  var localOptions = JSON.parse(options);
162799
162845
  return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
162800
162846
  });
162801
162847
  };
162802
162848
  LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
162803
162849
  var _this = this;
162804
- return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')", function () {
162850
+ return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
162805
162851
  var localOptions = JSON.parse(options);
162806
162852
  return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
162807
162853
  });
162808
162854
  };
162809
162855
  LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
162810
162856
  var _this = this;
162811
- return this.forwardJSONCall("getDocCommentTemplateAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
162857
+ return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
162812
162858
  };
162813
162859
  /// NAVIGATE TO
162814
162860
  /** Return a list of symbols that are interesting to navigate to */
162815
162861
  LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
162816
162862
  var _this = this;
162817
- return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ", " + fileName + ")", function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
162863
+ return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
162818
162864
  };
162819
162865
  LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
162820
162866
  var _this = this;
162821
- return this.forwardJSONCall("getNavigationBarItems('" + fileName + "')", function () { return _this.languageService.getNavigationBarItems(fileName); });
162867
+ return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
162822
162868
  };
162823
162869
  LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
162824
162870
  var _this = this;
162825
- return this.forwardJSONCall("getNavigationTree('" + fileName + "')", function () { return _this.languageService.getNavigationTree(fileName); });
162871
+ return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
162826
162872
  };
162827
162873
  LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
162828
162874
  var _this = this;
162829
- return this.forwardJSONCall("getOutliningSpans('" + fileName + "')", function () { return _this.languageService.getOutliningSpans(fileName); });
162875
+ return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
162830
162876
  };
162831
162877
  LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
162832
162878
  var _this = this;
162833
- return this.forwardJSONCall("getTodoComments('" + fileName + "')", function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
162879
+ return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
162834
162880
  };
162835
162881
  /// CALL HIERARCHY
162836
162882
  LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
162837
162883
  var _this = this;
162838
- return this.forwardJSONCall("prepareCallHierarchy('" + fileName + "', " + position + ")", function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
162884
+ return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
162839
162885
  };
162840
162886
  LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
162841
162887
  var _this = this;
162842
- return this.forwardJSONCall("provideCallHierarchyIncomingCalls('" + fileName + "', " + position + ")", function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
162888
+ return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
162843
162889
  };
162844
162890
  LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
162845
162891
  var _this = this;
162846
- return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('" + fileName + "', " + position + ")", function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
162892
+ return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
162847
162893
  };
162848
162894
  LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
162849
162895
  var _this = this;
162850
- return this.forwardJSONCall("provideInlayHints('" + fileName + "', '" + JSON.stringify(span) + "', " + JSON.stringify(preference) + ")", function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
162896
+ return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
162851
162897
  };
162852
162898
  /// Emit
162853
162899
  LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
162854
162900
  var _this = this;
162855
- return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () {
162901
+ return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
162856
162902
  var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
162857
162903
  return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
162858
162904
  });
162859
162905
  };
162860
162906
  LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
162861
162907
  var _this = this;
162862
- return forwardCall(this.logger, "getEmitOutput('" + fileName + "')",
162908
+ return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
162863
162909
  /*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
162864
162910
  };
162865
162911
  LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
162866
162912
  var _this = this;
162867
- return this.forwardJSONCall("toggleLineComment('" + fileName + "', '" + JSON.stringify(textRange) + "')", function () { return _this.languageService.toggleLineComment(fileName, textRange); });
162913
+ return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
162868
162914
  };
162869
162915
  LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
162870
162916
  var _this = this;
162871
- return this.forwardJSONCall("toggleMultilineComment('" + fileName + "', '" + JSON.stringify(textRange) + "')", function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
162917
+ return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
162872
162918
  };
162873
162919
  LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
162874
162920
  var _this = this;
162875
- return this.forwardJSONCall("commentSelection('" + fileName + "', '" + JSON.stringify(textRange) + "')", function () { return _this.languageService.commentSelection(fileName, textRange); });
162921
+ return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
162876
162922
  };
162877
162923
  LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
162878
162924
  var _this = this;
162879
- return this.forwardJSONCall("uncommentSelection('" + fileName + "', '" + JSON.stringify(textRange) + "')", function () { return _this.languageService.uncommentSelection(fileName, textRange); });
162925
+ return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
162880
162926
  };
162881
162927
  return LanguageServiceShimObject;
162882
162928
  }(ShimBase));
@@ -162926,7 +162972,7 @@ var ts;
162926
162972
  };
162927
162973
  CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
162928
162974
  var _this = this;
162929
- return this.forwardJSONCall("resolveModuleName('" + fileName + "')", function () {
162975
+ return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
162930
162976
  var compilerOptions = JSON.parse(compilerOptionsJson);
162931
162977
  var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
162932
162978
  var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
@@ -162941,7 +162987,7 @@ var ts;
162941
162987
  };
162942
162988
  CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
162943
162989
  var _this = this;
162944
- return this.forwardJSONCall("resolveTypeReferenceDirective(" + fileName + ")", function () {
162990
+ return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
162945
162991
  var compilerOptions = JSON.parse(compilerOptionsJson);
162946
162992
  var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
162947
162993
  return {
@@ -162953,7 +162999,7 @@ var ts;
162953
162999
  };
162954
163000
  CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
162955
163001
  var _this = this;
162956
- return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () {
163002
+ return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
162957
163003
  // for now treat files as JavaScript
162958
163004
  var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
162959
163005
  return {
@@ -162968,7 +163014,7 @@ var ts;
162968
163014
  };
162969
163015
  CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
162970
163016
  var _this = this;
162971
- return this.forwardJSONCall("getAutomaticTypeDirectiveNames('" + compilerOptionsJson + "')", function () {
163017
+ return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
162972
163018
  var compilerOptions = JSON.parse(compilerOptionsJson);
162973
163019
  return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
162974
163020
  });
@@ -162990,7 +163036,7 @@ var ts;
162990
163036
  };
162991
163037
  CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
162992
163038
  var _this = this;
162993
- return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () {
163039
+ return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
162994
163040
  var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
162995
163041
  var normalizedFileName = ts.normalizeSlashes(fileName);
162996
163042
  var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
@@ -163180,7 +163226,7 @@ var ts;
163180
163226
  }
163181
163227
  Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
163182
163228
  function ThrowProjectDoesNotContainDocument(fileName, project) {
163183
- throw new Error("Project '" + project.getProjectName() + "' does not contain document '" + fileName + "'");
163229
+ throw new Error("Project '".concat(project.getProjectName(), "' does not contain document '").concat(fileName, "'"));
163184
163230
  }
163185
163231
  Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
163186
163232
  })(Errors = server.Errors || (server.Errors = {}));
@@ -163221,12 +163267,12 @@ var ts;
163221
163267
  }
163222
163268
  server.isInferredProjectName = isInferredProjectName;
163223
163269
  function makeInferredProjectName(counter) {
163224
- return "/dev/null/inferredProject" + counter + "*";
163270
+ return "/dev/null/inferredProject".concat(counter, "*");
163225
163271
  }
163226
163272
  server.makeInferredProjectName = makeInferredProjectName;
163227
163273
  /*@internal*/
163228
163274
  function makeAutoImportProviderProjectName(counter) {
163229
- return "/dev/null/autoImportProviderProject" + counter + "*";
163275
+ return "/dev/null/autoImportProviderProject".concat(counter, "*");
163230
163276
  }
163231
163277
  server.makeAutoImportProviderProjectName = makeAutoImportProviderProjectName;
163232
163278
  function createSortedArray() {
@@ -163261,7 +163307,7 @@ var ts;
163261
163307
  // schedule new operation, pass arguments
163262
163308
  this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
163263
163309
  if (this.logger) {
163264
- this.logger.info("Scheduled: " + operationId + (pendingTimeout ? ", Cancelled earlier one" : ""));
163310
+ this.logger.info("Scheduled: ".concat(operationId).concat(pendingTimeout ? ", Cancelled earlier one" : ""));
163265
163311
  }
163266
163312
  };
163267
163313
  ThrottledOperations.prototype.cancel = function (operationId) {
@@ -163275,7 +163321,7 @@ var ts;
163275
163321
  ts.perfLogger.logStartScheduledOperation(operationId);
163276
163322
  self.pendingTimeouts.delete(operationId);
163277
163323
  if (self.logger) {
163278
- self.logger.info("Running: " + operationId);
163324
+ self.logger.info("Running: ".concat(operationId));
163279
163325
  }
163280
163326
  cb();
163281
163327
  ts.perfLogger.logStopScheduledOperation();
@@ -163304,7 +163350,7 @@ var ts;
163304
163350
  self.host.gc(); // TODO: GH#18217
163305
163351
  if (log) {
163306
163352
  var after = self.host.getMemoryUsage(); // TODO: GH#18217
163307
- self.logger.perftrc("GC::before " + before + ", after " + after);
163353
+ self.logger.perftrc("GC::before ".concat(before, ", after ").concat(after));
163308
163354
  }
163309
163355
  ts.perfLogger.logStopScheduledOperation();
163310
163356
  };
@@ -163656,8 +163702,8 @@ var ts;
163656
163702
  }
163657
163703
  TextStorage.prototype.getVersion = function () {
163658
163704
  return this.svc
163659
- ? "SVC-" + this.version.svc + "-" + this.svc.getSnapshotVersion()
163660
- : "Text-" + this.version.text;
163705
+ ? "SVC-".concat(this.version.svc, "-").concat(this.svc.getSnapshotVersion())
163706
+ : "Text-".concat(this.version.text);
163661
163707
  };
163662
163708
  TextStorage.prototype.hasScriptVersionCache_TestOnly = function () {
163663
163709
  return this.svc !== undefined;
@@ -163800,7 +163846,7 @@ var ts;
163800
163846
  if (fileSize > server.maxFileSize) {
163801
163847
  ts.Debug.assert(!!this.info.containingProjects.length);
163802
163848
  var service = this.info.containingProjects[0].projectService;
163803
- service.logger.info("Skipped loading contents of large file " + fileName + " for info " + this.info.fileName + ": fileSize: " + fileSize);
163849
+ service.logger.info("Skipped loading contents of large file ".concat(fileName, " for info ").concat(this.info.fileName, ": fileSize: ").concat(fileSize));
163804
163850
  this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize);
163805
163851
  return { text: "", fileSize: fileSize };
163806
163852
  }
@@ -164176,14 +164222,14 @@ var ts;
164176
164222
  return project;
164177
164223
  }
164178
164224
  function failIfInvalidPosition(position) {
164179
- ts.Debug.assert(typeof position === "number", "Expected position " + position + " to be a number.");
164225
+ ts.Debug.assert(typeof position === "number", "Expected position ".concat(position, " to be a number."));
164180
164226
  ts.Debug.assert(position >= 0, "Expected position to be non-negative.");
164181
164227
  }
164182
164228
  function failIfInvalidLocation(location) {
164183
- ts.Debug.assert(typeof location.line === "number", "Expected line " + location.line + " to be a number.");
164184
- ts.Debug.assert(typeof location.offset === "number", "Expected offset " + location.offset + " to be a number.");
164185
- ts.Debug.assert(location.line > 0, "Expected line to be non-" + (location.line === 0 ? "zero" : "negative"));
164186
- ts.Debug.assert(location.offset > 0, "Expected offset to be non-" + (location.offset === 0 ? "zero" : "negative"));
164229
+ ts.Debug.assert(typeof location.line === "number", "Expected line ".concat(location.line, " to be a number."));
164230
+ ts.Debug.assert(typeof location.offset === "number", "Expected offset ".concat(location.offset, " to be a number."));
164231
+ ts.Debug.assert(location.line > 0, "Expected line to be non-".concat(location.line === 0 ? "zero" : "negative"));
164232
+ ts.Debug.assert(location.offset > 0, "Expected offset to be non-".concat(location.offset === 0 ? "zero" : "negative"));
164187
164233
  }
164188
164234
  })(server = ts.server || (ts.server = {}));
164189
164235
  })(ts || (ts = {}));
@@ -164495,11 +164541,11 @@ var ts;
164495
164541
  };
164496
164542
  Project.resolveModule = function (moduleName, initialDir, host, log, logErrors) {
164497
164543
  var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
164498
- log("Loading " + moduleName + " from " + initialDir + " (resolved to " + resolvedPath + ")");
164544
+ log("Loading ".concat(moduleName, " from ").concat(initialDir, " (resolved to ").concat(resolvedPath, ")"));
164499
164545
  var result = host.require(resolvedPath, moduleName); // TODO: GH#18217
164500
164546
  if (result.error) {
164501
164547
  var err = result.error.stack || result.error.message || JSON.stringify(result.error);
164502
- (logErrors || log)("Failed to load module '" + moduleName + "' from " + resolvedPath + ": " + err);
164548
+ (logErrors || log)("Failed to load module '".concat(moduleName, "' from ").concat(resolvedPath, ": ").concat(err));
164503
164549
  return undefined;
164504
164550
  }
164505
164551
  return result.module;
@@ -164647,12 +164693,12 @@ var ts;
164647
164693
  };
164648
164694
  /*@internal*/
164649
164695
  Project.prototype.clearInvalidateResolutionOfFailedLookupTimer = function () {
164650
- return this.projectService.throttledOperations.cancel(this.getProjectName() + "FailedLookupInvalidation");
164696
+ return this.projectService.throttledOperations.cancel("".concat(this.getProjectName(), "FailedLookupInvalidation"));
164651
164697
  };
164652
164698
  /*@internal*/
164653
164699
  Project.prototype.scheduleInvalidateResolutionsOfFailedLookupLocations = function () {
164654
164700
  var _this = this;
164655
- this.projectService.throttledOperations.schedule(this.getProjectName() + "FailedLookupInvalidation", /*delay*/ 1000, function () {
164701
+ this.projectService.throttledOperations.schedule("".concat(this.getProjectName(), "FailedLookupInvalidation"), /*delay*/ 1000, function () {
164656
164702
  if (_this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {
164657
164703
  _this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this);
164658
164704
  }
@@ -164830,7 +164876,7 @@ var ts;
164830
164876
  return plugin.module.getExternalFiles(_this);
164831
164877
  }
164832
164878
  catch (e) {
164833
- _this.projectService.logger.info("A plugin threw an exception in getExternalFiles: " + e);
164879
+ _this.projectService.logger.info("A plugin threw an exception in getExternalFiles: ".concat(e));
164834
164880
  if (e.stack) {
164835
164881
  _this.projectService.logger.info(e.stack);
164836
164882
  }
@@ -164933,7 +164979,7 @@ var ts;
164933
164979
  }
164934
164980
  return ts.map(this.program.getSourceFiles(), function (sourceFile) {
164935
164981
  var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
164936
- ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '" + sourceFile.fileName + "' Path: '" + sourceFile.path + "' / '" + sourceFile.resolvedPath + "' is missing."; });
164982
+ ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '".concat(sourceFile.fileName, "' Path: '").concat(sourceFile.path, "' / '").concat(sourceFile.resolvedPath, "' is missing."); });
164937
164983
  return scriptInfo;
164938
164984
  });
164939
164985
  };
@@ -165176,7 +165222,7 @@ var ts;
165176
165222
  var _this = this;
165177
165223
  var oldProgram = this.program;
165178
165224
  ts.Debug.assert(!this.isClosed(), "Called update graph worker of closed project");
165179
- this.writeLog("Starting updateGraphWorker: Project: " + this.getProjectName());
165225
+ this.writeLog("Starting updateGraphWorker: Project: ".concat(this.getProjectName()));
165180
165226
  var start = ts.timestamp();
165181
165227
  this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution();
165182
165228
  this.resolutionCache.startCachingPerDirectoryResolution();
@@ -165278,7 +165324,7 @@ var ts;
165278
165324
  }, function (removed) { return _this.detachScriptInfoFromProject(removed); });
165279
165325
  var elapsed = ts.timestamp() - start;
165280
165326
  this.sendPerformanceEvent("UpdateGraph", elapsed);
165281
- this.writeLog("Finishing updateGraphWorker: Project: " + this.getProjectName() + " Version: " + this.getProjectVersion() + " structureChanged: " + hasNewProgram + (this.program ? " structureIsReused:: " + ts.StructureIsReused[this.program.structureIsReused] : "") + " Elapsed: " + elapsed + "ms");
165327
+ this.writeLog("Finishing updateGraphWorker: Project: ".concat(this.getProjectName(), " Version: ").concat(this.getProjectVersion(), " structureChanged: ").concat(hasNewProgram).concat(this.program ? " structureIsReused:: ".concat(ts.StructureIsReused[this.program.structureIsReused]) : "", " Elapsed: ").concat(elapsed, "ms"));
165282
165328
  if (this.hasAddedorRemovedFiles) {
165283
165329
  this.print(/*writeProjectFileNames*/ true);
165284
165330
  }
@@ -165338,7 +165384,7 @@ var ts;
165338
165384
  var path = this.toPath(sourceFile);
165339
165385
  if (this.generatedFilesMap) {
165340
165386
  if (isGeneratedFileWatcher(this.generatedFilesMap)) {
165341
- ts.Debug.fail(this.projectName + " Expected to not have --out watcher for generated file with options: " + JSON.stringify(this.compilerOptions));
165387
+ ts.Debug.fail("".concat(this.projectName, " Expected to not have --out watcher for generated file with options: ").concat(JSON.stringify(this.compilerOptions)));
165342
165388
  return;
165343
165389
  }
165344
165390
  if (this.generatedFilesMap.has(path))
@@ -165390,20 +165436,20 @@ var ts;
165390
165436
  if (!this.program)
165391
165437
  return "\tFiles (0) NoProgram\n";
165392
165438
  var sourceFiles = this.program.getSourceFiles();
165393
- var strBuilder = "\tFiles (" + sourceFiles.length + ")\n";
165439
+ var strBuilder = "\tFiles (".concat(sourceFiles.length, ")\n");
165394
165440
  if (writeProjectFileNames) {
165395
165441
  for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
165396
165442
  var file = sourceFiles_1[_i];
165397
- strBuilder += "\t" + file.fileName + "\n";
165443
+ strBuilder += "\t".concat(file.fileName, "\n");
165398
165444
  }
165399
165445
  strBuilder += "\n\n";
165400
- ts.explainFiles(this.program, function (s) { return strBuilder += "\t" + s + "\n"; });
165446
+ ts.explainFiles(this.program, function (s) { return strBuilder += "\t".concat(s, "\n"); });
165401
165447
  }
165402
165448
  return strBuilder;
165403
165449
  };
165404
165450
  /*@internal*/
165405
165451
  Project.prototype.print = function (writeProjectFileNames) {
165406
- this.writeLog("Project '" + this.projectName + "' (" + ProjectKind[this.projectKind] + ")");
165452
+ this.writeLog("Project '".concat(this.projectName, "' (").concat(ProjectKind[this.projectKind], ")"));
165407
165453
  this.writeLog(this.filesToString(writeProjectFileNames && this.projectService.logger.hasLevel(server.LogLevel.verbose)));
165408
165454
  this.writeLog("-----------------------------------------------");
165409
165455
  if (this.autoImportProviderHost) {
@@ -165565,7 +165611,7 @@ var ts;
165565
165611
  if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
165566
165612
  return "continue";
165567
165613
  // Provide global: true so plugins can detect why they can't find their config
165568
- this_1.projectService.logger.info("Loading global plugin " + globalPluginName);
165614
+ this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
165569
165615
  this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
165570
165616
  };
165571
165617
  var this_1 = this;
@@ -165578,9 +165624,9 @@ var ts;
165578
165624
  };
165579
165625
  Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) {
165580
165626
  var _this = this;
165581
- this.projectService.logger.info("Enabling plugin " + pluginConfigEntry.name + " from candidate paths: " + searchPaths.join(","));
165627
+ this.projectService.logger.info("Enabling plugin ".concat(pluginConfigEntry.name, " from candidate paths: ").concat(searchPaths.join(",")));
165582
165628
  if (!pluginConfigEntry.name || ts.parsePackageName(pluginConfigEntry.name).rest) {
165583
- this.projectService.logger.info("Skipped loading plugin " + (pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)) + " because only package name is allowed plugin name");
165629
+ this.projectService.logger.info("Skipped loading plugin ".concat(pluginConfigEntry.name || JSON.stringify(pluginConfigEntry), " because only package name is allowed plugin name"));
165584
165630
  return;
165585
165631
  }
165586
165632
  var log = function (message) { return _this.projectService.logger.info(message); };
@@ -165603,13 +165649,13 @@ var ts;
165603
165649
  }
165604
165650
  else {
165605
165651
  ts.forEach(errorLogs, log);
165606
- this.projectService.logger.info("Couldn't find " + pluginConfigEntry.name);
165652
+ this.projectService.logger.info("Couldn't find ".concat(pluginConfigEntry.name));
165607
165653
  }
165608
165654
  };
165609
165655
  Project.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
165610
165656
  try {
165611
165657
  if (typeof pluginModuleFactory !== "function") {
165612
- this.projectService.logger.info("Skipped loading plugin " + configEntry.name + " because it did not expose a proper factory function");
165658
+ this.projectService.logger.info("Skipped loading plugin ".concat(configEntry.name, " because it did not expose a proper factory function"));
165613
165659
  return;
165614
165660
  }
165615
165661
  var info = {
@@ -165626,7 +165672,7 @@ var ts;
165626
165672
  var k = _a[_i];
165627
165673
  // eslint-disable-next-line no-in-operator
165628
165674
  if (!(k in newLS)) {
165629
- this.projectService.logger.info("Plugin activation warning: Missing proxied method " + k + " in created LS. Patching.");
165675
+ this.projectService.logger.info("Plugin activation warning: Missing proxied method ".concat(k, " in created LS. Patching."));
165630
165676
  newLS[k] = this.languageService[k];
165631
165677
  }
165632
165678
  }
@@ -165635,7 +165681,7 @@ var ts;
165635
165681
  this.plugins.push({ name: configEntry.name, module: pluginModule });
165636
165682
  }
165637
165683
  catch (e) {
165638
- this.projectService.logger.info("Plugin activation failed: " + e);
165684
+ this.projectService.logger.info("Plugin activation failed: ".concat(e));
165639
165685
  }
165640
165686
  };
165641
165687
  /*@internal*/
@@ -166150,7 +166196,7 @@ var ts;
166150
166196
  var searchPaths = __spreadArray([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations, true);
166151
166197
  if (this.projectService.allowLocalPluginLoads) {
166152
166198
  var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
166153
- this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
166199
+ this.projectService.logger.info("Local plugin loading enabled; adding ".concat(local, " to search paths"));
166154
166200
  searchPaths.unshift(local);
166155
166201
  }
166156
166202
  // Enable tsconfig-specified plugins
@@ -166576,7 +166622,7 @@ var ts;
166576
166622
  return forEachAnyProjectReferenceKind(project, function (resolvedRef) { return callbackRefProject(project, cb, resolvedRef.sourceFile.path); }, function (projectRef) { return callbackRefProject(project, cb, project.toPath(ts.resolveProjectReferencePath(projectRef))); }, function (potentialProjectRef) { return callbackRefProject(project, cb, potentialProjectRef); });
166577
166623
  }
166578
166624
  function getDetailWatchInfo(watchType, project) {
166579
- return (ts.isString(project) ? "Config: " + project + " " : project ? "Project: " + project.getProjectName() + " " : "") + "WatchType: " + watchType;
166625
+ return "".concat(ts.isString(project) ? "Config: ".concat(project, " ") : project ? "Project: ".concat(project.getProjectName(), " ") : "", "WatchType: ").concat(watchType);
166580
166626
  }
166581
166627
  function isScriptInfoWatchedFromNodeModules(info) {
166582
166628
  return !info.isScriptOpen() && info.mTime !== undefined;
@@ -166781,7 +166827,7 @@ var ts;
166781
166827
  try {
166782
166828
  var fileContent = this.host.readFile(this.typesMapLocation); // TODO: GH#18217
166783
166829
  if (fileContent === undefined) {
166784
- this.logger.info("Provided types map file \"" + this.typesMapLocation + "\" doesn't exist");
166830
+ this.logger.info("Provided types map file \"".concat(this.typesMapLocation, "\" doesn't exist"));
166785
166831
  return;
166786
166832
  }
166787
166833
  var raw = JSON.parse(fileContent);
@@ -166799,7 +166845,7 @@ var ts;
166799
166845
  }
166800
166846
  }
166801
166847
  catch (e) {
166802
- this.logger.info("Error loading types map: " + e);
166848
+ this.logger.info("Error loading types map: ".concat(e));
166803
166849
  this.safelist = defaultTypeSafeList;
166804
166850
  this.legacySafelist.clear();
166805
166851
  }
@@ -167121,7 +167167,7 @@ var ts;
167121
167167
  var fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
167122
167168
  if (ts.getBaseFileName(fileOrDirectoryPath) === "package.json" && !ts.isInsideNodeModules(fileOrDirectoryPath) &&
167123
167169
  (fsResult && fsResult.fileExists || !fsResult && _this.host.fileExists(fileOrDirectoryPath))) {
167124
- _this.logger.info("Config: " + configFileName + " Detected new package.json: " + fileOrDirectory);
167170
+ _this.logger.info("Config: ".concat(configFileName, " Detected new package.json: ").concat(fileOrDirectory));
167125
167171
  _this.onAddPackageJson(fileOrDirectoryPath);
167126
167172
  }
167127
167173
  var configuredProjectForConfig = _this.findConfiguredProjectByProjectName(configFileName);
@@ -167244,13 +167290,13 @@ var ts;
167244
167290
  project.print(/*writeProjectFileNames*/ true);
167245
167291
  project.close();
167246
167292
  if (ts.Debug.shouldAssert(1 /* Normal */)) {
167247
- this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return project.projectName + ": ScriptInfos still attached: " + JSON.stringify(ts.arrayFrom(ts.mapDefinedIterator(_this.filenameToScriptInfo.values(), function (info) { return info.isAttached(project) ?
167293
+ this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return "".concat(project.projectName, ": ScriptInfos still attached: ").concat(JSON.stringify(ts.arrayFrom(ts.mapDefinedIterator(_this.filenameToScriptInfo.values(), function (info) { return info.isAttached(project) ?
167248
167294
  {
167249
167295
  fileName: info.fileName,
167250
167296
  projects: info.containingProjects.map(function (p) { return p.projectName; }),
167251
167297
  hasMixedContent: info.hasMixedContent
167252
167298
  } : undefined; })),
167253
- /*replacer*/ undefined, " "); }); });
167299
+ /*replacer*/ undefined, " ")); }); });
167254
167300
  }
167255
167301
  // Remove the project from pending project updates
167256
167302
  this.pendingProjectUpdates.delete(project.getProjectName());
@@ -167651,15 +167697,15 @@ var ts;
167651
167697
  if (result !== undefined)
167652
167698
  return result || undefined;
167653
167699
  }
167654
- this.logger.info("Search path: " + ts.getDirectoryPath(info.fileName));
167700
+ this.logger.info("Search path: ".concat(ts.getDirectoryPath(info.fileName)));
167655
167701
  var configFileName = this.forEachConfigFileLocation(info, function (canonicalConfigFilePath, configFileName) {
167656
167702
  return _this.configFileExists(configFileName, canonicalConfigFilePath, info);
167657
167703
  });
167658
167704
  if (configFileName) {
167659
- this.logger.info("For info: " + info.fileName + " :: Config file name: " + configFileName);
167705
+ this.logger.info("For info: ".concat(info.fileName, " :: Config file name: ").concat(configFileName));
167660
167706
  }
167661
167707
  else {
167662
- this.logger.info("For info: " + info.fileName + " :: No config files found.");
167708
+ this.logger.info("For info: ".concat(info.fileName, " :: No config files found."));
167663
167709
  }
167664
167710
  if (isOpenScriptInfo(info)) {
167665
167711
  this.configFileForOpenFiles.set(info.path, configFileName || false);
@@ -167678,8 +167724,8 @@ var ts;
167678
167724
  this.logger.info("Open files: ");
167679
167725
  this.openFiles.forEach(function (projectRootPath, path) {
167680
167726
  var info = _this.getScriptInfoForPath(path);
167681
- _this.logger.info("\tFileName: " + info.fileName + " ProjectRootPath: " + projectRootPath);
167682
- _this.logger.info("\t\tProjects: " + info.containingProjects.map(function (p) { return p.getProjectName(); }));
167727
+ _this.logger.info("\tFileName: ".concat(info.fileName, " ProjectRootPath: ").concat(projectRootPath));
167728
+ _this.logger.info("\t\tProjects: ".concat(info.containingProjects.map(function (p) { return p.getProjectName(); })));
167683
167729
  });
167684
167730
  this.logger.endGroup();
167685
167731
  };
@@ -167718,7 +167764,7 @@ var ts;
167718
167764
  .map(function (name) { return ({ name: name, size: _this.host.getFileSize(name) }); })
167719
167765
  .sort(function (a, b) { return b.size - a.size; })
167720
167766
  .slice(0, 5);
167721
- this.logger.info("Non TS file size exceeded limit (" + totalNonTsFileSize + "). Largest files: " + top5LargestFiles.map(function (file) { return file.name + ":" + file.size; }).join(", "));
167767
+ this.logger.info("Non TS file size exceeded limit (".concat(totalNonTsFileSize, "). Largest files: ").concat(top5LargestFiles.map(function (file) { return "".concat(file.name, ":").concat(file.size); }).join(", ")));
167722
167768
  // Keep the size as zero since it's disabled
167723
167769
  return fileName;
167724
167770
  }
@@ -167787,7 +167833,7 @@ var ts;
167787
167833
  };
167788
167834
  /* @internal */
167789
167835
  ProjectService.prototype.createConfiguredProject = function (configFileName) {
167790
- this.logger.info("Creating configuration project " + configFileName);
167836
+ this.logger.info("Creating configuration project ".concat(configFileName));
167791
167837
  var canonicalConfigFilePath = server.asNormalizedPath(this.toCanonicalFileName(configFileName));
167792
167838
  var configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
167793
167839
  // We could be in this scenario if project is the configured project tracked by external project
@@ -167898,12 +167944,12 @@ var ts;
167898
167944
  if (parsedCommandLine.errors.length) {
167899
167945
  configFileErrors.push.apply(configFileErrors, parsedCommandLine.errors);
167900
167946
  }
167901
- this.logger.info("Config: " + configFilename + " : " + JSON.stringify({
167947
+ this.logger.info("Config: ".concat(configFilename, " : ").concat(JSON.stringify({
167902
167948
  rootNames: parsedCommandLine.fileNames,
167903
167949
  options: parsedCommandLine.options,
167904
167950
  watchOptions: parsedCommandLine.watchOptions,
167905
167951
  projectReferences: parsedCommandLine.projectReferences
167906
- }, /*replacer*/ undefined, " "));
167952
+ }, /*replacer*/ undefined, " ")));
167907
167953
  var oldCommandLine = (_b = configFileExistenceInfo.config) === null || _b === void 0 ? void 0 : _b.parsedCommandLine;
167908
167954
  if (!configFileExistenceInfo.config) {
167909
167955
  configFileExistenceInfo.config = { parsedCommandLine: parsedCommandLine, cachedDirectoryStructureHost: cachedDirectoryStructureHost, projects: new ts.Map() };
@@ -167933,7 +167979,7 @@ var ts;
167933
167979
  // Update projects
167934
167980
  var ensureProjectsForOpenFiles = false;
167935
167981
  (_a = _this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (canonicalPath) {
167936
- ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file " + extendedConfigFileName + " detected") || ensureProjectsForOpenFiles;
167982
+ ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file ".concat(extendedConfigFileName, " detected")) || ensureProjectsForOpenFiles;
167937
167983
  });
167938
167984
  if (ensureProjectsForOpenFiles)
167939
167985
  _this.delayEnsureProjectForOpenFiles();
@@ -168089,7 +168135,7 @@ var ts;
168089
168135
  // Clear the cache since we are reloading the project from disk
168090
168136
  host.clearCache();
168091
168137
  var configFileName = project.getConfigFilePath();
168092
- this.logger.info((isInitialLoad ? "Loading" : "Reloading") + " configured project " + configFileName);
168138
+ this.logger.info("".concat(isInitialLoad ? "Loading" : "Reloading", " configured project ").concat(configFileName));
168093
168139
  // Load project from the disk
168094
168140
  this.loadConfiguredProject(project, reason);
168095
168141
  project.updateGraph();
@@ -168228,7 +168274,7 @@ var ts;
168228
168274
  var path = _a[0], scriptInfo = _a[1];
168229
168275
  return ({ path: path, fileName: scriptInfo.fileName });
168230
168276
  });
168231
- this.logger.msg("Could not find file " + JSON.stringify(fileName) + ".\nAll files are: " + JSON.stringify(names), server.Msg.Err);
168277
+ this.logger.msg("Could not find file ".concat(JSON.stringify(fileName), ".\nAll files are: ").concat(JSON.stringify(names)), server.Msg.Err);
168232
168278
  };
168233
168279
  /**
168234
168280
  * Returns the projects that contain script info through SymLink
@@ -168412,9 +168458,9 @@ var ts;
168412
168458
  var info = this.getScriptInfoForPath(path);
168413
168459
  if (!info) {
168414
168460
  var isDynamic = server.isDynamicFileName(fileName);
168415
- ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory"; });
168416
- ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names"; });
168417
- ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }) + "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."; });
168461
+ ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory"); });
168462
+ ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names"); });
168463
+ ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."); });
168418
168464
  // If the file is not opened by client and the file doesnot exist on the disk, return
168419
168465
  if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
168420
168466
  return;
@@ -168593,13 +168639,13 @@ var ts;
168593
168639
  var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file));
168594
168640
  if (info) {
168595
168641
  info.setOptions(convertFormatOptions(args.formatOptions), args.preferences);
168596
- this.logger.info("Host configuration update for file " + args.file);
168642
+ this.logger.info("Host configuration update for file ".concat(args.file));
168597
168643
  }
168598
168644
  }
168599
168645
  else {
168600
168646
  if (args.hostInfo !== undefined) {
168601
168647
  this.hostConfiguration.hostInfo = args.hostInfo;
168602
- this.logger.info("Host information " + args.hostInfo);
168648
+ this.logger.info("Host information ".concat(args.hostInfo));
168603
168649
  }
168604
168650
  if (args.formatOptions) {
168605
168651
  this.hostConfiguration.formatCodeOptions = __assign(__assign({}, this.hostConfiguration.formatCodeOptions), convertFormatOptions(args.formatOptions));
@@ -168631,7 +168677,7 @@ var ts;
168631
168677
  }
168632
168678
  if (args.watchOptions) {
168633
168679
  this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions;
168634
- this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches.");
168680
+ this.logger.info("Host watch options changed to ".concat(JSON.stringify(this.hostConfiguration.watchOptions), ", it will be take effect for next watches."));
168635
168681
  }
168636
168682
  }
168637
168683
  };
@@ -168843,7 +168889,7 @@ var ts;
168843
168889
  ? originalLocation
168844
168890
  : location;
168845
168891
  }
168846
- configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: " + originalFileInfo.fileName + (location !== originalLocation ? " for location: " + location.fileName : ""));
168892
+ configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: ".concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
168847
168893
  }
168848
168894
  updateProjectIfDirty(configuredProject);
168849
168895
  var projectContainsOriginalInfo = function (project) {
@@ -168855,7 +168901,7 @@ var ts;
168855
168901
  configuredProject = forEachResolvedProjectReferenceProject(configuredProject, fileName, function (child) {
168856
168902
  updateProjectIfDirty(child);
168857
168903
  return projectContainsOriginalInfo(child) ? child : undefined;
168858
- }, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution " + configuredProject.projectName + " to find possible configured project for original file: " + originalFileInfo.fileName + (location !== originalLocation ? " for location: " + location.fileName : ""));
168904
+ }, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(configuredProject.projectName, " to find possible configured project for original file: ").concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
168859
168905
  if (!configuredProject)
168860
168906
  return undefined;
168861
168907
  if (configuredProject === project)
@@ -168909,7 +168955,7 @@ var ts;
168909
168955
  if (configFileName) {
168910
168956
  project = this.findConfiguredProjectByProjectName(configFileName);
168911
168957
  if (!project) {
168912
- project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for " + info.fileName + " to open");
168958
+ project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for ".concat(info.fileName, " to open"));
168913
168959
  defaultConfigProjectIsCreated = true;
168914
168960
  }
168915
168961
  else {
@@ -168939,7 +168985,7 @@ var ts;
168939
168985
  if (!projectForConfigFileDiag && child.containsScriptInfo(info)) {
168940
168986
  projectForConfigFileDiag = child;
168941
168987
  }
168942
- }, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution " + project.projectName + " to find possible configured project for " + info.fileName + " to open");
168988
+ }, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(project.projectName, " to find possible configured project for ").concat(info.fileName, " to open"));
168943
168989
  }
168944
168990
  // Send the event only if the project got created as part of this open request and info is part of the project
168945
168991
  if (projectForConfigFileDiag) {
@@ -169001,7 +169047,7 @@ var ts;
169001
169047
  return;
169002
169048
  // find or delay load the project
169003
169049
  var ancestor = this.findConfiguredProjectByProjectName(configFileName) ||
169004
- this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project " + project.getProjectName() + " of open file " + info.fileName);
169050
+ this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project ".concat(project.getProjectName(), " of open file ").concat(info.fileName));
169005
169051
  if (ancestor.isInitialLoadPending()) {
169006
169052
  // Set a potential project reference
169007
169053
  ancestor.setPotentialProjectReference(project.canonicalConfigFilePath);
@@ -169044,7 +169090,7 @@ var ts;
169044
169090
  // Load this project,
169045
169091
  var configFileName = server.toNormalizedPath(child.sourceFile.fileName);
169046
169092
  var childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) ||
169047
- project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : " + project.projectName + " as it references project " + referencedProject.sourceFile.fileName);
169093
+ project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : ".concat(project.projectName, " as it references project ").concat(referencedProject.sourceFile.fileName));
169048
169094
  updateProjectIfDirty(childProject);
169049
169095
  // Ensure children for this project
169050
169096
  this.ensureProjectChildren(childProject, forProjects, seenProjects);
@@ -169345,7 +169391,7 @@ var ts;
169345
169391
  for (var _b = 0, normalizedNames_1 = normalizedNames; _b < normalizedNames_1.length; _b++) {
169346
169392
  var root = normalizedNames_1[_b];
169347
169393
  if (rule.match.test(root)) {
169348
- this_2.logger.info("Excluding files based on rule " + name + " matching file '" + root + "'");
169394
+ this_2.logger.info("Excluding files based on rule ".concat(name, " matching file '").concat(root, "'"));
169349
169395
  // If the file matches, collect its types packages and exclude rules
169350
169396
  if (rule.types) {
169351
169397
  for (var _c = 0, _d = rule.types; _c < _d.length; _c++) {
@@ -169370,7 +169416,7 @@ var ts;
169370
169416
  if (typeof groupNumberOrString === "number") {
169371
169417
  if (!ts.isString(groups[groupNumberOrString])) {
169372
169418
  // Specification was wrong - exclude nothing!
169373
- _this.logger.info("Incorrect RegExp specification in safelist rule " + name + " - not enough groups");
169419
+ _this.logger.info("Incorrect RegExp specification in safelist rule ".concat(name, " - not enough groups"));
169374
169420
  // * can't appear in a filename; escape it because it's feeding into a RegExp
169375
169421
  return "\\*";
169376
169422
  }
@@ -169418,7 +169464,7 @@ var ts;
169418
169464
  var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName);
169419
169465
  var typeName = this_3.legacySafelist.get(cleanedTypingName);
169420
169466
  if (typeName !== undefined) {
169421
- this_3.logger.info("Excluded '" + normalizedNames[i] + "' because it matched " + cleanedTypingName + " from the legacy safelist");
169467
+ this_3.logger.info("Excluded '".concat(normalizedNames[i], "' because it matched ").concat(cleanedTypingName, " from the legacy safelist"));
169422
169468
  excludedFiles.push(normalizedNames[i]);
169423
169469
  // *exclude* it from the project...
169424
169470
  exclude = true;
@@ -169548,8 +169594,8 @@ var ts;
169548
169594
  if (!project) {
169549
169595
  // errors are stored in the project, do not need to update the graph
169550
169596
  project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ?
169551
- this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: " + proj.projectFileName) :
169552
- this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: " + proj.projectFileName);
169597
+ this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName)) :
169598
+ this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName));
169553
169599
  }
169554
169600
  if (project && !ts.contains(exisingConfigFiles, tsconfigFile)) {
169555
169601
  // keep project alive even if no documents are opened - its lifetime is bound to the lifetime of containing external project
@@ -169787,7 +169833,7 @@ var ts;
169787
169833
  return cache || (cache = new ts.Map());
169788
169834
  }
169789
169835
  function key(fromFileName, preferences) {
169790
- return fromFileName + "," + preferences.importModuleSpecifierEnding + "," + preferences.importModuleSpecifierPreference;
169836
+ return "".concat(fromFileName, ",").concat(preferences.importModuleSpecifierEnding, ",").concat(preferences.importModuleSpecifierPreference);
169791
169837
  }
169792
169838
  function createInfo(modulePaths, moduleSpecifiers, isAutoImportable) {
169793
169839
  return { modulePaths: modulePaths, moduleSpecifiers: moduleSpecifiers, isAutoImportable: isAutoImportable };
@@ -169946,10 +169992,10 @@ var ts;
169946
169992
  var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
169947
169993
  var json = JSON.stringify(msg);
169948
169994
  if (verboseLogging) {
169949
- logger.info(msg.type + ":" + server.indent(json));
169995
+ logger.info("".concat(msg.type, ":").concat(server.indent(json)));
169950
169996
  }
169951
169997
  var len = byteLength(json, "utf8");
169952
- return "Content-Length: " + (1 + len) + "\r\n\r\n" + json + newLine;
169998
+ return "Content-Length: ".concat(1 + len, "\r\n\r\n").concat(json).concat(newLine);
169953
169999
  }
169954
170000
  server.formatMessage = formatMessage;
169955
170001
  /**
@@ -170014,7 +170060,7 @@ var ts;
170014
170060
  }
170015
170061
  else {
170016
170062
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("session" /* Session */, "stepError", { seq: this.requestId, message: e.message });
170017
- this.operationHost.logError(e, "delayed processing of request " + this.requestId);
170063
+ this.operationHost.logError(e, "delayed processing of request ".concat(this.requestId));
170018
170064
  }
170019
170065
  }
170020
170066
  if (stop || !this.hasPendingWork()) {
@@ -170799,14 +170845,14 @@ var ts;
170799
170845
  case ts.LanguageServiceMode.PartialSemantic:
170800
170846
  invalidPartialSemanticModeCommands.forEach(function (commandName) {
170801
170847
  return _this.handlers.set(commandName, function (request) {
170802
- throw new Error("Request: " + request.command + " not allowed in LanguageServiceMode.PartialSemantic");
170848
+ throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.PartialSemantic"));
170803
170849
  });
170804
170850
  });
170805
170851
  break;
170806
170852
  case ts.LanguageServiceMode.Syntactic:
170807
170853
  invalidSyntacticModeCommands.forEach(function (commandName) {
170808
170854
  return _this.handlers.set(commandName, function (request) {
170809
- throw new Error("Request: " + request.command + " not allowed in LanguageServiceMode.Syntactic");
170855
+ throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.Syntactic"));
170810
170856
  });
170811
170857
  });
170812
170858
  break;
@@ -170881,7 +170927,7 @@ var ts;
170881
170927
  };
170882
170928
  Session.prototype.projectsUpdatedInBackgroundEvent = function (openFiles) {
170883
170929
  var _this = this;
170884
- this.projectService.logger.info("got projects updated in background, updating diagnostics for " + openFiles);
170930
+ this.projectService.logger.info("got projects updated in background, updating diagnostics for ".concat(openFiles));
170885
170931
  if (openFiles.length) {
170886
170932
  if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
170887
170933
  // For now only queue error checking for open files. We can change this to include non open files as well
@@ -170911,17 +170957,17 @@ var ts;
170911
170957
  var scriptInfo = project.getScriptInfoForNormalizedPath(file);
170912
170958
  if (scriptInfo) {
170913
170959
  var text = ts.getSnapshotText(scriptInfo.getSnapshot());
170914
- msg += "\n\nFile text of " + fileRequest.file + ":" + server.indent(text) + "\n";
170960
+ msg += "\n\nFile text of ".concat(fileRequest.file, ":").concat(server.indent(text), "\n");
170915
170961
  }
170916
170962
  }
170917
170963
  catch (_b) { } // eslint-disable-line no-empty
170918
170964
  }
170919
170965
  if (err.ProgramFiles) {
170920
- msg += "\n\nProgram files: " + JSON.stringify(err.ProgramFiles) + "\n";
170966
+ msg += "\n\nProgram files: ".concat(JSON.stringify(err.ProgramFiles), "\n");
170921
170967
  msg += "\n\nProjects::\n";
170922
170968
  var counter_1 = 0;
170923
170969
  var addProjectInfo = function (project) {
170924
- msg += "\nProject '" + project.projectName + "' (" + server.ProjectKind[project.projectKind] + ") " + counter_1 + "\n";
170970
+ msg += "\nProject '".concat(project.projectName, "' (").concat(server.ProjectKind[project.projectKind], ") ").concat(counter_1, "\n");
170925
170971
  msg += project.filesToString(/*writeProjectFileNames*/ true);
170926
170972
  msg += "\n-----------------------------------------------\n";
170927
170973
  counter_1++;
@@ -170936,12 +170982,12 @@ var ts;
170936
170982
  Session.prototype.send = function (msg) {
170937
170983
  if (msg.type === "event" && !this.canUseEvents) {
170938
170984
  if (this.logger.hasLevel(server.LogLevel.verbose)) {
170939
- this.logger.info("Session does not support events: ignored event: " + JSON.stringify(msg));
170985
+ this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
170940
170986
  }
170941
170987
  return;
170942
170988
  }
170943
170989
  var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
170944
- ts.perfLogger.logEvent("Response message size: " + msgText.length);
170990
+ ts.perfLogger.logEvent("Response message size: ".concat(msgText.length));
170945
170991
  this.host.write(msgText);
170946
170992
  };
170947
170993
  Session.prototype.event = function (body, eventName) {
@@ -171079,7 +171125,7 @@ var ts;
171079
171125
  if (!projects) {
171080
171126
  return;
171081
171127
  }
171082
- this.logger.info("cleaning " + caption);
171128
+ this.logger.info("cleaning ".concat(caption));
171083
171129
  for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
171084
171130
  var p = projects_4[_i];
171085
171131
  p.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache();
@@ -171493,7 +171539,7 @@ var ts;
171493
171539
  var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
171494
171540
  return {
171495
171541
  refs: refs,
171496
- symbolName: "\"" + args.file + "\""
171542
+ symbolName: "\"".concat(args.file, "\"")
171497
171543
  };
171498
171544
  };
171499
171545
  /**
@@ -172037,7 +172083,7 @@ var ts;
172037
172083
  });
172038
172084
  var badCode = args.errorCodes.find(function (c) { return !existingDiagCodes_1.includes(c); });
172039
172085
  if (badCode !== undefined) {
172040
- e.message = "BADCLIENT: Bad error code, " + badCode + " not found in range " + startPosition + ".." + endPosition + " (found: " + existingDiagCodes_1.join(", ") + "); could have caused this error:\n" + e.message;
172086
+ e.message = "BADCLIENT: Bad error code, ".concat(badCode, " not found in range ").concat(startPosition, "..").concat(endPosition, " (found: ").concat(existingDiagCodes_1.join(", "), "); could have caused this error:\n").concat(e.message);
172041
172087
  }
172042
172088
  throw e;
172043
172089
  }
@@ -172314,7 +172360,7 @@ var ts;
172314
172360
  };
172315
172361
  Session.prototype.addProtocolHandler = function (command, handler) {
172316
172362
  if (this.handlers.has(command)) {
172317
- throw new Error("Protocol handler already exists for command \"" + command + "\"");
172363
+ throw new Error("Protocol handler already exists for command \"".concat(command, "\""));
172318
172364
  }
172319
172365
  this.handlers.set(command, handler);
172320
172366
  };
@@ -172343,8 +172389,8 @@ var ts;
172343
172389
  return this.executeWithRequestId(request.seq, function () { return handler(request); });
172344
172390
  }
172345
172391
  else {
172346
- this.logger.msg("Unrecognized JSON command:" + server.stringifyIndented(request), server.Msg.Err);
172347
- this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: " + request.command);
172392
+ this.logger.msg("Unrecognized JSON command:".concat(server.stringifyIndented(request)), server.Msg.Err);
172393
+ this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: ".concat(request.command));
172348
172394
  return { responseRequired: false };
172349
172395
  }
172350
172396
  };
@@ -172355,7 +172401,7 @@ var ts;
172355
172401
  if (this.logger.hasLevel(server.LogLevel.requestTime)) {
172356
172402
  start = this.hrtime();
172357
172403
  if (this.logger.hasLevel(server.LogLevel.verbose)) {
172358
- this.logger.info("request:" + server.indent(this.toStringMessage(message)));
172404
+ this.logger.info("request:".concat(server.indent(this.toStringMessage(message))));
172359
172405
  }
172360
172406
  }
172361
172407
  var request;
@@ -172371,10 +172417,10 @@ var ts;
172371
172417
  if (this.logger.hasLevel(server.LogLevel.requestTime)) {
172372
172418
  var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
172373
172419
  if (responseRequired) {
172374
- this.logger.perftrc(request.seq + "::" + request.command + ": elapsed time (in milliseconds) " + elapsedTime);
172420
+ this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": elapsed time (in milliseconds) ").concat(elapsedTime));
172375
172421
  }
172376
172422
  else {
172377
- this.logger.perftrc(request.seq + "::" + request.command + ": async elapsed time (in milliseconds) " + elapsedTime);
172423
+ this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": async elapsed time (in milliseconds) ").concat(elapsedTime));
172378
172424
  }
172379
172425
  }
172380
172426
  // Note: Log before writing the response, else the editor can complete its activity before the server does