typescript 4.5.0-dev.20211101 → 4.5.4

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.
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20211101";
92
+ ts.version = "4.5.4";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -130,7 +130,7 @@ var ts;
130
130
  var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
131
131
  if (constructor)
132
132
  return constructor;
133
- throw new Error("TypeScript requires an environment that provides a compatible native " + name + " implementation.");
133
+ throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
134
134
  }
135
135
  })(ts || (ts = {}));
136
136
  /* @internal */
@@ -1493,7 +1493,7 @@ var ts;
1493
1493
  function cast(value, test) {
1494
1494
  if (value !== undefined && test(value))
1495
1495
  return value;
1496
- return ts.Debug.fail("Invalid cast. The supplied value " + value + " did not pass the test '" + ts.Debug.getFunctionName(test) + "'.");
1496
+ return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
1497
1497
  }
1498
1498
  ts.cast = cast;
1499
1499
  /** Does nothing. */
@@ -1584,7 +1584,7 @@ var ts;
1584
1584
  function memoizeOne(callback) {
1585
1585
  var map = new ts.Map();
1586
1586
  return function (arg) {
1587
- var key = typeof arg + ":" + arg;
1587
+ var key = "".concat(typeof arg, ":").concat(arg);
1588
1588
  var value = map.get(key);
1589
1589
  if (value === undefined && !map.has(key)) {
1590
1590
  value = callback(arg);
@@ -2034,7 +2034,7 @@ var ts;
2034
2034
  ts.createGetCanonicalFileName = createGetCanonicalFileName;
2035
2035
  function patternText(_a) {
2036
2036
  var prefix = _a.prefix, suffix = _a.suffix;
2037
- return prefix + "*" + suffix;
2037
+ return "".concat(prefix, "*").concat(suffix);
2038
2038
  }
2039
2039
  ts.patternText = patternText;
2040
2040
  /**
@@ -2347,7 +2347,7 @@ var ts;
2347
2347
  }
2348
2348
  function fail(message, stackCrawlMark) {
2349
2349
  debugger;
2350
- var e = new Error(message ? "Debug Failure. " + message : "Debug Failure.");
2350
+ var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
2351
2351
  if (Error.captureStackTrace) {
2352
2352
  Error.captureStackTrace(e, stackCrawlMark || fail);
2353
2353
  }
@@ -2355,12 +2355,12 @@ var ts;
2355
2355
  }
2356
2356
  Debug.fail = fail;
2357
2357
  function failBadSyntaxKind(node, message, stackCrawlMark) {
2358
- return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind);
2358
+ return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
2359
2359
  }
2360
2360
  Debug.failBadSyntaxKind = failBadSyntaxKind;
2361
2361
  function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
2362
2362
  if (!expression) {
2363
- message = message ? "False expression: " + message : "False expression.";
2363
+ message = message ? "False expression: ".concat(message) : "False expression.";
2364
2364
  if (verboseDebugInfo) {
2365
2365
  message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
2366
2366
  }
@@ -2370,26 +2370,26 @@ var ts;
2370
2370
  Debug.assert = assert;
2371
2371
  function assertEqual(a, b, msg, msg2, stackCrawlMark) {
2372
2372
  if (a !== b) {
2373
- var message = msg ? msg2 ? msg + " " + msg2 : msg : "";
2374
- fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual);
2373
+ var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
2374
+ fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
2375
2375
  }
2376
2376
  }
2377
2377
  Debug.assertEqual = assertEqual;
2378
2378
  function assertLessThan(a, b, msg, stackCrawlMark) {
2379
2379
  if (a >= b) {
2380
- fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan);
2380
+ fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
2381
2381
  }
2382
2382
  }
2383
2383
  Debug.assertLessThan = assertLessThan;
2384
2384
  function assertLessThanOrEqual(a, b, stackCrawlMark) {
2385
2385
  if (a > b) {
2386
- fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual);
2386
+ fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
2387
2387
  }
2388
2388
  }
2389
2389
  Debug.assertLessThanOrEqual = assertLessThanOrEqual;
2390
2390
  function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
2391
2391
  if (a < b) {
2392
- fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual);
2392
+ fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
2393
2393
  }
2394
2394
  }
2395
2395
  Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
@@ -2430,42 +2430,42 @@ var ts;
2430
2430
  function assertNever(member, message, stackCrawlMark) {
2431
2431
  if (message === void 0) { message = "Illegal value:"; }
2432
2432
  var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2433
- return fail(message + " " + detail, stackCrawlMark || assertNever);
2433
+ return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
2434
2434
  }
2435
2435
  Debug.assertNever = assertNever;
2436
2436
  function assertEachNode(nodes, test, message, stackCrawlMark) {
2437
2437
  if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
2438
- assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode);
2438
+ assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
2439
2439
  }
2440
2440
  }
2441
2441
  Debug.assertEachNode = assertEachNode;
2442
2442
  function assertNode(node, test, message, stackCrawlMark) {
2443
2443
  if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
2444
- 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);
2444
+ 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);
2445
2445
  }
2446
2446
  }
2447
2447
  Debug.assertNode = assertNode;
2448
2448
  function assertNotNode(node, test, message, stackCrawlMark) {
2449
2449
  if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
2450
- 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);
2450
+ 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);
2451
2451
  }
2452
2452
  }
2453
2453
  Debug.assertNotNode = assertNotNode;
2454
2454
  function assertOptionalNode(node, test, message, stackCrawlMark) {
2455
2455
  if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
2456
- 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);
2456
+ 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);
2457
2457
  }
2458
2458
  }
2459
2459
  Debug.assertOptionalNode = assertOptionalNode;
2460
2460
  function assertOptionalToken(node, kind, message, stackCrawlMark) {
2461
2461
  if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
2462
- 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);
2462
+ 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);
2463
2463
  }
2464
2464
  }
2465
2465
  Debug.assertOptionalToken = assertOptionalToken;
2466
2466
  function assertMissingNode(node, message, stackCrawlMark) {
2467
2467
  if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
2468
- assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode);
2468
+ assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
2469
2469
  }
2470
2470
  }
2471
2471
  Debug.assertMissingNode = assertMissingNode;
@@ -2486,7 +2486,7 @@ var ts;
2486
2486
  }
2487
2487
  Debug.getFunctionName = getFunctionName;
2488
2488
  function formatSymbol(symbol) {
2489
- return "{ name: " + ts.unescapeLeadingUnderscores(symbol.escapedName) + "; flags: " + formatSymbolFlags(symbol.flags) + "; declarations: " + ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }) + " }";
2489
+ return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
2490
2490
  }
2491
2491
  Debug.formatSymbol = formatSymbol;
2492
2492
  /**
@@ -2507,7 +2507,7 @@ var ts;
2507
2507
  break;
2508
2508
  }
2509
2509
  if (enumValue !== 0 && enumValue & value) {
2510
- result = "" + result + (result ? "|" : "") + enumName;
2510
+ result = "".concat(result).concat(result ? "|" : "").concat(enumName);
2511
2511
  remainingFlags &= ~enumValue;
2512
2512
  }
2513
2513
  }
@@ -2617,7 +2617,7 @@ var ts;
2617
2617
  this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
2618
2618
  "UnknownFlow";
2619
2619
  var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
2620
- return "" + flowHeader + (remainingFlags ? " (" + formatFlowFlags(remainingFlags) + ")" : "");
2620
+ return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
2621
2621
  }
2622
2622
  },
2623
2623
  __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
@@ -2656,7 +2656,7 @@ var ts;
2656
2656
  // We don't care, this is debug code that's only enabled with a debugger attached -
2657
2657
  // we're just taking note of it for anyone checking regex performance in the future.
2658
2658
  defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
2659
- return "NodeArray " + defaultValue;
2659
+ return "NodeArray ".concat(defaultValue);
2660
2660
  }
2661
2661
  }
2662
2662
  });
@@ -2711,7 +2711,7 @@ var ts;
2711
2711
  var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
2712
2712
  "Symbol";
2713
2713
  var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
2714
- return symbolHeader + " '" + ts.symbolName(this) + "'" + (remainingSymbolFlags ? " (" + formatSymbolFlags(remainingSymbolFlags) + ")" : "");
2714
+ return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
2715
2715
  }
2716
2716
  },
2717
2717
  __debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
@@ -2721,11 +2721,11 @@ var ts;
2721
2721
  __tsDebuggerDisplay: {
2722
2722
  value: function () {
2723
2723
  var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
2724
- this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType " + JSON.stringify(this.value) :
2725
- this.flags & 2048 /* BigIntLiteral */ ? "LiteralType " + (this.value.negative ? "-" : "") + this.value.base10Value + "n" :
2724
+ this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
2725
+ this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
2726
2726
  this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
2727
2727
  this.flags & 32 /* Enum */ ? "EnumType" :
2728
- this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType " + this.intrinsicName :
2728
+ this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
2729
2729
  this.flags & 1048576 /* Union */ ? "UnionType" :
2730
2730
  this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
2731
2731
  this.flags & 4194304 /* Index */ ? "IndexType" :
@@ -2744,7 +2744,7 @@ var ts;
2744
2744
  "ObjectType" :
2745
2745
  "Type";
2746
2746
  var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
2747
- return "" + typeHeader + (this.symbol ? " '" + ts.symbolName(this.symbol) + "'" : "") + (remainingObjectFlags ? " (" + formatObjectFlags(remainingObjectFlags) + ")" : "");
2747
+ return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
2748
2748
  }
2749
2749
  },
2750
2750
  __debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
@@ -2780,11 +2780,11 @@ var ts;
2780
2780
  __tsDebuggerDisplay: {
2781
2781
  value: function () {
2782
2782
  var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
2783
- ts.isIdentifier(this) ? "Identifier '" + ts.idText(this) + "'" :
2784
- ts.isPrivateIdentifier(this) ? "PrivateIdentifier '" + ts.idText(this) + "'" :
2785
- ts.isStringLiteral(this) ? "StringLiteral " + JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...") :
2786
- ts.isNumericLiteral(this) ? "NumericLiteral " + this.text :
2787
- ts.isBigIntLiteral(this) ? "BigIntLiteral " + this.text + "n" :
2783
+ ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
2784
+ ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
2785
+ ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
2786
+ ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
2787
+ ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
2788
2788
  ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
2789
2789
  ts.isParameter(this) ? "ParameterDeclaration" :
2790
2790
  ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
@@ -2816,7 +2816,7 @@ var ts;
2816
2816
  ts.isNamedTupleMember(this) ? "NamedTupleMember" :
2817
2817
  ts.isImportTypeNode(this) ? "ImportTypeNode" :
2818
2818
  formatSyntaxKind(this.kind);
2819
- return "" + nodeHeader + (this.flags ? " (" + formatNodeFlags(this.flags) + ")" : "");
2819
+ return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
2820
2820
  }
2821
2821
  },
2822
2822
  __debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
@@ -2863,10 +2863,10 @@ var ts;
2863
2863
  Debug.enableDebugInfo = enableDebugInfo;
2864
2864
  function formatDeprecationMessage(name, error, errorAfter, since, message) {
2865
2865
  var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
2866
- deprecationMessage += "'" + name + "' ";
2867
- deprecationMessage += since ? "has been deprecated since v" + since : "is deprecated";
2868
- deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v" + errorAfter + "." : ".";
2869
- deprecationMessage += message ? " " + ts.formatStringFromArgs(message, [name], 0) : "";
2866
+ deprecationMessage += "'".concat(name, "' ");
2867
+ deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
2868
+ deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
2869
+ deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
2870
2870
  return deprecationMessage;
2871
2871
  }
2872
2872
  function createErrorDeprecation(name, errorAfter, since, message) {
@@ -2997,11 +2997,11 @@ var ts;
2997
2997
  }
2998
2998
  };
2999
2999
  Version.prototype.toString = function () {
3000
- var result = this.major + "." + this.minor + "." + this.patch;
3000
+ var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
3001
3001
  if (ts.some(this.prerelease))
3002
- result += "-" + this.prerelease.join(".");
3002
+ result += "-".concat(this.prerelease.join("."));
3003
3003
  if (ts.some(this.build))
3004
- result += "+" + this.build.join(".");
3004
+ result += "+".concat(this.build.join("."));
3005
3005
  return result;
3006
3006
  };
3007
3007
  Version.zero = new Version(0, 0, 0);
@@ -3268,7 +3268,7 @@ var ts;
3268
3268
  return ts.map(comparators, formatComparator).join(" ");
3269
3269
  }
3270
3270
  function formatComparator(comparator) {
3271
- return "" + comparator.operator + comparator.operand;
3271
+ return "".concat(comparator.operator).concat(comparator.operand);
3272
3272
  }
3273
3273
  })(ts || (ts = {}));
3274
3274
  /*@internal*/
@@ -3566,7 +3566,7 @@ var ts;
3566
3566
  fs = require("fs");
3567
3567
  }
3568
3568
  catch (e) {
3569
- throw new Error("tracing requires having fs\n(original error: " + (e.message || e) + ")");
3569
+ throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
3570
3570
  }
3571
3571
  }
3572
3572
  mode = tracingMode;
@@ -3578,11 +3578,11 @@ var ts;
3578
3578
  if (!fs.existsSync(traceDir)) {
3579
3579
  fs.mkdirSync(traceDir, { recursive: true });
3580
3580
  }
3581
- var countPart = mode === "build" ? "." + process.pid + "-" + ++traceCount
3582
- : mode === "server" ? "." + process.pid
3581
+ var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
3582
+ : mode === "server" ? ".".concat(process.pid)
3583
3583
  : "";
3584
- var tracePath = ts.combinePaths(traceDir, "trace" + countPart + ".json");
3585
- var typesPath = ts.combinePaths(traceDir, "types" + countPart + ".json");
3584
+ var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
3585
+ var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
3586
3586
  legend.push({
3587
3587
  configFilePath: configFilePath,
3588
3588
  tracePath: tracePath,
@@ -3672,7 +3672,7 @@ var ts;
3672
3672
  }
3673
3673
  // test if [time,endTime) straddles a sampling point
3674
3674
  else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
3675
- writeEvent("X", phase, name, args, "\"dur\":" + (endTime - time), time);
3675
+ writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
3676
3676
  }
3677
3677
  }
3678
3678
  function writeEvent(eventType, phase, name, args, extras, time) {
@@ -3681,11 +3681,11 @@ var ts;
3681
3681
  if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
3682
3682
  return;
3683
3683
  ts.performance.mark("beginTracing");
3684
- fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"" + eventType + "\",\"cat\":\"" + phase + "\",\"ts\":" + time + ",\"name\":\"" + name + "\"");
3684
+ fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
3685
3685
  if (extras)
3686
- fs.writeSync(traceFd, "," + extras);
3686
+ fs.writeSync(traceFd, ",".concat(extras));
3687
3687
  if (args)
3688
- fs.writeSync(traceFd, ",\"args\":" + JSON.stringify(args));
3688
+ fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
3689
3689
  fs.writeSync(traceFd, "}");
3690
3690
  ts.performance.mark("endTracing");
3691
3691
  ts.performance.measure("Tracing", "beginTracing", "endTracing");
@@ -4862,8 +4862,6 @@ var ts;
4862
4862
  // 'Narrowable' types are types where narrowing actually narrows.
4863
4863
  // This *should* be every type other than null, undefined, void, and never
4864
4864
  TypeFlags[TypeFlags["Narrowable"] = 536624127] = "Narrowable";
4865
- /* @internal */
4866
- TypeFlags[TypeFlags["NotPrimitiveUnion"] = 468598819] = "NotPrimitiveUnion";
4867
4865
  // The following flags are aggregated during union and intersection type construction
4868
4866
  /* @internal */
4869
4867
  TypeFlags[TypeFlags["IncludesMask"] = 205258751] = "IncludesMask";
@@ -4876,6 +4874,10 @@ var ts;
4876
4874
  TypeFlags[TypeFlags["IncludesWildcard"] = 8388608] = "IncludesWildcard";
4877
4875
  /* @internal */
4878
4876
  TypeFlags[TypeFlags["IncludesEmptyObject"] = 16777216] = "IncludesEmptyObject";
4877
+ /* @internal */
4878
+ TypeFlags[TypeFlags["IncludesInstantiable"] = 33554432] = "IncludesInstantiable";
4879
+ /* @internal */
4880
+ TypeFlags[TypeFlags["NotPrimitiveUnion"] = 36323363] = "NotPrimitiveUnion";
4879
4881
  })(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
4880
4882
  // Types included in TypeFlags.ObjectFlagsType have an objectFlags property. Some ObjectFlags
4881
4883
  // are specific to certain types and reuse the same bit position. Those ObjectFlags require a check
@@ -6490,7 +6492,7 @@ var ts;
6490
6492
  pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
6491
6493
  ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
6492
6494
  function getLevel(envVar, level) {
6493
- return system.getEnvironmentVariable(envVar + "_" + level.toUpperCase());
6495
+ return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
6494
6496
  }
6495
6497
  function getCustomLevels(baseVariable) {
6496
6498
  var customLevels;
@@ -6955,7 +6957,7 @@ var ts;
6955
6957
  }
6956
6958
  function onTimerToUpdateChildWatches() {
6957
6959
  timerToUpdateChildWatches = undefined;
6958
- ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
6960
+ ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
6959
6961
  var start = ts.timestamp();
6960
6962
  var invokeMap = new ts.Map();
6961
6963
  while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
@@ -6968,7 +6970,7 @@ var ts;
6968
6970
  var hasChanges = updateChildWatches(dirName, dirPath, options);
6969
6971
  invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
6970
6972
  }
6971
- ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
6973
+ ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
6972
6974
  callbackCache.forEach(function (callbacks, rootDirName) {
6973
6975
  var existing = invokeMap.get(rootDirName);
6974
6976
  if (existing) {
@@ -6984,7 +6986,7 @@ var ts;
6984
6986
  }
6985
6987
  });
6986
6988
  var elapsed = ts.timestamp() - start;
6987
- ts.sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
6989
+ ts.sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
6988
6990
  }
6989
6991
  function removeChildWatches(parentWatcher) {
6990
6992
  if (!parentWatcher)
@@ -7444,7 +7446,7 @@ var ts;
7444
7446
  var remappedPaths = new ts.Map();
7445
7447
  var normalizedDir = ts.normalizeSlashes(__dirname);
7446
7448
  // Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
7447
- var fileUrlRoot = "file://" + (ts.getRootLength(normalizedDir) === 1 ? "" : "/") + normalizedDir;
7449
+ var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
7448
7450
  for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
7449
7451
  var node = _a[_i];
7450
7452
  if (node.callFrame.url) {
@@ -7453,7 +7455,7 @@ var ts;
7453
7455
  node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
7454
7456
  }
7455
7457
  else if (!nativePattern.test(url)) {
7456
- node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external" + externalFileCounter + ".js")).get(url);
7458
+ node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
7457
7459
  externalFileCounter++;
7458
7460
  }
7459
7461
  }
@@ -7469,7 +7471,7 @@ var ts;
7469
7471
  if (!err) {
7470
7472
  try {
7471
7473
  if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
7472
- profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
7474
+ profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
7473
7475
  }
7474
7476
  }
7475
7477
  catch (_c) {
@@ -7571,7 +7573,7 @@ var ts;
7571
7573
  * @param createWatcher
7572
7574
  */
7573
7575
  function invokeCallbackAndUpdateWatcher(createWatcher) {
7574
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
7576
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
7575
7577
  // Call the callback for current directory
7576
7578
  callback("rename", "");
7577
7579
  // If watcher is not closed, update it
@@ -7596,7 +7598,7 @@ var ts;
7596
7598
  }
7597
7599
  }
7598
7600
  if (hitSystemWatcherLimit) {
7599
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Defaulting to fsWatchFile");
7601
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
7600
7602
  return watchPresentFileSystemEntryWithFsWatchFile();
7601
7603
  }
7602
7604
  try {
@@ -7612,7 +7614,7 @@ var ts;
7612
7614
  // 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
7613
7615
  // so instead of throwing error, use fs.watchFile
7614
7616
  hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
7615
- ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
7617
+ ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
7616
7618
  return watchPresentFileSystemEntryWithFsWatchFile();
7617
7619
  }
7618
7620
  }
@@ -7750,7 +7752,7 @@ var ts;
7750
7752
  }
7751
7753
  }
7752
7754
  function readDirectory(path, extensions, excludes, includes, depth) {
7753
- return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath, directoryExists);
7755
+ return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
7754
7756
  }
7755
7757
  function fileSystemEntryExists(path, entryKind) {
7756
7758
  // Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve
@@ -9914,7 +9916,7 @@ var ts;
9914
9916
  line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
9915
9917
  }
9916
9918
  else {
9917
- ts.Debug.fail("Bad line number. Line: " + line + ", lineStarts.length: " + lineStarts.length + " , line map is correct? " + (debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
9919
+ 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"));
9918
9920
  }
9919
9921
  }
9920
9922
  var res = lineStarts[line] + character;
@@ -12794,7 +12796,7 @@ var ts;
12794
12796
  return typeof comment === "string" ? comment
12795
12797
  : comment === null || comment === void 0 ? void 0 : comment.map(function (c) {
12796
12798
  // TODO: Other kinds here
12797
- return c.kind === 319 /* JSDocText */ ? c.text : "{@link " + (c.name ? ts.entityNameToString(c.name) + " " : "") + c.text + "}";
12799
+ return c.kind === 319 /* JSDocText */ ? c.text : "{@link ".concat(c.name ? ts.entityNameToString(c.name) + " " : "").concat(c.text, "}");
12798
12800
  }).join("");
12799
12801
  }
12800
12802
  ts.getTextOfJSDocComment = getTextOfJSDocComment;
@@ -14064,8 +14066,8 @@ var ts;
14064
14066
  }
14065
14067
  function packageIdToString(_a) {
14066
14068
  var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
14067
- var fullName = subModuleName ? name + "/" + subModuleName : name;
14068
- return fullName + "@" + version;
14069
+ var fullName = subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
14070
+ return "".concat(fullName, "@").concat(version);
14069
14071
  }
14070
14072
  ts.packageIdToString = packageIdToString;
14071
14073
  function typeDirectiveIsEqualTo(oldResolution, newResolution) {
@@ -14144,7 +14146,7 @@ var ts;
14144
14146
  function nodePosToString(node) {
14145
14147
  var file = getSourceFileOfNode(node);
14146
14148
  var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
14147
- return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")";
14149
+ return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
14148
14150
  }
14149
14151
  ts.nodePosToString = nodePosToString;
14150
14152
  function getEndLinePosition(line, sourceFile) {
@@ -14283,7 +14285,7 @@ var ts;
14283
14285
  ts.isPinnedComment = isPinnedComment;
14284
14286
  function createCommentDirectivesMap(sourceFile, commentDirectives) {
14285
14287
  var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
14286
- "" + ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line,
14288
+ "".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
14287
14289
  commentDirective,
14288
14290
  ]); }));
14289
14291
  var usedLines = new ts.Map();
@@ -14300,10 +14302,10 @@ var ts;
14300
14302
  });
14301
14303
  }
14302
14304
  function markUsed(line) {
14303
- if (!directivesByLine.has("" + line)) {
14305
+ if (!directivesByLine.has("".concat(line))) {
14304
14306
  return false;
14305
14307
  }
14306
- usedLines.set("" + line, true);
14308
+ usedLines.set("".concat(line), true);
14307
14309
  return true;
14308
14310
  }
14309
14311
  }
@@ -14518,7 +14520,7 @@ var ts;
14518
14520
  }
14519
14521
  return node.text;
14520
14522
  }
14521
- return ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
14523
+ return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
14522
14524
  }
14523
14525
  ts.getLiteralText = getLiteralText;
14524
14526
  function canUseOriginalText(node, flags) {
@@ -17049,11 +17051,11 @@ var ts;
17049
17051
  }
17050
17052
  ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
17051
17053
  function getPropertyNameForUniqueESSymbol(symbol) {
17052
- return "__@" + ts.getSymbolId(symbol) + "@" + symbol.escapedName;
17054
+ return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
17053
17055
  }
17054
17056
  ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
17055
17057
  function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
17056
- return "__#" + ts.getSymbolId(containingClassSymbol) + "@" + description;
17058
+ return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
17057
17059
  }
17058
17060
  ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
17059
17061
  function isKnownSymbol(symbol) {
@@ -19746,7 +19748,7 @@ var ts;
19746
19748
  }
19747
19749
  ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
19748
19750
  function getJSXRuntimeImport(base, options) {
19749
- return base ? base + "/" + (options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
19751
+ return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
19750
19752
  }
19751
19753
  ts.getJSXRuntimeImport = getJSXRuntimeImport;
19752
19754
  function hasZeroOrOneAsteriskCharacter(str) {
@@ -19863,7 +19865,7 @@ var ts;
19863
19865
  }
19864
19866
  var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
19865
19867
  ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
19866
- var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))";
19868
+ var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
19867
19869
  var filesMatcher = {
19868
19870
  /**
19869
19871
  * Matches any single directory segment unless it is the last segment and a .min.js file
@@ -19876,7 +19878,7 @@ var ts;
19876
19878
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
19877
19879
  * files or directories, does not match subdirectories that start with a . character
19878
19880
  */
19879
- doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
19881
+ doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
19880
19882
  replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
19881
19883
  };
19882
19884
  var directoriesMatcher = {
@@ -19885,7 +19887,7 @@ var ts;
19885
19887
  * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
19886
19888
  * files or directories, does not match subdirectories that start with a . character
19887
19889
  */
19888
- doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
19890
+ doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
19889
19891
  replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
19890
19892
  };
19891
19893
  var excludeMatcher = {
@@ -19903,10 +19905,10 @@ var ts;
19903
19905
  if (!patterns || !patterns.length) {
19904
19906
  return undefined;
19905
19907
  }
19906
- var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
19908
+ var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
19907
19909
  // If excluding, match "foo/bar/baz...", but if including, only allow "foo".
19908
19910
  var terminator = usage === "exclude" ? "($|/)" : "$";
19909
- return "^(" + pattern + ")" + terminator;
19911
+ return "^(".concat(pattern, ")").concat(terminator);
19910
19912
  }
19911
19913
  ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
19912
19914
  function getRegularExpressionsForWildcards(specs, basePath, usage) {
@@ -19928,7 +19930,7 @@ var ts;
19928
19930
  ts.isImplicitGlob = isImplicitGlob;
19929
19931
  function getPatternFromSpec(spec, basePath, usage) {
19930
19932
  var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
19931
- return pattern && "^(" + pattern + ")" + (usage === "exclude" ? "($|/)" : "$");
19933
+ return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
19932
19934
  }
19933
19935
  ts.getPatternFromSpec = getPatternFromSpec;
19934
19936
  function getSubPatternFromSpec(spec, basePath, usage, _a) {
@@ -20006,11 +20008,11 @@ var ts;
20006
20008
  currentDirectory = ts.normalizePath(currentDirectory);
20007
20009
  var absolutePath = ts.combinePaths(currentDirectory, path);
20008
20010
  return {
20009
- includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
20011
+ includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
20010
20012
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
20011
20013
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
20012
20014
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
20013
- basePaths: getBasePaths(absolutePath, includes, useCaseSensitiveFileNames)
20015
+ basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
20014
20016
  };
20015
20017
  }
20016
20018
  ts.getFileMatcherPatterns = getFileMatcherPatterns;
@@ -20019,7 +20021,7 @@ var ts;
20019
20021
  }
20020
20022
  ts.getRegexFromPattern = getRegexFromPattern;
20021
20023
  /** @param path directory of the tsconfig.json */
20022
- function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath, directoryExists) {
20024
+ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
20023
20025
  path = ts.normalizePath(path);
20024
20026
  currentDirectory = ts.normalizePath(currentDirectory);
20025
20027
  var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
@@ -20032,20 +20034,18 @@ var ts;
20032
20034
  var visited = new ts.Map();
20033
20035
  var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
20034
20036
  for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
20035
- var absoluteBasePath = _a[_i];
20036
- if (directoryExists(absoluteBasePath)) {
20037
- visitDirectory(absoluteBasePath, depth);
20038
- }
20037
+ var basePath = _a[_i];
20038
+ visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth);
20039
20039
  }
20040
20040
  return ts.flatten(results);
20041
- function visitDirectory(absolutePath, depth) {
20041
+ function visitDirectory(path, absolutePath, depth) {
20042
20042
  var canonicalPath = toCanonical(realpath(absolutePath));
20043
20043
  if (visited.has(canonicalPath))
20044
20044
  return;
20045
20045
  visited.set(canonicalPath, true);
20046
- var _a = getFileSystemEntries(absolutePath), files = _a.files, directories = _a.directories;
20046
+ var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
20047
20047
  var _loop_1 = function (current) {
20048
- var name = ts.combinePaths(absolutePath, current);
20048
+ var name = ts.combinePaths(path, current);
20049
20049
  var absoluteName = ts.combinePaths(absolutePath, current);
20050
20050
  if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
20051
20051
  return "continue";
@@ -20073,10 +20073,11 @@ var ts;
20073
20073
  }
20074
20074
  for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
20075
20075
  var current = _d[_c];
20076
+ var name = ts.combinePaths(path, current);
20076
20077
  var absoluteName = ts.combinePaths(absolutePath, current);
20077
20078
  if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
20078
20079
  (!excludeRegex || !excludeRegex.test(absoluteName))) {
20079
- visitDirectory(absoluteName, depth);
20080
+ visitDirectory(name, absoluteName, depth);
20080
20081
  }
20081
20082
  }
20082
20083
  }
@@ -20084,11 +20085,10 @@ var ts;
20084
20085
  ts.matchFiles = matchFiles;
20085
20086
  /**
20086
20087
  * Computes the unique non-wildcard base paths amongst the provided include patterns.
20087
- * @returns Absolute directory paths
20088
20088
  */
20089
- function getBasePaths(absoluteTsconfigPath, includes, useCaseSensitiveFileNames) {
20089
+ function getBasePaths(path, includes, useCaseSensitiveFileNames) {
20090
20090
  // Storage for our results in the form of literal paths (e.g. the paths as written by the user).
20091
- var basePaths = [absoluteTsconfigPath];
20091
+ var basePaths = [path];
20092
20092
  if (includes) {
20093
20093
  // Storage for literal base paths amongst the include patterns.
20094
20094
  var includeBasePaths = [];
@@ -20096,14 +20096,14 @@ var ts;
20096
20096
  var include = includes_1[_i];
20097
20097
  // We also need to check the relative paths by converting them to absolute and normalizing
20098
20098
  // in case they escape the base path (e.g "..\somedirectory")
20099
- var absoluteIncludePath = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(absoluteTsconfigPath, include));
20099
+ var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include));
20100
20100
  // Append the literal and canonical candidate base paths.
20101
- includeBasePaths.push(getIncludeBasePath(absoluteIncludePath));
20101
+ includeBasePaths.push(getIncludeBasePath(absolute));
20102
20102
  }
20103
20103
  // Sort the offsets array using either the literal or canonical path representations.
20104
20104
  includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
20105
20105
  var _loop_2 = function (includeBasePath) {
20106
- if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, absoluteTsconfigPath, !useCaseSensitiveFileNames); })) {
20106
+ if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
20107
20107
  basePaths.push(includeBasePath);
20108
20108
  }
20109
20109
  };
@@ -20289,7 +20289,7 @@ var ts;
20289
20289
  */
20290
20290
  function extensionFromPath(path) {
20291
20291
  var ext = tryGetExtensionFromPath(path);
20292
- return ext !== undefined ? ext : ts.Debug.fail("File " + path + " has unknown extension.");
20292
+ return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
20293
20293
  }
20294
20294
  ts.extensionFromPath = extensionFromPath;
20295
20295
  function isAnySupportedFileExtension(path) {
@@ -26278,7 +26278,7 @@ var ts;
26278
26278
  case 326 /* JSDocAugmentsTag */: return "augments";
26279
26279
  case 327 /* JSDocImplementsTag */: return "implements";
26280
26280
  default:
26281
- return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
26281
+ return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
26282
26282
  }
26283
26283
  }
26284
26284
  var rawTextScanner;
@@ -26606,7 +26606,7 @@ var ts;
26606
26606
  };
26607
26607
  var definedTextGetter_1 = function (path) {
26608
26608
  var result = textGetter_1(path);
26609
- return result !== undefined ? result : "/* Input file " + path + " was missing */\r\n";
26609
+ return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
26610
26610
  };
26611
26611
  var buildInfo_1;
26612
26612
  var getAndCacheBuildInfo_1 = function (getText) {
@@ -31144,7 +31144,7 @@ var ts;
31144
31144
  for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
31145
31145
  var keyword = viableKeywordSuggestions_1[_i];
31146
31146
  if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
31147
- return keyword + " " + expressionText.slice(keyword.length);
31147
+ return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
31148
31148
  }
31149
31149
  }
31150
31150
  return undefined;
@@ -37908,7 +37908,7 @@ var ts;
37908
37908
  if (namedArgRegExCache.has(name)) {
37909
37909
  return namedArgRegExCache.get(name);
37910
37910
  }
37911
- var result = new RegExp("(\\s" + name + "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))", "im");
37911
+ var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
37912
37912
  namedArgRegExCache.set(name, result);
37913
37913
  return result;
37914
37914
  }
@@ -39370,8 +39370,8 @@ var ts;
39370
39370
  }
39371
39371
  ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
39372
39372
  function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
39373
- var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
39374
- return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
39373
+ var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
39374
+ return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
39375
39375
  }
39376
39376
  /* @internal */
39377
39377
  function parseCustomTypeOption(opt, value, errors) {
@@ -40165,10 +40165,10 @@ var ts;
40165
40165
  var newValue = compilerOptionsMap.get(cmd.name);
40166
40166
  var defaultValue = getDefaultValueForOption(cmd);
40167
40167
  if (newValue !== defaultValue) {
40168
- result.push("" + tab + cmd.name + ": " + newValue);
40168
+ result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
40169
40169
  }
40170
40170
  else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
40171
- result.push("" + tab + cmd.name + ": " + defaultValue);
40171
+ result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
40172
40172
  }
40173
40173
  });
40174
40174
  return result.join(newLine) + newLine;
@@ -40219,19 +40219,19 @@ var ts;
40219
40219
  if (entries.length !== 0) {
40220
40220
  entries.push({ value: "" });
40221
40221
  }
40222
- entries.push({ value: "/* " + category + " */" });
40222
+ entries.push({ value: "/* ".concat(category, " */") });
40223
40223
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
40224
40224
  var option = options_1[_i];
40225
40225
  var optionName = void 0;
40226
40226
  if (compilerOptionsMap.has(option.name)) {
40227
- optionName = "\"" + option.name + "\": " + JSON.stringify(compilerOptionsMap.get(option.name)) + ((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
40227
+ optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
40228
40228
  }
40229
40229
  else {
40230
- optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
40230
+ optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
40231
40231
  }
40232
40232
  entries.push({
40233
40233
  value: optionName,
40234
- description: "/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */"
40234
+ description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
40235
40235
  });
40236
40236
  marginLength = Math.max(optionName.length, marginLength);
40237
40237
  }
@@ -40240,25 +40240,25 @@ var ts;
40240
40240
  var tab = makePadding(2);
40241
40241
  var result = [];
40242
40242
  result.push("{");
40243
- result.push(tab + "\"compilerOptions\": {");
40244
- result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
40243
+ result.push("".concat(tab, "\"compilerOptions\": {"));
40244
+ 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), " */"));
40245
40245
  result.push("");
40246
40246
  // Print out each row, aligning all the descriptions on the same column.
40247
40247
  for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
40248
40248
  var entry = entries_2[_a];
40249
40249
  var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
40250
- result.push(value && "" + tab + tab + value + (description && (makePadding(marginLength - value.length + 2) + description)));
40250
+ result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
40251
40251
  }
40252
40252
  if (fileNames.length) {
40253
- result.push(tab + "},");
40254
- result.push(tab + "\"files\": [");
40253
+ result.push("".concat(tab, "},"));
40254
+ result.push("".concat(tab, "\"files\": ["));
40255
40255
  for (var i = 0; i < fileNames.length; i++) {
40256
- result.push("" + tab + tab + JSON.stringify(fileNames[i]) + (i === fileNames.length - 1 ? "" : ","));
40256
+ result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
40257
40257
  }
40258
- result.push(tab + "]");
40258
+ result.push("".concat(tab, "]"));
40259
40259
  }
40260
40260
  else {
40261
- result.push(tab + "}");
40261
+ result.push("".concat(tab, "}"));
40262
40262
  }
40263
40263
  result.push("}");
40264
40264
  return result.join(newLine) + newLine;
@@ -40656,7 +40656,7 @@ var ts;
40656
40656
  if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
40657
40657
  var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
40658
40658
  if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
40659
- extendedConfigPath = extendedConfigPath + ".json";
40659
+ extendedConfigPath = "".concat(extendedConfigPath, ".json");
40660
40660
  if (!host.fileExists(extendedConfigPath)) {
40661
40661
  errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
40662
40662
  return undefined;
@@ -40901,7 +40901,7 @@ var ts;
40901
40901
  // Valid only if *.json specified
40902
40902
  if (!jsonOnlyIncludeRegexes) {
40903
40903
  var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
40904
- var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^" + pattern + "$"; });
40904
+ var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
40905
40905
  jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
40906
40906
  }
40907
40907
  var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
@@ -41337,7 +41337,7 @@ var ts;
41337
41337
  var bestVersionKey = result.version, bestVersionPaths = result.paths;
41338
41338
  if (typeof bestVersionPaths !== "object") {
41339
41339
  if (state.traceEnabled) {
41340
- trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['" + bestVersionKey + "']", "object", typeof bestVersionPaths);
41340
+ trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
41341
41341
  }
41342
41342
  return;
41343
41343
  }
@@ -41448,7 +41448,10 @@ var ts;
41448
41448
  }
41449
41449
  }
41450
41450
  var failedLookupLocations = [];
41451
- var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.AllFeatures, conditions: ["node", "require", "types"] };
41451
+ var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
41452
+ ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
41453
+ NodeResolutionFeatures.None;
41454
+ var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
41452
41455
  var resolved = primaryLookup();
41453
41456
  var primary = true;
41454
41457
  if (!resolved) {
@@ -41715,7 +41718,7 @@ var ts;
41715
41718
  };
41716
41719
  return cache;
41717
41720
  function getUnderlyingCacheKey(specifier, mode) {
41718
- var result = mode === undefined ? specifier : mode + "|" + specifier;
41721
+ var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
41719
41722
  memoizedReverseKeys.set(result, [specifier, mode]);
41720
41723
  return result;
41721
41724
  }
@@ -41746,7 +41749,7 @@ var ts;
41746
41749
  }
41747
41750
  function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
41748
41751
  ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
41749
- return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode + "|" + nonRelativeModuleName, createPerModuleNameCache);
41752
+ return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
41750
41753
  }
41751
41754
  function createPerModuleNameCache() {
41752
41755
  var directoryPathMap = new ts.Map();
@@ -41893,10 +41896,10 @@ var ts;
41893
41896
  result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
41894
41897
  break;
41895
41898
  default:
41896
- return ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
41899
+ return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
41897
41900
  }
41898
41901
  if (result && result.resolvedModule)
41899
- ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\"");
41902
+ ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
41900
41903
  ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
41901
41904
  if (perFolderCache) {
41902
41905
  perFolderCache.set(moduleName, resolutionMode, result);
@@ -42099,7 +42102,7 @@ var ts;
42099
42102
  function resolveJSModule(moduleName, initialDir, host) {
42100
42103
  var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
42101
42104
  if (!resolvedModule) {
42102
- throw new Error("Could not resolve JS module '" + moduleName + "' starting at '" + initialDir + "'. Looked in: " + failedLookupLocations.join(", "));
42105
+ throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
42103
42106
  }
42104
42107
  return resolvedModule.resolvedFileName;
42105
42108
  }
@@ -42123,13 +42126,15 @@ var ts;
42123
42126
  // not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
42124
42127
  NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
42125
42128
  NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
42129
+ NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
42130
+ NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
42126
42131
  NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
42127
42132
  })(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
42128
42133
  function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42129
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Imports | NodeResolutionFeatures.SelfName | NodeResolutionFeatures.Exports, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42134
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42130
42135
  }
42131
42136
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42132
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.AllFeatures, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42137
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42133
42138
  }
42134
42139
  function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42135
42140
  var containingDirectory = ts.getDirectoryPath(containingFile);
@@ -42212,7 +42217,7 @@ var ts;
42212
42217
  if (traceEnabled) {
42213
42218
  trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
42214
42219
  }
42215
- ts.Debug.assert(host.fileExists(real), path + " linked to nonexistent file " + real);
42220
+ ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
42216
42221
  return real;
42217
42222
  }
42218
42223
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -42598,7 +42603,7 @@ var ts;
42598
42603
  return undefined;
42599
42604
  }
42600
42605
  var trailingParts = parts.slice(nameParts.length);
42601
- return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
42606
+ return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
42602
42607
  }
42603
42608
  function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
42604
42609
  if (!scope.packageJsonContent.exports) {
@@ -42926,7 +42931,7 @@ var ts;
42926
42931
  }
42927
42932
  /* @internal */
42928
42933
  function getTypesPackageName(packageName) {
42929
- return "@types/" + mangleScopedPackageName(packageName);
42934
+ return "@types/".concat(mangleScopedPackageName(packageName));
42930
42935
  }
42931
42936
  ts.getTypesPackageName = getTypesPackageName;
42932
42937
  /* @internal */
@@ -43327,7 +43332,7 @@ var ts;
43327
43332
  if (name) {
43328
43333
  if (ts.isAmbientModule(node)) {
43329
43334
  var moduleName = ts.getTextOfIdentifierOrLiteral(name);
43330
- return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
43335
+ return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
43331
43336
  }
43332
43337
  if (name.kind === 161 /* ComputedPropertyName */) {
43333
43338
  var nameExpression = name.expression;
@@ -43384,7 +43389,7 @@ var ts;
43384
43389
  case 163 /* Parameter */:
43385
43390
  // Parameters with names are handled at the top of this function. Parameters
43386
43391
  // without names can only come from JSDocFunctionTypes.
43387
- 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"; });
43392
+ 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"); });
43388
43393
  var functionType = node.parent;
43389
43394
  var index = functionType.parameters.indexOf(node);
43390
43395
  return "arg" + index;
@@ -43496,7 +43501,7 @@ var ts;
43496
43501
  var relatedInformation_1 = [];
43497
43502
  if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
43498
43503
  // export type T; - may have meant export type { T }?
43499
- relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { " + ts.unescapeLeadingUnderscores(node.name.escapedText) + " }"));
43504
+ relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
43500
43505
  }
43501
43506
  var declarationName_1 = ts.getNameOfDeclaration(node) || node;
43502
43507
  ts.forEach(symbol.declarations, function (declaration, index) {
@@ -45569,7 +45574,7 @@ var ts;
45569
45574
  }
45570
45575
  }
45571
45576
  function bindSourceFileAsExternalModule() {
45572
- bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\"");
45577
+ bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
45573
45578
  }
45574
45579
  function bindExportAssignment(node) {
45575
45580
  if (!container.symbol || !container.symbol.exports) {
@@ -47658,7 +47663,7 @@ var ts;
47658
47663
  if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
47659
47664
  var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
47660
47665
  var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
47661
- var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path + "|" + secondFile_1.path, function () {
47666
+ var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
47662
47667
  return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
47663
47668
  });
47664
47669
  var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
@@ -48092,11 +48097,12 @@ var ts;
48092
48097
  *
48093
48098
  * @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
48094
48099
  */
48095
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
48100
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
48096
48101
  if (excludeGlobals === void 0) { excludeGlobals = false; }
48097
- return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
48102
+ if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
48103
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
48098
48104
  }
48099
- function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
48105
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
48100
48106
  var _a, _b, _c;
48101
48107
  var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
48102
48108
  var result;
@@ -48413,7 +48419,7 @@ var ts;
48413
48419
  }
48414
48420
  }
48415
48421
  if (!result) {
48416
- if (nameNotFoundMessage) {
48422
+ if (nameNotFoundMessage && produceDiagnostics) {
48417
48423
  if (!errorLocation ||
48418
48424
  !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
48419
48425
  !checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -48423,7 +48429,7 @@ var ts;
48423
48429
  !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
48424
48430
  !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
48425
48431
  var suggestion = void 0;
48426
- if (suggestionCount < maximumSuggestionCount) {
48432
+ if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
48427
48433
  suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
48428
48434
  var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
48429
48435
  if (isGlobalScopeAugmentationDeclaration) {
@@ -48459,7 +48465,7 @@ var ts;
48459
48465
  return undefined;
48460
48466
  }
48461
48467
  // Perform extra checks only if error reporting was requested
48462
- if (nameNotFoundMessage) {
48468
+ if (nameNotFoundMessage && produceDiagnostics) {
48463
48469
  if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
48464
48470
  // We have a match, but the reference occurred within a property initializer and the identifier also binds
48465
48471
  // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
@@ -50297,7 +50303,7 @@ var ts;
50297
50303
  var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
50298
50304
  // Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
50299
50305
  var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
50300
- var key = (useOnlyExternalAliasing ? 0 : 1) + "|" + (firstRelevantLocation && getNodeId(firstRelevantLocation)) + "|" + meaning;
50306
+ var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
50301
50307
  if (cache.has(key)) {
50302
50308
  return cache.get(key);
50303
50309
  }
@@ -51145,7 +51151,7 @@ var ts;
51145
51151
  context.symbolDepth = new ts.Map();
51146
51152
  }
51147
51153
  var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
51148
- var key = getTypeId(type) + "|" + context.flags;
51154
+ var key = "".concat(getTypeId(type), "|").concat(context.flags);
51149
51155
  if (links) {
51150
51156
  links.serializedTypes || (links.serializedTypes = new ts.Map());
51151
51157
  }
@@ -51414,7 +51420,7 @@ var ts;
51414
51420
  }
51415
51421
  }
51416
51422
  if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
51417
- typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... " + (properties.length - i) + " more ...", /*questionToken*/ undefined, /*type*/ undefined));
51423
+ typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
51418
51424
  addPropertyToElementList(properties[properties.length - 1], context, typeElements);
51419
51425
  break;
51420
51426
  }
@@ -51529,7 +51535,7 @@ var ts;
51529
51535
  else if (types.length > 2) {
51530
51536
  return [
51531
51537
  typeToTypeNodeHelper(types[0], context),
51532
- ts.factory.createTypeReferenceNode("... " + (types.length - 2) + " more ...", /*typeArguments*/ undefined),
51538
+ ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
51533
51539
  typeToTypeNodeHelper(types[types.length - 1], context)
51534
51540
  ];
51535
51541
  }
@@ -51543,7 +51549,7 @@ var ts;
51543
51549
  var type = types_2[_i];
51544
51550
  i++;
51545
51551
  if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
51546
- result_5.push(ts.factory.createTypeReferenceNode("... " + (types.length - i) + " more ...", /*typeArguments*/ undefined));
51552
+ result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
51547
51553
  var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
51548
51554
  if (typeNode_1) {
51549
51555
  result_5.push(typeNode_1);
@@ -52051,7 +52057,7 @@ var ts;
52051
52057
  var text = rawtext;
52052
52058
  while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
52053
52059
  i++;
52054
- text = rawtext + "_" + i;
52060
+ text = "".concat(rawtext, "_").concat(i);
52055
52061
  }
52056
52062
  if (text !== rawtext) {
52057
52063
  result = ts.factory.createIdentifier(text, result.typeArguments);
@@ -52377,7 +52383,7 @@ var ts;
52377
52383
  function getNameForJSDocFunctionParameter(p, index) {
52378
52384
  return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
52379
52385
  : getEffectiveDotDotDotForParameter(p) ? "args"
52380
- : "arg" + index;
52386
+ : "arg".concat(index);
52381
52387
  }
52382
52388
  function rewriteModuleSpecifier(parent, lit) {
52383
52389
  if (bundled) {
@@ -53462,7 +53468,7 @@ var ts;
53462
53468
  return results_1;
53463
53469
  }
53464
53470
  // The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
53465
- return ts.Debug.fail("Unhandled class member kind! " + (p.__debugFlags || p.flags));
53471
+ return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
53466
53472
  };
53467
53473
  }
53468
53474
  function serializePropertySymbolForInterface(p, baseType) {
@@ -53537,7 +53543,7 @@ var ts;
53537
53543
  if (ref) {
53538
53544
  return ref;
53539
53545
  }
53540
- var tempName = getUnusedName(rootName + "_base");
53546
+ var tempName = getUnusedName("".concat(rootName, "_base"));
53541
53547
  var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
53542
53548
  ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
53543
53549
  ], 2 /* Const */));
@@ -53584,7 +53590,7 @@ var ts;
53584
53590
  var original = input;
53585
53591
  while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
53586
53592
  i++;
53587
- input = original + "_" + i;
53593
+ input = "".concat(original, "_").concat(i);
53588
53594
  }
53589
53595
  (_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
53590
53596
  if (id) {
@@ -53692,15 +53698,15 @@ var ts;
53692
53698
  if (nameType.flags & 384 /* StringOrNumberLiteral */) {
53693
53699
  var name = "" + nameType.value;
53694
53700
  if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
53695
- return "\"" + ts.escapeString(name, 34 /* doubleQuote */) + "\"";
53701
+ return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
53696
53702
  }
53697
53703
  if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
53698
- return "[" + name + "]";
53704
+ return "[".concat(name, "]");
53699
53705
  }
53700
53706
  return name;
53701
53707
  }
53702
53708
  if (nameType.flags & 8192 /* UniqueESSymbol */) {
53703
- return "[" + getNameOfSymbolAsWritten(nameType.symbol, context) + "]";
53709
+ return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
53704
53710
  }
53705
53711
  }
53706
53712
  }
@@ -56474,7 +56480,7 @@ var ts;
56474
56480
  !leftName ? rightName :
56475
56481
  !rightName ? leftName :
56476
56482
  undefined;
56477
- var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg" + i);
56483
+ var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
56478
56484
  paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
56479
56485
  params[i] = paramSymbol;
56480
56486
  }
@@ -58393,7 +58399,7 @@ var ts;
58393
58399
  return result;
58394
58400
  }
58395
58401
  function getAliasId(aliasSymbol, aliasTypeArguments) {
58396
- return aliasSymbol ? "@" + getSymbolId(aliasSymbol) + (aliasTypeArguments ? ":" + getTypeListId(aliasTypeArguments) : "") : "";
58402
+ return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
58397
58403
  }
58398
58404
  // This function is used to propagate certain flags when creating new object type references and union types.
58399
58405
  // It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
@@ -58579,7 +58585,7 @@ var ts;
58579
58585
  return undefined;
58580
58586
  }
58581
58587
  function getSymbolPath(symbol) {
58582
- return symbol.parent ? getSymbolPath(symbol.parent) + "." + symbol.escapedName : symbol.escapedName;
58588
+ return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
58583
58589
  }
58584
58590
  function getUnresolvedSymbolForEntityName(name) {
58585
58591
  var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
@@ -58590,7 +58596,7 @@ var ts;
58590
58596
  var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
58591
58597
  name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
58592
58598
  undefined;
58593
- var path = parentSymbol ? getSymbolPath(parentSymbol) + "." + text : text;
58599
+ var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
58594
58600
  var result = unresolvedSymbols.get(path);
58595
58601
  if (!result) {
58596
58602
  unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
@@ -58663,7 +58669,7 @@ var ts;
58663
58669
  if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
58664
58670
  return baseType;
58665
58671
  }
58666
- var id = getTypeId(baseType) + ">" + getTypeId(substitute);
58672
+ var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
58667
58673
  var cached = substitutionTypes.get(id);
58668
58674
  if (cached) {
58669
58675
  return cached;
@@ -58864,7 +58870,7 @@ var ts;
58864
58870
  }
58865
58871
  function getGlobalSymbol(name, meaning, diagnostic) {
58866
58872
  // Don't track references for global symbols anyway, so value if `isReference` is arbitrary
58867
- return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
58873
+ return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
58868
58874
  }
58869
58875
  function getGlobalType(name, arity, reportErrors) {
58870
58876
  var symbol = getGlobalTypeSymbol(name, reportErrors);
@@ -59324,6 +59330,8 @@ var ts;
59324
59330
  // We ignore 'never' types in unions
59325
59331
  if (!(flags & 131072 /* Never */)) {
59326
59332
  includes |= flags & 205258751 /* IncludesMask */;
59333
+ if (flags & 465829888 /* Instantiable */)
59334
+ includes |= 33554432 /* IncludesInstantiable */;
59327
59335
  if (type === wildcardType)
59328
59336
  includes |= 8388608 /* IncludesWildcard */;
59329
59337
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
@@ -59537,7 +59545,7 @@ var ts;
59537
59545
  origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
59538
59546
  }
59539
59547
  }
59540
- var objectFlags = (includes & 468598819 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
59548
+ var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
59541
59549
  (includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
59542
59550
  return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
59543
59551
  }
@@ -59585,9 +59593,9 @@ var ts;
59585
59593
  return types[0];
59586
59594
  }
59587
59595
  var typeKey = !origin ? getTypeListId(types) :
59588
- origin.flags & 1048576 /* Union */ ? "|" + getTypeListId(origin.types) :
59589
- origin.flags & 2097152 /* Intersection */ ? "&" + getTypeListId(origin.types) :
59590
- "#" + 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
59596
+ origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
59597
+ origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
59598
+ "#".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
59591
59599
  var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
59592
59600
  var type = unionTypes.get(id);
59593
59601
  if (!type) {
@@ -60109,7 +60117,7 @@ var ts;
60109
60117
  if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
60110
60118
  return stringType;
60111
60119
  }
60112
- var id = getTypeListId(newTypes) + "|" + ts.map(newTexts, function (t) { return t.length; }).join(",") + "|" + newTexts.join("");
60120
+ var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
60113
60121
  var type = templateLiteralTypes.get(id);
60114
60122
  if (!type) {
60115
60123
  templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
@@ -60169,7 +60177,7 @@ var ts;
60169
60177
  return str;
60170
60178
  }
60171
60179
  function getStringMappingTypeForGenericType(symbol, type) {
60172
- var id = getSymbolId(symbol) + "," + getTypeId(type);
60180
+ var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
60173
60181
  var result = stringMappingTypes.get(id);
60174
60182
  if (!result) {
60175
60183
  stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
@@ -61189,7 +61197,7 @@ var ts;
61189
61197
  function createUniqueESSymbolType(symbol) {
61190
61198
  var type = createType(8192 /* UniqueESSymbol */);
61191
61199
  type.symbol = symbol;
61192
- type.escapedName = "__@" + type.symbol.escapedName + "@" + getSymbolId(type.symbol);
61200
+ type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
61193
61201
  return type;
61194
61202
  }
61195
61203
  function getESSymbolLikeTypeForNode(node) {
@@ -62732,7 +62740,7 @@ var ts;
62732
62740
  return true;
62733
62741
  }
62734
62742
  if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {
62735
- var related = relation.get(getRelationKey(source, target, 0 /* None */, relation));
62743
+ var related = relation.get(getRelationKey(source, target, 0 /* None */, relation, /*ignoreConstraints*/ false));
62736
62744
  if (related !== undefined) {
62737
62745
  return !!(related & 1 /* Succeeded */);
62738
62746
  }
@@ -62878,24 +62886,24 @@ var ts;
62878
62886
  case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
62879
62887
  // Parenthesize a `new` if there is one
62880
62888
  if (path.indexOf("new ") === 0) {
62881
- path = "(" + path + ")";
62889
+ path = "(".concat(path, ")");
62882
62890
  }
62883
62891
  var str = "" + args[0];
62884
62892
  // If leading, just print back the arg (irrespective of if it's a valid identifier)
62885
62893
  if (path.length === 0) {
62886
- path = "" + str;
62894
+ path = "".concat(str);
62887
62895
  }
62888
62896
  // Otherwise write a dotted name if possible
62889
62897
  else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
62890
- path = path + "." + str;
62898
+ path = "".concat(path, ".").concat(str);
62891
62899
  }
62892
62900
  // Failing that, check if the name is already a computed name
62893
62901
  else if (str[0] === "[" && str[str.length - 1] === "]") {
62894
- path = "" + path + str;
62902
+ path = "".concat(path).concat(str);
62895
62903
  }
62896
62904
  // And finally write out a computed name as a last resort
62897
62905
  else {
62898
- path = path + "[" + str + "]";
62906
+ path = "".concat(path, "[").concat(str, "]");
62899
62907
  }
62900
62908
  break;
62901
62909
  }
@@ -62924,7 +62932,7 @@ var ts;
62924
62932
  msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
62925
62933
  ? ""
62926
62934
  : "...";
62927
- path = "" + prefix + path + "(" + params + ")";
62935
+ path = "".concat(prefix).concat(path, "(").concat(params, ")");
62928
62936
  }
62929
62937
  break;
62930
62938
  }
@@ -62937,7 +62945,7 @@ var ts;
62937
62945
  break;
62938
62946
  }
62939
62947
  default:
62940
- return ts.Debug.fail("Unhandled Diagnostic: " + msg.code);
62948
+ return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
62941
62949
  }
62942
62950
  }
62943
62951
  if (path) {
@@ -63581,7 +63589,8 @@ var ts;
63581
63589
  if (overflow) {
63582
63590
  return 0 /* False */;
63583
63591
  }
63584
- var id = getRelationKey(source, target, intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0), relation);
63592
+ var keyIntersectionState = intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0);
63593
+ var id = getRelationKey(source, target, keyIntersectionState, relation, /*ingnoreConstraints*/ false);
63585
63594
  var entry = relation.get(id);
63586
63595
  if (entry !== undefined) {
63587
63596
  if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) {
@@ -63608,16 +63617,13 @@ var ts;
63608
63617
  targetStack = [];
63609
63618
  }
63610
63619
  else {
63611
- // generate a key where all type parameter id positions are replaced with unconstrained type parameter ids
63612
- // this isn't perfect - nested type references passed as type arguments will muck up the indexes and thus
63613
- // prevent finding matches- but it should hit up the common cases
63614
- var broadestEquivalentId = id.split(",").map(function (i) { return i.replace(/-\d+/g, function (_match, offset) {
63615
- var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
63616
- return "=" + index;
63617
- }); }).join(",");
63620
+ // A key that starts with "*" is an indication that we have type references that reference constrained
63621
+ // type parameters. For such keys we also check against the key we would have gotten if all type parameters
63622
+ // were unconstrained.
63623
+ var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, /*ignoreConstraints*/ true) : undefined;
63618
63624
  for (var i = 0; i < maybeCount; i++) {
63619
63625
  // If source and target are already being compared, consider them related with assumptions
63620
- if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
63626
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63621
63627
  return 3 /* Maybe */;
63622
63628
  }
63623
63629
  }
@@ -63912,7 +63918,7 @@ var ts;
63912
63918
  originalErrorInfo = undefined;
63913
63919
  }
63914
63920
  }
63915
- else if (isGenericMappedType(target)) {
63921
+ else if (isGenericMappedType(target) && relation !== identityRelation) {
63916
63922
  // Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
63917
63923
  var keysRemapped = !!target.declaration.nameType;
63918
63924
  var templateType = getTemplateTypeFromMappedType(target);
@@ -65124,48 +65130,56 @@ var ts;
65124
65130
  function isTypeReferenceWithGenericArguments(type) {
65125
65131
  return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t); });
65126
65132
  }
65127
- /**
65128
- * getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
65129
- * where A.id=111 and number.id=12
65130
- */
65131
- function getTypeReferenceId(type, typeParameters, depth) {
65132
- if (depth === void 0) { depth = 0; }
65133
- var result = "" + type.target.id;
65134
- for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
65135
- var t = _a[_i];
65136
- if (isUnconstrainedTypeParameter(t)) {
65137
- var index = typeParameters.indexOf(t);
65138
- if (index < 0) {
65139
- index = typeParameters.length;
65140
- typeParameters.push(t);
65133
+ function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {
65134
+ var typeParameters = [];
65135
+ var constraintMarker = "";
65136
+ var sourceId = getTypeReferenceId(source, 0);
65137
+ var targetId = getTypeReferenceId(target, 0);
65138
+ return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
65139
+ // getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
65140
+ // where A.id=111 and number.id=12
65141
+ function getTypeReferenceId(type, depth) {
65142
+ if (depth === void 0) { depth = 0; }
65143
+ var result = "" + type.target.id;
65144
+ for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
65145
+ var t = _a[_i];
65146
+ if (t.flags & 262144 /* TypeParameter */) {
65147
+ if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {
65148
+ var index = typeParameters.indexOf(t);
65149
+ if (index < 0) {
65150
+ index = typeParameters.length;
65151
+ typeParameters.push(t);
65152
+ }
65153
+ result += "=" + index;
65154
+ continue;
65155
+ }
65156
+ // We mark type references that reference constrained type parameters such that we know to obtain
65157
+ // and look for a "broadest equivalent key" in the cache.
65158
+ constraintMarker = "*";
65159
+ }
65160
+ else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
65161
+ result += "<" + getTypeReferenceId(t, depth + 1) + ">";
65162
+ continue;
65141
65163
  }
65142
- result += "=" + index;
65143
- }
65144
- else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
65145
- result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
65146
- }
65147
- else {
65148
65164
  result += "-" + t.id;
65149
65165
  }
65166
+ return result;
65150
65167
  }
65151
- return result;
65152
65168
  }
65153
65169
  /**
65154
65170
  * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters.
65155
65171
  * For other cases, the types ids are used.
65156
65172
  */
65157
- function getRelationKey(source, target, intersectionState, relation) {
65173
+ function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
65158
65174
  if (relation === identityRelation && source.id > target.id) {
65159
65175
  var temp = source;
65160
65176
  source = target;
65161
65177
  target = temp;
65162
65178
  }
65163
65179
  var postFix = intersectionState ? ":" + intersectionState : "";
65164
- if (isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target)) {
65165
- var typeParameters = [];
65166
- return getTypeReferenceId(source, typeParameters) + "," + getTypeReferenceId(target, typeParameters) + postFix;
65167
- }
65168
- return source.id + "," + target.id + postFix;
65180
+ return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
65181
+ getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
65182
+ "".concat(source.id, ",").concat(target.id).concat(postFix);
65169
65183
  }
65170
65184
  // Invoke the callback for each underlying property symbol of the given symbol and return the first
65171
65185
  // value that isn't undefined.
@@ -65213,28 +65227,35 @@ var ts;
65213
65227
  !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
65214
65228
  }
65215
65229
  // Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
65216
- // for 5 or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
65230
+ // for maxDepth or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
65217
65231
  // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
65218
- // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least 5
65232
+ // expanding. Effectively, we will generate a false positive when two types are structurally equal to at least maxDepth
65219
65233
  // levels, but unequal at some level beyond that.
65220
- // In addition, this will also detect when an indexed access has been chained off of 5 or more times (which is essentially
65221
- // the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding false positives
65222
- // for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
65223
- // It also detects when a recursive type reference has expanded 5 or more times, eg, if the true branch of
65234
+ // In addition, this will also detect when an indexed access has been chained off of maxDepth more times (which is
65235
+ // essentially the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
65236
+ // false positives for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
65237
+ // It also detects when a recursive type reference has expanded maxDepth or more times, e.g. if the true branch of
65224
65238
  // `type A<T> = null extends T ? [A<NonNullable<T>>] : [T]`
65225
- // has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`
65226
- // in such cases we need to terminate the expansion, and we do so here.
65239
+ // has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`. In such cases we need
65240
+ // to terminate the expansion, and we do so here.
65227
65241
  function isDeeplyNestedType(type, stack, depth, maxDepth) {
65228
- if (maxDepth === void 0) { maxDepth = 5; }
65242
+ if (maxDepth === void 0) { maxDepth = 3; }
65229
65243
  if (depth >= maxDepth) {
65230
65244
  var identity_1 = getRecursionIdentity(type);
65231
65245
  var count = 0;
65246
+ var lastTypeId = 0;
65232
65247
  for (var i = 0; i < depth; i++) {
65233
- if (getRecursionIdentity(stack[i]) === identity_1) {
65234
- count++;
65235
- if (count >= maxDepth) {
65236
- return true;
65248
+ var t = stack[i];
65249
+ if (getRecursionIdentity(t) === identity_1) {
65250
+ // We only count occurrences with a higher type id than the previous occurrence, since higher
65251
+ // type ids are an indicator of newer instantiations caused by recursion.
65252
+ if (t.id >= lastTypeId) {
65253
+ count++;
65254
+ if (count >= maxDepth) {
65255
+ return true;
65256
+ }
65237
65257
  }
65258
+ lastTypeId = t.id;
65238
65259
  }
65239
65260
  }
65240
65261
  }
@@ -65973,7 +65994,8 @@ var ts;
65973
65994
  (resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) ||
65974
65995
  param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
65975
65996
  var newName = "arg" + param.parent.parameters.indexOf(param);
65976
- errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, ts.declarationNameToString(param.name));
65997
+ var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
65998
+ errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
65977
65999
  return;
65978
66000
  }
65979
66001
  diagnostic = declaration.dotDotDotToken ?
@@ -67276,11 +67298,11 @@ var ts;
67276
67298
  case 79 /* Identifier */:
67277
67299
  if (!ts.isThisInTypeQuery(node)) {
67278
67300
  var symbol = getResolvedSymbol(node);
67279
- return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType) + "|" + getSymbolId(symbol) : undefined;
67301
+ return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
67280
67302
  }
67281
67303
  // falls through
67282
67304
  case 108 /* ThisKeyword */:
67283
- return "0|" + (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType);
67305
+ return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
67284
67306
  case 229 /* NonNullExpression */:
67285
67307
  case 211 /* ParenthesizedExpression */:
67286
67308
  return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
@@ -71042,7 +71064,7 @@ var ts;
71042
71064
  !leftName ? rightName :
71043
71065
  !rightName ? leftName :
71044
71066
  undefined;
71045
- var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg" + i);
71067
+ var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
71046
71068
  paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
71047
71069
  params[i] = paramSymbol;
71048
71070
  }
@@ -72823,7 +72845,7 @@ var ts;
72823
72845
  }
72824
72846
  function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
72825
72847
  ts.Debug.assert(outerName !== undefined, "outername should always be defined");
72826
- var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
72848
+ var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
72827
72849
  ts.Debug.assertEqual(outerName, name, "name should equal outerName");
72828
72850
  var symbol = getSymbol(symbols, name, meaning);
72829
72851
  // 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
@@ -78346,7 +78368,9 @@ var ts;
78346
78368
  var typeReferenceNode = ts.tryCast(node.parent, ts.isTypeReferenceType);
78347
78369
  if (!typeReferenceNode)
78348
78370
  return undefined;
78349
- var typeParameters = getTypeParametersForTypeReference(typeReferenceNode); // TODO: GH#18217
78371
+ var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
78372
+ if (!typeParameters)
78373
+ return undefined;
78350
78374
  var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
78351
78375
  return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
78352
78376
  }
@@ -80953,7 +80977,7 @@ var ts;
80953
80977
  function getPropertyNameForKnownSymbolName(symbolName) {
80954
80978
  var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
80955
80979
  var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
80956
- return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@" + symbolName;
80980
+ return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
80957
80981
  }
80958
80982
  /**
80959
80983
  * Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
@@ -87925,7 +87949,7 @@ var ts;
87925
87949
  value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
87926
87950
  value === 62 ? 43 /* plus */ :
87927
87951
  value === 63 ? 47 /* slash */ :
87928
- ts.Debug.fail(value + ": not a base64 value");
87952
+ ts.Debug.fail("".concat(value, ": not a base64 value"));
87929
87953
  }
87930
87954
  function base64FormatDecode(ch) {
87931
87955
  return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
@@ -88000,7 +88024,7 @@ var ts;
88000
88024
  var mappings = ts.arrayFrom(decoder, processMapping);
88001
88025
  if (decoder.error !== undefined) {
88002
88026
  if (host.log) {
88003
- host.log("Encountered error while decoding sourcemap: " + decoder.error);
88027
+ host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
88004
88028
  }
88005
88029
  decodedMappings = ts.emptyArray;
88006
88030
  }
@@ -91666,7 +91690,7 @@ var ts;
91666
91690
  var propertyName = ts.isPropertyAccessExpression(originalNode)
91667
91691
  ? ts.declarationNameToString(originalNode.name)
91668
91692
  : ts.getTextOfNode(originalNode.argumentExpression);
91669
- ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " " + propertyName + " ");
91693
+ ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
91670
91694
  }
91671
91695
  return substitute;
91672
91696
  }
@@ -93058,8 +93082,8 @@ var ts;
93058
93082
  }
93059
93083
  function createHoistedVariableForClass(name, node) {
93060
93084
  var className = getPrivateIdentifierEnvironment().className;
93061
- var prefix = className ? "_" + className : "";
93062
- var identifier = factory.createUniqueName(prefix + "_" + name, 16 /* Optimistic */);
93085
+ var prefix = className ? "_".concat(className) : "";
93086
+ var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
93063
93087
  if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
93064
93088
  addBlockScopedVariable(identifier);
93065
93089
  }
@@ -94957,7 +94981,7 @@ var ts;
94957
94981
  specifierSourceImports = ts.createMap();
94958
94982
  currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
94959
94983
  }
94960
- var generatedName = factory.createUniqueName("_" + name, 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
94984
+ var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
94961
94985
  var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
94962
94986
  generatedName.generatedImportReference = specifier;
94963
94987
  specifierSourceImports.set(name, specifier);
@@ -96096,11 +96120,11 @@ var ts;
96096
96120
  }
96097
96121
  else {
96098
96122
  if (node.kind === 245 /* BreakStatement */) {
96099
- labelMarker = "break-" + label.escapedText;
96123
+ labelMarker = "break-".concat(label.escapedText);
96100
96124
  setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
96101
96125
  }
96102
96126
  else {
96103
- labelMarker = "continue-" + label.escapedText;
96127
+ labelMarker = "continue-".concat(label.escapedText);
96104
96128
  setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
96105
96129
  }
96106
96130
  }
@@ -104909,7 +104933,7 @@ var ts;
104909
104933
  return getTypeAliasDeclarationVisibilityError;
104910
104934
  }
104911
104935
  else {
104912
- return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.SyntaxKind[node.kind]);
104936
+ return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
104913
104937
  }
104914
104938
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
104915
104939
  if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
@@ -105120,7 +105144,7 @@ var ts;
105120
105144
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
105121
105145
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
105122
105146
  default:
105123
- return ts.Debug.fail("Unknown parent for parameter: " + ts.SyntaxKind[node.parent.kind]);
105147
+ return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
105124
105148
  }
105125
105149
  }
105126
105150
  function getTypeParameterConstraintVisibilityError() {
@@ -105878,7 +105902,7 @@ var ts;
105878
105902
  while (ts.length(lateMarkedStatements)) {
105879
105903
  var i = lateMarkedStatements.shift();
105880
105904
  if (!ts.isLateVisibilityPaintedStatement(i)) {
105881
- 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));
105905
+ 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));
105882
105906
  }
105883
105907
  var priorNeedsDeclare = needsDeclare;
105884
105908
  needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
@@ -106067,7 +106091,7 @@ var ts;
106067
106091
  return cleanup(input);
106068
106092
  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));
106069
106093
  }
106070
- default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
106094
+ default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
106071
106095
  }
106072
106096
  }
106073
106097
  if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
@@ -106358,7 +106382,7 @@ var ts;
106358
106382
  if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
106359
106383
  // We must add a temporary declaration for the extends clause expression
106360
106384
  var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
106361
- var newId_1 = factory.createUniqueName(oldId + "_base", 16 /* Optimistic */);
106385
+ var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
106362
106386
  getSymbolAccessibilityDiagnostic = function () { return ({
106363
106387
  diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
106364
106388
  errorNode: extendsClause_1,
@@ -106399,7 +106423,7 @@ var ts;
106399
106423
  }
106400
106424
  }
106401
106425
  // Anything left unhandled is an error, so this should be unreachable
106402
- return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.SyntaxKind[input.kind]);
106426
+ return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
106403
106427
  function cleanup(node) {
106404
106428
  if (isEnclosingDeclaration(input)) {
106405
106429
  enclosingDeclaration = previousEnclosingDeclaration;
@@ -107291,13 +107315,13 @@ var ts;
107291
107315
  if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
107292
107316
  return;
107293
107317
  if (js && configFile.options.sourceMap) {
107294
- addOutput(js + ".map");
107318
+ addOutput("".concat(js, ".map"));
107295
107319
  }
107296
107320
  if (ts.getEmitDeclarations(configFile.options)) {
107297
107321
  var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
107298
107322
  addOutput(dts);
107299
107323
  if (configFile.options.declarationMap) {
107300
- addOutput(dts + ".map");
107324
+ addOutput("".concat(dts, ".map"));
107301
107325
  }
107302
107326
  }
107303
107327
  }
@@ -107366,7 +107390,7 @@ var ts;
107366
107390
  function getFirstProjectOutput(configFile, ignoreCase) {
107367
107391
  if (ts.outFile(configFile.options)) {
107368
107392
  var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
107369
- return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output");
107393
+ return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
107370
107394
  }
107371
107395
  var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
107372
107396
  for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
@@ -107385,7 +107409,7 @@ var ts;
107385
107409
  var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
107386
107410
  if (buildInfoPath)
107387
107411
  return buildInfoPath;
107388
- return ts.Debug.fail("project " + configFile.options.configFilePath + " expected to have at least one output");
107412
+ return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
107389
107413
  }
107390
107414
  ts.getFirstProjectOutput = getFirstProjectOutput;
107391
107415
  /*@internal*/
@@ -107611,7 +107635,7 @@ var ts;
107611
107635
  if (sourceMappingURL) {
107612
107636
  if (!writer.isAtStartOfLine())
107613
107637
  writer.rawWrite(newLine);
107614
- writer.writeComment("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Tools can sometimes see this line as a source mapping url comment
107638
+ writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
107615
107639
  }
107616
107640
  // Write the source map
107617
107641
  if (sourceMapFilePath) {
@@ -107660,7 +107684,7 @@ var ts;
107660
107684
  // Encode the sourceMap into the sourceMap url
107661
107685
  var sourceMapText = sourceMapGenerator.toString();
107662
107686
  var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
107663
- return "data:application/json;base64," + base64SourceMapText;
107687
+ return "data:application/json;base64,".concat(base64SourceMapText);
107664
107688
  }
107665
107689
  var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
107666
107690
  if (mapOptions.mapRoot) {
@@ -107840,7 +107864,7 @@ var ts;
107840
107864
  return;
107841
107865
  break;
107842
107866
  default:
107843
- ts.Debug.fail("Unexpected path: " + name);
107867
+ ts.Debug.fail("Unexpected path: ".concat(name));
107844
107868
  }
107845
107869
  outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
107846
107870
  },
@@ -108700,7 +108724,7 @@ var ts;
108700
108724
  return writeTokenNode(node, writeKeyword);
108701
108725
  if (ts.isTokenKind(node.kind))
108702
108726
  return writeTokenNode(node, writePunctuation);
108703
- ts.Debug.fail("Unhandled SyntaxKind: " + ts.Debug.formatSyntaxKind(node.kind) + ".");
108727
+ ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
108704
108728
  }
108705
108729
  function emitMappedTypeParameter(node) {
108706
108730
  emit(node.name);
@@ -108870,13 +108894,13 @@ var ts;
108870
108894
  }
108871
108895
  }
108872
108896
  function emitPlaceholder(hint, node, snippet) {
108873
- nonEscapingWrite("${" + snippet.order + ":"); // `${2:`
108897
+ nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
108874
108898
  pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
108875
108899
  nonEscapingWrite("}"); // `}`
108876
108900
  // `${2:...}`
108877
108901
  }
108878
108902
  function emitTabStop(snippet) {
108879
- nonEscapingWrite("$" + snippet.order);
108903
+ nonEscapingWrite("$".concat(snippet.order));
108880
108904
  }
108881
108905
  //
108882
108906
  // Identifiers
@@ -110598,17 +110622,17 @@ var ts;
110598
110622
  writeLine();
110599
110623
  }
110600
110624
  if (currentSourceFile && currentSourceFile.moduleName) {
110601
- writeComment("/// <amd-module name=\"" + currentSourceFile.moduleName + "\" />");
110625
+ writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
110602
110626
  writeLine();
110603
110627
  }
110604
110628
  if (currentSourceFile && currentSourceFile.amdDependencies) {
110605
110629
  for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
110606
110630
  var dep = _b[_a];
110607
110631
  if (dep.name) {
110608
- writeComment("/// <amd-dependency name=\"" + dep.name + "\" path=\"" + dep.path + "\" />");
110632
+ writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
110609
110633
  }
110610
110634
  else {
110611
- writeComment("/// <amd-dependency path=\"" + dep.path + "\" />");
110635
+ writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
110612
110636
  }
110613
110637
  writeLine();
110614
110638
  }
@@ -110616,7 +110640,7 @@ var ts;
110616
110640
  for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
110617
110641
  var directive = files_2[_c];
110618
110642
  var pos = writer.getTextPos();
110619
- writeComment("/// <reference path=\"" + directive.fileName + "\" />");
110643
+ writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
110620
110644
  if (bundleFileInfo)
110621
110645
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
110622
110646
  writeLine();
@@ -110624,7 +110648,7 @@ var ts;
110624
110648
  for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
110625
110649
  var directive = types_24[_d];
110626
110650
  var pos = writer.getTextPos();
110627
- writeComment("/// <reference types=\"" + directive.fileName + "\" />");
110651
+ writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
110628
110652
  if (bundleFileInfo)
110629
110653
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
110630
110654
  writeLine();
@@ -110632,7 +110656,7 @@ var ts;
110632
110656
  for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
110633
110657
  var directive = libs_1[_e];
110634
110658
  var pos = writer.getTextPos();
110635
- writeComment("/// <reference lib=\"" + directive.fileName + "\" />");
110659
+ writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
110636
110660
  if (bundleFileInfo)
110637
110661
  bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
110638
110662
  writeLine();
@@ -111407,9 +111431,9 @@ var ts;
111407
111431
  var textSourceNode = node.textSourceNode;
111408
111432
  if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
111409
111433
  var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
111410
- return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(text) + "\"" :
111411
- neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"" + ts.escapeString(text) + "\"" :
111412
- "\"" + ts.escapeNonAsciiString(text) + "\"";
111434
+ return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
111435
+ neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
111436
+ "\"".concat(ts.escapeNonAsciiString(text), "\"");
111413
111437
  }
111414
111438
  else {
111415
111439
  return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
@@ -111886,8 +111910,8 @@ var ts;
111886
111910
  }
111887
111911
  function formatSynthesizedComment(comment) {
111888
111912
  return comment.kind === 3 /* MultiLineCommentTrivia */
111889
- ? "/*" + comment.text + "*/"
111890
- : "//" + comment.text;
111913
+ ? "/*".concat(comment.text, "*/")
111914
+ : "//".concat(comment.text);
111891
111915
  }
111892
111916
  function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
111893
111917
  enterComment();
@@ -112395,7 +112419,7 @@ var ts;
112395
112419
  var rootResult = tryReadDirectory(rootDir, rootDirPath);
112396
112420
  var rootSymLinkResult;
112397
112421
  if (rootResult !== undefined) {
112398
- return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath, directoryExists);
112422
+ return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
112399
112423
  }
112400
112424
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
112401
112425
  function getFileSystemEntries(dir) {
@@ -112608,7 +112632,7 @@ var ts;
112608
112632
  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;
112609
112633
  var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
112610
112634
  if (!newPath) {
112611
- writeLog("Project: " + configFileName + " Detected ignored path: " + fileOrDirectory);
112635
+ writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
112612
112636
  return true;
112613
112637
  }
112614
112638
  fileOrDirectoryPath = newPath;
@@ -112617,11 +112641,11 @@ var ts;
112617
112641
  // If the the added or created file or directory is not supported file name, ignore the file
112618
112642
  // But when watched directory is added/removed, we need to reload the file list
112619
112643
  if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
112620
- writeLog("Project: " + configFileName + " Detected file add/remove of non supported extension: " + fileOrDirectory);
112644
+ writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
112621
112645
  return true;
112622
112646
  }
112623
112647
  if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
112624
- writeLog("Project: " + configFileName + " Detected excluded file: " + fileOrDirectory);
112648
+ writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
112625
112649
  return true;
112626
112650
  }
112627
112651
  if (!program)
@@ -112645,7 +112669,7 @@ var ts;
112645
112669
  var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
112646
112670
  if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
112647
112671
  hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
112648
- writeLog("Project: " + configFileName + " Detected output file: " + fileOrDirectory);
112672
+ writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
112649
112673
  return true;
112650
112674
  }
112651
112675
  return false;
@@ -112713,36 +112737,36 @@ var ts;
112713
112737
  host.useCaseSensitiveFileNames();
112714
112738
  }
112715
112739
  function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
112716
- log("ExcludeWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112740
+ log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112717
112741
  return {
112718
- close: function () { return log("ExcludeWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)); }
112742
+ close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
112719
112743
  };
112720
112744
  }
112721
112745
  function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
112722
- log("FileWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112746
+ log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112723
112747
  var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
112724
112748
  return {
112725
112749
  close: function () {
112726
- log("FileWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112750
+ log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
112727
112751
  watcher.close();
112728
112752
  }
112729
112753
  };
112730
112754
  }
112731
112755
  function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
112732
- var watchInfo = "DirectoryWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112756
+ var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112733
112757
  log(watchInfo);
112734
112758
  var start = ts.timestamp();
112735
112759
  var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
112736
112760
  var elapsed = ts.timestamp() - start;
112737
- log("Elapsed:: " + elapsed + "ms " + watchInfo);
112761
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
112738
112762
  return {
112739
112763
  close: function () {
112740
- var watchInfo = "DirectoryWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112764
+ var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
112741
112765
  log(watchInfo);
112742
112766
  var start = ts.timestamp();
112743
112767
  watcher.close();
112744
112768
  var elapsed = ts.timestamp() - start;
112745
- log("Elapsed:: " + elapsed + "ms " + watchInfo);
112769
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
112746
112770
  }
112747
112771
  };
112748
112772
  }
@@ -112752,16 +112776,16 @@ var ts;
112752
112776
  for (var _i = 0; _i < arguments.length; _i++) {
112753
112777
  args[_i] = arguments[_i];
112754
112778
  }
112755
- var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher") + ":: Triggered with " + args[0] + " " + (args[1] !== undefined ? args[1] : "") + ":: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
112779
+ 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));
112756
112780
  log(triggerredInfo);
112757
112781
  var start = ts.timestamp();
112758
112782
  cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
112759
112783
  var elapsed = ts.timestamp() - start;
112760
- log("Elapsed:: " + elapsed + "ms " + triggerredInfo);
112784
+ log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
112761
112785
  }, flags, options, detailInfo1, detailInfo2); };
112762
112786
  }
112763
112787
  function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
112764
- return "WatchInfo: " + file + " " + flags + " " + JSON.stringify(options) + " " + (getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : detailInfo1 + " " + detailInfo2);
112788
+ return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
112765
112789
  }
112766
112790
  }
112767
112791
  ts.getWatchFactory = getWatchFactory;
@@ -113068,12 +113092,12 @@ var ts;
113068
113092
  }
113069
113093
  ts.formatDiagnostics = formatDiagnostics;
113070
113094
  function formatDiagnostic(diagnostic, host) {
113071
- var errorMessage = ts.diagnosticCategoryName(diagnostic) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine();
113095
+ var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
113072
113096
  if (diagnostic.file) {
113073
113097
  var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
113074
113098
  var fileName = diagnostic.file.fileName;
113075
113099
  var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
113076
- return relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): " + errorMessage;
113100
+ return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
113077
113101
  }
113078
113102
  return errorMessage;
113079
113103
  }
@@ -113161,9 +113185,9 @@ var ts;
113161
113185
  var output = "";
113162
113186
  output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
113163
113187
  output += ":";
113164
- output += color("" + (firstLine + 1), ForegroundColorEscapeSequences.Yellow);
113188
+ output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
113165
113189
  output += ":";
113166
- output += color("" + (firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
113190
+ output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
113167
113191
  return output;
113168
113192
  }
113169
113193
  ts.formatLocation = formatLocation;
@@ -113177,7 +113201,7 @@ var ts;
113177
113201
  output += " - ";
113178
113202
  }
113179
113203
  output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
113180
- output += formatColorAndReset(" TS" + diagnostic.code + ": ", ForegroundColorEscapeSequences.Grey);
113204
+ output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
113181
113205
  output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
113182
113206
  if (diagnostic.file) {
113183
113207
  output += host.getNewLine();
@@ -113286,7 +113310,7 @@ var ts;
113286
113310
  var result = void 0;
113287
113311
  var mode = getModeForResolutionAtIndex(containingFile, i);
113288
113312
  i++;
113289
- var cacheKey = mode !== undefined ? mode + "|" + name : name;
113313
+ var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
113290
113314
  if (cache.has(cacheKey)) {
113291
113315
  result = cache.get(cacheKey);
113292
113316
  }
@@ -115370,7 +115394,7 @@ var ts;
115370
115394
  path += (i === 2 ? "/" : "-") + components[i];
115371
115395
  i++;
115372
115396
  }
115373
- var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_" + libFileName + "__.ts");
115397
+ var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
115374
115398
  var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
115375
115399
  if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
115376
115400
  return localOverrideModuleResult.resolvedModule.resolvedFileName;
@@ -116191,12 +116215,12 @@ var ts;
116191
116215
  }
116192
116216
  function directoryExistsIfProjectReferenceDeclDir(dir) {
116193
116217
  var dirPath = host.toPath(dir);
116194
- var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator;
116218
+ var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
116195
116219
  return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
116196
116220
  // Any parent directory of declaration dir
116197
116221
  ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
116198
116222
  // Any directory inside declaration dir
116199
- ts.startsWith(dirPath, declDirPath + "/"); });
116223
+ ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
116200
116224
  }
116201
116225
  function handleDirectoryCouldBeSymlink(directory) {
116202
116226
  var _a;
@@ -116249,7 +116273,7 @@ var ts;
116249
116273
  if (isFile && result) {
116250
116274
  // Store the real path for the file'
116251
116275
  var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
116252
- symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), ""));
116276
+ symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
116253
116277
  }
116254
116278
  return result;
116255
116279
  }) || false;
@@ -116707,7 +116731,7 @@ var ts;
116707
116731
  /*forceDtsEmit*/ true);
116708
116732
  var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
116709
116733
  if (firstDts_1) {
116710
- 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; })); });
116734
+ 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; }))); });
116711
116735
  latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
116712
116736
  if (exportedModulesMapCache && latestSignature !== prevSignature) {
116713
116737
  updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
@@ -117215,7 +117239,7 @@ var ts;
117215
117239
  return;
117216
117240
  }
117217
117241
  else {
117218
- 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);
117242
+ 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));
117219
117243
  }
117220
117244
  if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
117221
117245
  forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
@@ -118360,7 +118384,7 @@ var ts;
118360
118384
  failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
118361
118385
  var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
118362
118386
  var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
118363
- ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath);
118387
+ ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
118364
118388
  if (failedLookupPathSplit.length > rootSplitLength + 1) {
118365
118389
  // Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
118366
118390
  return {
@@ -119342,13 +119366,15 @@ var ts;
119342
119366
  if (host.fileExists(packageJsonPath)) {
119343
119367
  var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
119344
119368
  // TODO: Inject `require` or `import` condition based on the intended import mode
119345
- var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
119346
- if (fromExports) {
119347
- var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
119348
- return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
119349
- }
119350
- if (packageJsonContent.exports) {
119351
- return { moduleFileToTry: path, blockedByExports: true };
119369
+ if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
119370
+ var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
119371
+ if (fromExports) {
119372
+ var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
119373
+ return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
119374
+ }
119375
+ if (packageJsonContent.exports) {
119376
+ return { moduleFileToTry: path, blockedByExports: true };
119377
+ }
119352
119378
  }
119353
119379
  var versionPaths = packageJsonContent.typesVersions
119354
119380
  ? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
@@ -119472,7 +119498,7 @@ var ts;
119472
119498
  }
119473
119499
  function getJSExtensionForFile(fileName, options) {
119474
119500
  var _a;
119475
- return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension " + ts.extensionFromPath(fileName) + " is unsupported:: FileName:: " + fileName);
119501
+ return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
119476
119502
  }
119477
119503
  function tryGetJSExtensionForFile(fileName, options) {
119478
119504
  var ext = ts.tryGetExtensionFromPath(fileName);
@@ -119575,8 +119601,8 @@ var ts;
119575
119601
  return pretty ?
119576
119602
  function (diagnostic, newLine, options) {
119577
119603
  clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
119578
- var output = "[" + ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] ";
119579
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (newLine + newLine);
119604
+ var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
119605
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
119580
119606
  system.write(output);
119581
119607
  } :
119582
119608
  function (diagnostic, newLine, options) {
@@ -119584,8 +119610,8 @@ var ts;
119584
119610
  if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
119585
119611
  output += newLine;
119586
119612
  }
119587
- output += getLocaleTimeString(system) + " - ";
119588
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + getPlainDiagnosticFollowingNewLines(diagnostic, newLine);
119613
+ output += "".concat(getLocaleTimeString(system), " - ");
119614
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
119589
119615
  system.write(output);
119590
119616
  };
119591
119617
  }
@@ -119613,7 +119639,7 @@ var ts;
119613
119639
  if (errorCount === 0)
119614
119640
  return "";
119615
119641
  var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
119616
- return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine;
119642
+ return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
119617
119643
  }
119618
119644
  ts.getErrorSummaryText = getErrorSummaryText;
119619
119645
  function isBuilderProgram(program) {
@@ -119639,9 +119665,9 @@ var ts;
119639
119665
  var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
119640
119666
  for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
119641
119667
  var file = _c[_i];
119642
- write("" + toFileName(file, relativeFileName));
119643
- (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" " + fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText); });
119644
- (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" " + d.messageText); });
119668
+ write("".concat(toFileName(file, relativeFileName)));
119669
+ (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
119670
+ (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
119645
119671
  }
119646
119672
  }
119647
119673
  ts.explainFiles = explainFiles;
@@ -119681,7 +119707,7 @@ var ts;
119681
119707
  if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
119682
119708
  return false;
119683
119709
  var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
119684
- return !!pattern && ts.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(fileName);
119710
+ return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
119685
119711
  });
119686
119712
  }
119687
119713
  ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
@@ -119690,7 +119716,7 @@ var ts;
119690
119716
  var options = program.getCompilerOptions();
119691
119717
  if (ts.isReferencedFile(reason)) {
119692
119718
  var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
119693
- var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"" + referenceLocation.text + "\"";
119719
+ var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
119694
119720
  var message = void 0;
119695
119721
  ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
119696
119722
  switch (reason.kind) {
@@ -119814,7 +119840,7 @@ var ts;
119814
119840
  var currentDir_1 = program.getCurrentDirectory();
119815
119841
  ts.forEach(emittedFiles, function (file) {
119816
119842
  var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
119817
- write("TSFILE: " + filepath);
119843
+ write("TSFILE: ".concat(filepath));
119818
119844
  });
119819
119845
  listFiles(program, write);
119820
119846
  }
@@ -120142,7 +120168,7 @@ var ts;
120142
120168
  }
120143
120169
  var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
120144
120170
  var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
120145
- writeLog("Current directory: " + currentDirectory + " CaseSensitiveFileNames: " + useCaseSensitiveFileNames);
120171
+ writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
120146
120172
  var configFileWatcher;
120147
120173
  if (configFileName) {
120148
120174
  configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
@@ -120291,10 +120317,10 @@ var ts;
120291
120317
  function createNewProgram(hasInvalidatedResolution) {
120292
120318
  // Compile the program
120293
120319
  writeLog("CreatingProgramWith::");
120294
- writeLog(" roots: " + JSON.stringify(rootFileNames));
120295
- writeLog(" options: " + JSON.stringify(compilerOptions));
120320
+ writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
120321
+ writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
120296
120322
  if (projectReferences)
120297
- writeLog(" projectReferences: " + JSON.stringify(projectReferences));
120323
+ writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
120298
120324
  var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
120299
120325
  hasChangedCompilerOptions = false;
120300
120326
  hasChangedConfigFileParsingErrors = false;
@@ -120455,7 +120481,7 @@ var ts;
120455
120481
  return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
120456
120482
  }
120457
120483
  var pending = clearInvalidateResolutionsOfFailedLookupLocations();
120458
- writeLog("Scheduling invalidateFailedLookup" + (pending ? ", Cancelled earlier one" : ""));
120484
+ writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
120459
120485
  timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
120460
120486
  }
120461
120487
  function invalidateResolutionsOfFailedLookup() {
@@ -120515,7 +120541,7 @@ var ts;
120515
120541
  synchronizeProgram();
120516
120542
  }
120517
120543
  function reloadConfigFile() {
120518
- writeLog("Reloading config file: " + configFileName);
120544
+ writeLog("Reloading config file: ".concat(configFileName));
120519
120545
  reloadLevel = ts.ConfigFileProgramReloadLevel.None;
120520
120546
  if (cachedDirectoryStructureHost) {
120521
120547
  cachedDirectoryStructureHost.clearCache();
@@ -120556,7 +120582,7 @@ var ts;
120556
120582
  return config.parsedCommandLine;
120557
120583
  }
120558
120584
  }
120559
- writeLog("Loading config file: " + configFileName);
120585
+ writeLog("Loading config file: ".concat(configFileName));
120560
120586
  var parsedCommandLine = host.getParsedCommandLine ?
120561
120587
  host.getParsedCommandLine(configFileName) :
120562
120588
  getParsedCommandLineFromConfigFileHost(configFileName);
@@ -120860,8 +120886,8 @@ var ts;
120860
120886
  */
120861
120887
  function createBuilderStatusReporter(system, pretty) {
120862
120888
  return function (diagnostic) {
120863
- var output = pretty ? "[" + ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] " : ts.getLocaleTimeString(system) + " - ";
120864
- output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (system.newLine + system.newLine);
120889
+ var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
120890
+ output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
120865
120891
  system.write(output);
120866
120892
  };
120867
120893
  }
@@ -121636,7 +121662,7 @@ var ts;
121636
121662
  function listEmittedFile(_a, proj, file) {
121637
121663
  var write = _a.write;
121638
121664
  if (write && proj.options.listEmittedFiles) {
121639
- write("TSFILE: " + file);
121665
+ write("TSFILE: ".concat(file));
121640
121666
  }
121641
121667
  }
121642
121668
  function getOldProgram(_a, proj, parsed) {
@@ -121665,7 +121691,7 @@ var ts;
121665
121691
  function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
121666
121692
  var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
121667
121693
  reportAndStoreErrors(state, resolvedPath, diagnostics);
121668
- state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
121694
+ state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
121669
121695
  if (canEmitBuildInfo)
121670
121696
  return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
121671
121697
  afterProgramDone(state, program, config);
@@ -121693,7 +121719,7 @@ var ts;
121693
121719
  if (!host.fileExists(inputFile)) {
121694
121720
  return {
121695
121721
  type: ts.UpToDateStatusType.Unbuildable,
121696
- reason: inputFile + " does not exist"
121722
+ reason: "".concat(inputFile, " does not exist")
121697
121723
  };
121698
121724
  }
121699
121725
  if (!force) {
@@ -122052,7 +122078,7 @@ var ts;
122052
122078
  }
122053
122079
  }
122054
122080
  if (filesToDelete) {
122055
- reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join(""));
122081
+ 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(""));
122056
122082
  }
122057
122083
  return ts.ExitStatus.Success;
122058
122084
  }
@@ -122385,7 +122411,7 @@ var ts;
122385
122411
  function nowString() {
122386
122412
  // E.g. "12:34:56.789"
122387
122413
  var d = new Date();
122388
- 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");
122414
+ 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"));
122389
122415
  }
122390
122416
  server.nowString = nowString;
122391
122417
  })(server = ts.server || (ts.server = {}));
@@ -122396,7 +122422,7 @@ var ts;
122396
122422
  var JsTyping;
122397
122423
  (function (JsTyping) {
122398
122424
  function isTypingUpToDate(cachedTyping, availableTypingVersions) {
122399
- var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts" + ts.versionMajorMinor) || ts.getProperty(availableTypingVersions, "latest"));
122425
+ var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
122400
122426
  return availableVersion.compareTo(cachedTyping.version) <= 0;
122401
122427
  }
122402
122428
  JsTyping.isTypingUpToDate = isTypingUpToDate;
@@ -122449,7 +122475,7 @@ var ts;
122449
122475
  "worker_threads",
122450
122476
  "zlib"
122451
122477
  ];
122452
- JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:" + name; });
122478
+ JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
122453
122479
  JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
122454
122480
  JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
122455
122481
  function nonRelativeModuleNameForTypingCache(moduleName) {
@@ -122528,7 +122554,7 @@ var ts;
122528
122554
  var excludeTypingName = exclude_1[_i];
122529
122555
  var didDelete = inferredTypings.delete(excludeTypingName);
122530
122556
  if (didDelete && log)
122531
- log("Typing for " + excludeTypingName + " is in exclude list, will be ignored.");
122557
+ log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
122532
122558
  }
122533
122559
  var newTypingNames = [];
122534
122560
  var cachedTypingPaths = [];
@@ -122542,7 +122568,7 @@ var ts;
122542
122568
  });
122543
122569
  var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
122544
122570
  if (log)
122545
- log("Result: " + JSON.stringify(result));
122571
+ log("Result: ".concat(JSON.stringify(result)));
122546
122572
  return result;
122547
122573
  function addInferredTyping(typingName) {
122548
122574
  if (!inferredTypings.has(typingName)) {
@@ -122551,7 +122577,7 @@ var ts;
122551
122577
  }
122552
122578
  function addInferredTypings(typingNames, message) {
122553
122579
  if (log)
122554
- log(message + ": " + JSON.stringify(typingNames));
122580
+ log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
122555
122581
  ts.forEach(typingNames, addInferredTyping);
122556
122582
  }
122557
122583
  /**
@@ -122564,7 +122590,7 @@ var ts;
122564
122590
  filesToWatch.push(jsonPath);
122565
122591
  var jsonConfig = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); }).config;
122566
122592
  var jsonTypingNames = ts.flatMap([jsonConfig.dependencies, jsonConfig.devDependencies, jsonConfig.optionalDependencies, jsonConfig.peerDependencies], ts.getOwnKeys);
122567
- addInferredTypings(jsonTypingNames, "Typing names in '" + jsonPath + "' dependencies");
122593
+ addInferredTypings(jsonTypingNames, "Typing names in '".concat(jsonPath, "' dependencies"));
122568
122594
  }
122569
122595
  /**
122570
122596
  * Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
@@ -122603,7 +122629,7 @@ var ts;
122603
122629
  // depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar`
122604
122630
  var fileNames = host.readDirectory(packagesFolderPath, [".json" /* Json */], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
122605
122631
  if (log)
122606
- log("Searching for typing names in " + packagesFolderPath + "; all files: " + JSON.stringify(fileNames));
122632
+ log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(fileNames)));
122607
122633
  var packageNames = [];
122608
122634
  for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
122609
122635
  var fileName = fileNames_1[_i];
@@ -122630,7 +122656,7 @@ var ts;
122630
122656
  if (ownTypes) {
122631
122657
  var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
122632
122658
  if (log)
122633
- log(" Package '" + packageJson.name + "' provides its own types.");
122659
+ log(" Package '".concat(packageJson.name, "' provides its own types."));
122634
122660
  inferredTypings.set(packageJson.name, absolutePath);
122635
122661
  }
122636
122662
  else {
@@ -122702,15 +122728,15 @@ var ts;
122702
122728
  var kind = isScopeName ? "Scope" : "Package";
122703
122729
  switch (result) {
122704
122730
  case 1 /* EmptyName */:
122705
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot be empty";
122731
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
122706
122732
  case 2 /* NameTooLong */:
122707
- return "'" + typing + "':: " + kind + " name '" + name + "' should be less than " + maxPackageNameLength + " characters";
122733
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
122708
122734
  case 3 /* NameStartsWithDot */:
122709
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '.'";
122735
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
122710
122736
  case 4 /* NameStartsWithUnderscore */:
122711
- return "'" + typing + "':: " + kind + " name '" + name + "' cannot start with '_'";
122737
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
122712
122738
  case 5 /* NameContainsNonURISafeCharacters */:
122713
- return "'" + typing + "':: " + kind + " name '" + name + "' contains non URI safe characters";
122739
+ return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
122714
122740
  case 0 /* Ok */:
122715
122741
  return ts.Debug.fail(); // Shouldn't have called this.
122716
122742
  default:
@@ -122736,7 +122762,7 @@ var ts;
122736
122762
  }
122737
122763
  catch (e) {
122738
122764
  if (log.isEnabled()) {
122739
- log.writeLine("Failed to resolve " + packageName + " in folder '" + cachePath + "': " + e.message);
122765
+ log.writeLine("Failed to resolve ".concat(packageName, " in folder '").concat(cachePath, "': ").concat(e.message));
122740
122766
  }
122741
122767
  return undefined;
122742
122768
  }
@@ -122757,7 +122783,7 @@ var ts;
122757
122783
  var sliceStart = packageNames.length - remaining;
122758
122784
  var command, toSlice = remaining;
122759
122785
  while (true) {
122760
- command = npmPath + " install --ignore-scripts " + (toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice)).join(" ") + " --save-dev --user-agent=\"typesInstaller/" + tsVersion + "\"";
122786
+ command = "".concat(npmPath, " install --ignore-scripts ").concat((toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice)).join(" "), " --save-dev --user-agent=\"typesInstaller/").concat(tsVersion, "\"");
122761
122787
  if (command.length < 8000) {
122762
122788
  break;
122763
122789
  }
@@ -122784,7 +122810,7 @@ var ts;
122784
122810
  ProjectWatcherType["DirectoryWatcher"] = "DirectoryWatcher";
122785
122811
  })(ProjectWatcherType || (ProjectWatcherType = {}));
122786
122812
  function getDetailWatchInfo(projectName, watchers) {
122787
- return "Project: " + projectName + " watcher already invoked: " + watchers.isInvoked;
122813
+ return "Project: ".concat(projectName, " watcher already invoked: ").concat(watchers.isInvoked);
122788
122814
  }
122789
122815
  var TypingsInstaller = /** @class */ (function () {
122790
122816
  function TypingsInstaller(installTypingHost, globalCachePath, safeListPath, typesMapLocation, throttleLimit, log) {
@@ -122808,7 +122834,7 @@ var ts;
122808
122834
  this.globalCachePackageJsonPath = ts.combinePaths(globalCachePath, "package.json");
122809
122835
  var isLoggingEnabled = this.log.isEnabled();
122810
122836
  if (isLoggingEnabled) {
122811
- this.log.writeLine("Global cache location '" + globalCachePath + "', safe file path '" + safeListPath + "', types map path " + typesMapLocation);
122837
+ this.log.writeLine("Global cache location '".concat(globalCachePath, "', safe file path '").concat(safeListPath, "', types map path ").concat(typesMapLocation));
122812
122838
  }
122813
122839
  this.watchFactory = ts.getWatchFactory(this.installTypingHost, isLoggingEnabled ? ts.WatchLogLevel.Verbose : ts.WatchLogLevel.None, function (s) { return _this.log.writeLine(s); }, getDetailWatchInfo);
122814
122840
  this.processCacheLocation(this.globalCachePath);
@@ -122818,30 +122844,30 @@ var ts;
122818
122844
  };
122819
122845
  TypingsInstaller.prototype.closeWatchers = function (projectName) {
122820
122846
  if (this.log.isEnabled()) {
122821
- this.log.writeLine("Closing file watchers for project '" + projectName + "'");
122847
+ this.log.writeLine("Closing file watchers for project '".concat(projectName, "'"));
122822
122848
  }
122823
122849
  var watchers = this.projectWatchers.get(projectName);
122824
122850
  if (!watchers) {
122825
122851
  if (this.log.isEnabled()) {
122826
- this.log.writeLine("No watchers are registered for project '" + projectName + "'");
122852
+ this.log.writeLine("No watchers are registered for project '".concat(projectName, "'"));
122827
122853
  }
122828
122854
  return;
122829
122855
  }
122830
122856
  ts.clearMap(watchers, ts.closeFileWatcher);
122831
122857
  this.projectWatchers.delete(projectName);
122832
122858
  if (this.log.isEnabled()) {
122833
- this.log.writeLine("Closing file watchers for project '" + projectName + "' - done.");
122859
+ this.log.writeLine("Closing file watchers for project '".concat(projectName, "' - done."));
122834
122860
  }
122835
122861
  };
122836
122862
  TypingsInstaller.prototype.install = function (req) {
122837
122863
  var _this = this;
122838
122864
  if (this.log.isEnabled()) {
122839
- this.log.writeLine("Got install request " + JSON.stringify(req));
122865
+ this.log.writeLine("Got install request ".concat(JSON.stringify(req)));
122840
122866
  }
122841
122867
  // load existing typing information from the cache
122842
122868
  if (req.cachePath) {
122843
122869
  if (this.log.isEnabled()) {
122844
- this.log.writeLine("Request specifies cache path '" + req.cachePath + "', loading cached information...");
122870
+ this.log.writeLine("Request specifies cache path '".concat(req.cachePath, "', loading cached information..."));
122845
122871
  }
122846
122872
  this.processCacheLocation(req.cachePath);
122847
122873
  }
@@ -122850,7 +122876,7 @@ var ts;
122850
122876
  }
122851
122877
  var discoverTypingsResult = ts.JsTyping.discoverTypings(this.installTypingHost, this.log.isEnabled() ? (function (s) { return _this.log.writeLine(s); }) : undefined, req.fileNames, req.projectRootPath, this.safeList, this.packageNameToTypingLocation, req.typeAcquisition, req.unresolvedImports, this.typesRegistry);
122852
122878
  if (this.log.isEnabled()) {
122853
- this.log.writeLine("Finished typings discovery: " + JSON.stringify(discoverTypingsResult));
122879
+ this.log.writeLine("Finished typings discovery: ".concat(JSON.stringify(discoverTypingsResult)));
122854
122880
  }
122855
122881
  // start watching files
122856
122882
  this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch, req.projectRootPath, req.watchOptions);
@@ -122870,17 +122896,17 @@ var ts;
122870
122896
  if (this.typesMapLocation) {
122871
122897
  var safeListFromMap = ts.JsTyping.loadTypesMap(this.installTypingHost, this.typesMapLocation);
122872
122898
  if (safeListFromMap) {
122873
- this.log.writeLine("Loaded safelist from types map file '" + this.typesMapLocation + "'");
122899
+ this.log.writeLine("Loaded safelist from types map file '".concat(this.typesMapLocation, "'"));
122874
122900
  this.safeList = safeListFromMap;
122875
122901
  return;
122876
122902
  }
122877
- this.log.writeLine("Failed to load safelist from types map file '" + this.typesMapLocation + "'");
122903
+ this.log.writeLine("Failed to load safelist from types map file '".concat(this.typesMapLocation, "'"));
122878
122904
  }
122879
122905
  this.safeList = ts.JsTyping.loadSafeList(this.installTypingHost, this.safeListPath);
122880
122906
  };
122881
122907
  TypingsInstaller.prototype.processCacheLocation = function (cacheLocation) {
122882
122908
  if (this.log.isEnabled()) {
122883
- this.log.writeLine("Processing cache location '" + cacheLocation + "'");
122909
+ this.log.writeLine("Processing cache location '".concat(cacheLocation, "'"));
122884
122910
  }
122885
122911
  if (this.knownCachesSet.has(cacheLocation)) {
122886
122912
  if (this.log.isEnabled()) {
@@ -122891,14 +122917,14 @@ var ts;
122891
122917
  var packageJson = ts.combinePaths(cacheLocation, "package.json");
122892
122918
  var packageLockJson = ts.combinePaths(cacheLocation, "package-lock.json");
122893
122919
  if (this.log.isEnabled()) {
122894
- this.log.writeLine("Trying to find '" + packageJson + "'...");
122920
+ this.log.writeLine("Trying to find '".concat(packageJson, "'..."));
122895
122921
  }
122896
122922
  if (this.installTypingHost.fileExists(packageJson) && this.installTypingHost.fileExists(packageLockJson)) {
122897
122923
  var npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson)); // TODO: GH#18217
122898
122924
  var npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson)); // TODO: GH#18217
122899
122925
  if (this.log.isEnabled()) {
122900
- this.log.writeLine("Loaded content of '" + packageJson + "': " + JSON.stringify(npmConfig));
122901
- this.log.writeLine("Loaded content of '" + packageLockJson + "'");
122926
+ this.log.writeLine("Loaded content of '".concat(packageJson, "': ").concat(JSON.stringify(npmConfig)));
122927
+ this.log.writeLine("Loaded content of '".concat(packageLockJson, "'"));
122902
122928
  }
122903
122929
  if (npmConfig.devDependencies && npmLock.dependencies) {
122904
122930
  for (var key in npmConfig.devDependencies) {
@@ -122922,11 +122948,11 @@ var ts;
122922
122948
  continue;
122923
122949
  }
122924
122950
  if (this.log.isEnabled()) {
122925
- this.log.writeLine("New typing for package " + packageName + " from '" + typingFile + "' conflicts with existing typing file '" + existingTypingFile + "'");
122951
+ this.log.writeLine("New typing for package ".concat(packageName, " from '").concat(typingFile, "' conflicts with existing typing file '").concat(existingTypingFile, "'"));
122926
122952
  }
122927
122953
  }
122928
122954
  if (this.log.isEnabled()) {
122929
- this.log.writeLine("Adding entry into typings cache: '" + packageName + "' => '" + typingFile + "'");
122955
+ this.log.writeLine("Adding entry into typings cache: '".concat(packageName, "' => '").concat(typingFile, "'"));
122930
122956
  }
122931
122957
  var info = ts.getProperty(npmLock.dependencies, key);
122932
122958
  var version_1 = info && info.version;
@@ -122939,7 +122965,7 @@ var ts;
122939
122965
  }
122940
122966
  }
122941
122967
  if (this.log.isEnabled()) {
122942
- this.log.writeLine("Finished processing cache location '" + cacheLocation + "'");
122968
+ this.log.writeLine("Finished processing cache location '".concat(cacheLocation, "'"));
122943
122969
  }
122944
122970
  this.knownCachesSet.add(cacheLocation);
122945
122971
  };
@@ -122949,7 +122975,7 @@ var ts;
122949
122975
  var typingKey = ts.mangleScopedPackageName(typing);
122950
122976
  if (_this.missingTypingsSet.has(typingKey)) {
122951
122977
  if (_this.log.isEnabled())
122952
- _this.log.writeLine("'" + typing + "':: '" + typingKey + "' is in missingTypingsSet - skipping...");
122978
+ _this.log.writeLine("'".concat(typing, "':: '").concat(typingKey, "' is in missingTypingsSet - skipping..."));
122953
122979
  return undefined;
122954
122980
  }
122955
122981
  var validationResult = ts.JsTyping.validatePackageName(typing);
@@ -122962,12 +122988,12 @@ var ts;
122962
122988
  }
122963
122989
  if (!_this.typesRegistry.has(typingKey)) {
122964
122990
  if (_this.log.isEnabled())
122965
- _this.log.writeLine("'" + typing + "':: Entry for package '" + typingKey + "' does not exist in local types registry - skipping...");
122991
+ _this.log.writeLine("'".concat(typing, "':: Entry for package '").concat(typingKey, "' does not exist in local types registry - skipping..."));
122966
122992
  return undefined;
122967
122993
  }
122968
122994
  if (_this.packageNameToTypingLocation.get(typingKey) && ts.JsTyping.isTypingUpToDate(_this.packageNameToTypingLocation.get(typingKey), _this.typesRegistry.get(typingKey))) {
122969
122995
  if (_this.log.isEnabled())
122970
- _this.log.writeLine("'" + typing + "':: '" + typingKey + "' already has an up-to-date typing - skipping...");
122996
+ _this.log.writeLine("'".concat(typing, "':: '").concat(typingKey, "' already has an up-to-date typing - skipping..."));
122971
122997
  return undefined;
122972
122998
  }
122973
122999
  return typingKey;
@@ -122976,11 +123002,11 @@ var ts;
122976
123002
  TypingsInstaller.prototype.ensurePackageDirectoryExists = function (directory) {
122977
123003
  var npmConfigPath = ts.combinePaths(directory, "package.json");
122978
123004
  if (this.log.isEnabled()) {
122979
- this.log.writeLine("Npm config file: " + npmConfigPath);
123005
+ this.log.writeLine("Npm config file: ".concat(npmConfigPath));
122980
123006
  }
122981
123007
  if (!this.installTypingHost.fileExists(npmConfigPath)) {
122982
123008
  if (this.log.isEnabled()) {
122983
- this.log.writeLine("Npm config file: '" + npmConfigPath + "' is missing, creating new one...");
123009
+ this.log.writeLine("Npm config file: '".concat(npmConfigPath, "' is missing, creating new one..."));
122984
123010
  }
122985
123011
  this.ensureDirectoryExists(directory, this.installTypingHost);
122986
123012
  this.installTypingHost.writeFile(npmConfigPath, '{ "private": true }');
@@ -122989,7 +123015,7 @@ var ts;
122989
123015
  TypingsInstaller.prototype.installTypings = function (req, cachePath, currentlyCachedTypings, typingsToInstall) {
122990
123016
  var _this = this;
122991
123017
  if (this.log.isEnabled()) {
122992
- this.log.writeLine("Installing typings " + JSON.stringify(typingsToInstall));
123018
+ this.log.writeLine("Installing typings ".concat(JSON.stringify(typingsToInstall)));
122993
123019
  }
122994
123020
  var filteredTypings = this.filterTypings(typingsToInstall);
122995
123021
  if (filteredTypings.length === 0) {
@@ -123016,7 +123042,7 @@ var ts;
123016
123042
  try {
123017
123043
  if (!ok) {
123018
123044
  if (_this.log.isEnabled()) {
123019
- _this.log.writeLine("install request failed, marking packages as missing to prevent repeated requests: " + JSON.stringify(filteredTypings));
123045
+ _this.log.writeLine("install request failed, marking packages as missing to prevent repeated requests: ".concat(JSON.stringify(filteredTypings)));
123020
123046
  }
123021
123047
  for (var _i = 0, filteredTypings_1 = filteredTypings; _i < filteredTypings_1.length; _i++) {
123022
123048
  var typing = filteredTypings_1[_i];
@@ -123026,7 +123052,7 @@ var ts;
123026
123052
  }
123027
123053
  // TODO: watch project directory
123028
123054
  if (_this.log.isEnabled()) {
123029
- _this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
123055
+ _this.log.writeLine("Installed typings ".concat(JSON.stringify(scopedTypings)));
123030
123056
  }
123031
123057
  var installedTypingFiles = [];
123032
123058
  for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
@@ -123038,13 +123064,13 @@ var ts;
123038
123064
  }
123039
123065
  // packageName is guaranteed to exist in typesRegistry by filterTypings
123040
123066
  var distTags = _this.typesRegistry.get(packageName);
123041
- var newVersion = new ts.Version(distTags["ts" + ts.versionMajorMinor] || distTags[_this.latestDistTag]);
123067
+ var newVersion = new ts.Version(distTags["ts".concat(ts.versionMajorMinor)] || distTags[_this.latestDistTag]);
123042
123068
  var newTyping = { typingLocation: typingFile, version: newVersion };
123043
123069
  _this.packageNameToTypingLocation.set(packageName, newTyping);
123044
123070
  installedTypingFiles.push(typingFile);
123045
123071
  }
123046
123072
  if (_this.log.isEnabled()) {
123047
- _this.log.writeLine("Installed typing files " + JSON.stringify(installedTypingFiles));
123073
+ _this.log.writeLine("Installed typing files ".concat(JSON.stringify(installedTypingFiles)));
123048
123074
  }
123049
123075
  _this.sendResponse(_this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles)));
123050
123076
  }
@@ -123098,7 +123124,7 @@ var ts;
123098
123124
  return;
123099
123125
  }
123100
123126
  if (isLoggingEnabled) {
123101
- _this.log.writeLine(projectWatcherType + ":: Added:: WatchInfo: " + path);
123127
+ _this.log.writeLine("".concat(projectWatcherType, ":: Added:: WatchInfo: ").concat(path));
123102
123128
  }
123103
123129
  var watcher = projectWatcherType === "FileWatcher" /* FileWatcher */ ?
123104
123130
  _this.watchFactory.watchFile(path, function () {
@@ -123119,7 +123145,7 @@ var ts;
123119
123145
  }, 1 /* Recursive */, options, projectName, watchers);
123120
123146
  watchers.set(canonicalPath, isLoggingEnabled ? {
123121
123147
  close: function () {
123122
- _this.log.writeLine(projectWatcherType + ":: Closed:: WatchInfo: " + path);
123148
+ _this.log.writeLine("".concat(projectWatcherType, ":: Closed:: WatchInfo: ").concat(path));
123123
123149
  watcher.close();
123124
123150
  }
123125
123151
  } : watcher);
@@ -123194,7 +123220,7 @@ var ts;
123194
123220
  typingsInstaller.TypingsInstaller = TypingsInstaller;
123195
123221
  /* @internal */
123196
123222
  function typingsName(packageName) {
123197
- return "@types/" + packageName + "@ts" + ts.versionMajorMinor;
123223
+ return "@types/".concat(packageName, "@ts").concat(ts.versionMajorMinor);
123198
123224
  }
123199
123225
  typingsInstaller.typingsName = typingsName;
123200
123226
  })(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));
@@ -123219,7 +123245,7 @@ var ts;
123219
123245
  if (typeof _this.logFile !== "string")
123220
123246
  return;
123221
123247
  try {
123222
- fs.appendFileSync(_this.logFile, "[" + server.nowString() + "] " + text + ts.sys.newLine);
123248
+ fs.appendFileSync(_this.logFile, "[".concat(server.nowString(), "] ").concat(text).concat(ts.sys.newLine));
123223
123249
  }
123224
123250
  catch (e) {
123225
123251
  _this.logFile = undefined;
@@ -123235,7 +123261,7 @@ var ts;
123235
123261
  return npmPath;
123236
123262
  }
123237
123263
  if (host.fileExists(npmPath)) {
123238
- return "\"" + npmPath + "\"";
123264
+ return "\"".concat(npmPath, "\"");
123239
123265
  }
123240
123266
  }
123241
123267
  return "npm";
@@ -123243,7 +123269,7 @@ var ts;
123243
123269
  function loadTypesRegistryFile(typesRegistryFilePath, host, log) {
123244
123270
  if (!host.fileExists(typesRegistryFilePath)) {
123245
123271
  if (log.isEnabled()) {
123246
- log.writeLine("Types registry file '" + typesRegistryFilePath + "' does not exist");
123272
+ log.writeLine("Types registry file '".concat(typesRegistryFilePath, "' does not exist"));
123247
123273
  }
123248
123274
  return new ts.Map();
123249
123275
  }
@@ -123253,14 +123279,14 @@ var ts;
123253
123279
  }
123254
123280
  catch (e) {
123255
123281
  if (log.isEnabled()) {
123256
- log.writeLine("Error when loading types registry file '" + typesRegistryFilePath + "': " + e.message + ", " + e.stack);
123282
+ log.writeLine("Error when loading types registry file '".concat(typesRegistryFilePath, "': ").concat(e.message, ", ").concat(e.stack));
123257
123283
  }
123258
123284
  return new ts.Map();
123259
123285
  }
123260
123286
  }
123261
123287
  var typesRegistryPackageName = "types-registry";
123262
123288
  function getTypesRegistryFileLocation(globalTypingsCacheLocation) {
123263
- return ts.combinePaths(ts.normalizeSlashes(globalTypingsCacheLocation), "node_modules/" + typesRegistryPackageName + "/index.json");
123289
+ return ts.combinePaths(ts.normalizeSlashes(globalTypingsCacheLocation), "node_modules/".concat(typesRegistryPackageName, "/index.json"));
123264
123290
  }
123265
123291
  var NodeTypingsInstaller = (function (_super) {
123266
123292
  __extends(NodeTypingsInstaller, _super);
@@ -123268,27 +123294,27 @@ var ts;
123268
123294
  var _this = _super.call(this, ts.sys, globalTypingsCacheLocation, typingSafeListLocation ? ts.toPath(typingSafeListLocation, "", ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)) : ts.toPath("typingSafeList.json", __dirname, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), typesMapLocation ? ts.toPath(typesMapLocation, "", ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)) : ts.toPath("typesMap.json", __dirname, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)), throttleLimit, log) || this;
123269
123295
  _this.npmPath = npmLocation !== undefined ? npmLocation : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation, _this.installTypingHost);
123270
123296
  if (ts.stringContains(_this.npmPath, " ") && _this.npmPath[0] !== "\"") {
123271
- _this.npmPath = "\"" + _this.npmPath + "\"";
123297
+ _this.npmPath = "\"".concat(_this.npmPath, "\"");
123272
123298
  }
123273
123299
  if (_this.log.isEnabled()) {
123274
- _this.log.writeLine("Process id: " + process.pid);
123275
- _this.log.writeLine("NPM location: " + _this.npmPath + " (explicit '" + server.Arguments.NpmLocation + "' " + (npmLocation === undefined ? "not " : "") + " provided)");
123276
- _this.log.writeLine("validateDefaultNpmLocation: " + validateDefaultNpmLocation);
123300
+ _this.log.writeLine("Process id: ".concat(process.pid));
123301
+ _this.log.writeLine("NPM location: ".concat(_this.npmPath, " (explicit '").concat(server.Arguments.NpmLocation, "' ").concat(npmLocation === undefined ? "not " : "", " provided)"));
123302
+ _this.log.writeLine("validateDefaultNpmLocation: ".concat(validateDefaultNpmLocation));
123277
123303
  }
123278
123304
  (_this.nodeExecSync = require("child_process").execSync);
123279
123305
  _this.ensurePackageDirectoryExists(globalTypingsCacheLocation);
123280
123306
  try {
123281
123307
  if (_this.log.isEnabled()) {
123282
- _this.log.writeLine("Updating " + typesRegistryPackageName + " npm package...");
123308
+ _this.log.writeLine("Updating ".concat(typesRegistryPackageName, " npm package..."));
123283
123309
  }
123284
- _this.execSyncAndLog(_this.npmPath + " install --ignore-scripts " + typesRegistryPackageName + "@" + _this.latestDistTag, { cwd: globalTypingsCacheLocation });
123310
+ _this.execSyncAndLog("".concat(_this.npmPath, " install --ignore-scripts ").concat(typesRegistryPackageName, "@").concat(_this.latestDistTag), { cwd: globalTypingsCacheLocation });
123285
123311
  if (_this.log.isEnabled()) {
123286
- _this.log.writeLine("Updated " + typesRegistryPackageName + " npm package");
123312
+ _this.log.writeLine("Updated ".concat(typesRegistryPackageName, " npm package"));
123287
123313
  }
123288
123314
  }
123289
123315
  catch (e) {
123290
123316
  if (_this.log.isEnabled()) {
123291
- _this.log.writeLine("Error updating " + typesRegistryPackageName + " package: " + e.message);
123317
+ _this.log.writeLine("Error updating ".concat(typesRegistryPackageName, " package: ").concat(e.message));
123292
123318
  }
123293
123319
  _this.delayedInitializationError = {
123294
123320
  kind: "event::initializationFailed",
@@ -123327,7 +123353,7 @@ var ts;
123327
123353
  var cwd = getDirectoryOfPackageJson(fileName, _this.installTypingHost) || projectRootPath;
123328
123354
  if (cwd) {
123329
123355
  _this.installWorker(-1, [packageName_1], cwd, function (success) {
123330
- var message = success ? "Package " + packageName_1 + " installed." : "There was an error installing " + packageName_1 + ".";
123356
+ var message = success ? "Package ".concat(packageName_1, " installed.") : "There was an error installing ".concat(packageName_1, ".");
123331
123357
  var response = { kind: server.ActionPackageInstalled, projectName: projectName_1, success: success, message: message };
123332
123358
  _this.sendResponse(response);
123333
123359
  });
@@ -123345,7 +123371,7 @@ var ts;
123345
123371
  };
123346
123372
  NodeTypingsInstaller.prototype.sendResponse = function (response) {
123347
123373
  if (this.log.isEnabled()) {
123348
- this.log.writeLine("Sending response:\n " + JSON.stringify(response));
123374
+ this.log.writeLine("Sending response:\n ".concat(JSON.stringify(response)));
123349
123375
  }
123350
123376
  process.send(response);
123351
123377
  if (this.log.isEnabled()) {
@@ -123355,29 +123381,29 @@ var ts;
123355
123381
  NodeTypingsInstaller.prototype.installWorker = function (requestId, packageNames, cwd, onRequestCompleted) {
123356
123382
  var _this = this;
123357
123383
  if (this.log.isEnabled()) {
123358
- this.log.writeLine("#" + requestId + " with arguments'" + JSON.stringify(packageNames) + "'.");
123384
+ this.log.writeLine("#".concat(requestId, " with arguments'").concat(JSON.stringify(packageNames), "'."));
123359
123385
  }
123360
123386
  var start = Date.now();
123361
123387
  var hasError = typingsInstaller.installNpmPackages(this.npmPath, ts.version, packageNames, function (command) { return _this.execSyncAndLog(command, { cwd: cwd }); });
123362
123388
  if (this.log.isEnabled()) {
123363
- this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms");
123389
+ this.log.writeLine("npm install #".concat(requestId, " took: ").concat(Date.now() - start, " ms"));
123364
123390
  }
123365
123391
  onRequestCompleted(!hasError);
123366
123392
  };
123367
123393
  NodeTypingsInstaller.prototype.execSyncAndLog = function (command, options) {
123368
123394
  if (this.log.isEnabled()) {
123369
- this.log.writeLine("Exec: " + command);
123395
+ this.log.writeLine("Exec: ".concat(command));
123370
123396
  }
123371
123397
  try {
123372
123398
  var stdout = this.nodeExecSync(command, __assign(__assign({}, options), { encoding: "utf-8" }));
123373
123399
  if (this.log.isEnabled()) {
123374
- this.log.writeLine(" Succeeded. stdout:" + indent(ts.sys.newLine, stdout));
123400
+ this.log.writeLine(" Succeeded. stdout:".concat(indent(ts.sys.newLine, stdout)));
123375
123401
  }
123376
123402
  return false;
123377
123403
  }
123378
123404
  catch (error) {
123379
123405
  var stdout = error.stdout, stderr = error.stderr;
123380
- this.log.writeLine(" Failed. stdout:" + indent(ts.sys.newLine, stdout) + ts.sys.newLine + " stderr:" + indent(ts.sys.newLine, stderr));
123406
+ this.log.writeLine(" Failed. stdout:".concat(indent(ts.sys.newLine, stdout)).concat(ts.sys.newLine, " stderr:").concat(indent(ts.sys.newLine, stderr)));
123381
123407
  return true;
123382
123408
  }
123383
123409
  };
@@ -123400,7 +123426,7 @@ var ts;
123400
123426
  var log = new FileLog(logFilePath);
123401
123427
  if (log.isEnabled()) {
123402
123428
  process.on("uncaughtException", function (e) {
123403
- log.writeLine("Unhandled exception: " + e + " at " + e.stack);
123429
+ log.writeLine("Unhandled exception: ".concat(e, " at ").concat(e.stack));
123404
123430
  });
123405
123431
  }
123406
123432
  process.on("disconnect", function () {
@@ -123413,7 +123439,7 @@ var ts;
123413
123439
  installer.listen();
123414
123440
  function indent(newline, str) {
123415
123441
  return str && str.length
123416
- ? newline + " " + str.replace(/\r?\n/, newline + " ")
123442
+ ? "".concat(newline, " ") + str.replace(/\r?\n/, "".concat(newline, " "))
123417
123443
  : "";
123418
123444
  }
123419
123445
  })(typingsInstaller = server.typingsInstaller || (server.typingsInstaller = {}));