typescript 4.6.0-dev.20220211 → 4.6.1-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/tsc.js +263 -263
- package/lib/tsserver.js +551 -551
- package/lib/tsserverlibrary.js +526 -526
- package/lib/typescript.js +431 -431
- package/lib/typescriptServices.js +431 -431
- package/lib/typingsInstaller.js +318 -318
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -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) {
|
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor
|
|
103
|
+
ts.version = "".concat(ts.versionMajorMinor, ".1-rc");
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -147,7 +147,7 @@ var ts;
|
|
|
147
147
|
var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
|
|
148
148
|
if (constructor)
|
|
149
149
|
return constructor;
|
|
150
|
-
throw new Error("TypeScript requires an environment that provides a compatible native "
|
|
150
|
+
throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
|
|
151
151
|
}
|
|
152
152
|
})(ts || (ts = {}));
|
|
153
153
|
/* @internal */
|
|
@@ -1497,7 +1497,7 @@ var ts;
|
|
|
1497
1497
|
function cast(value, test) {
|
|
1498
1498
|
if (value !== undefined && test(value))
|
|
1499
1499
|
return value;
|
|
1500
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1500
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1501
1501
|
}
|
|
1502
1502
|
ts.cast = cast;
|
|
1503
1503
|
/** Does nothing. */
|
|
@@ -1588,7 +1588,7 @@ var ts;
|
|
|
1588
1588
|
function memoizeOne(callback) {
|
|
1589
1589
|
var map = new ts.Map();
|
|
1590
1590
|
return function (arg) {
|
|
1591
|
-
var key = typeof arg
|
|
1591
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1592
1592
|
var value = map.get(key);
|
|
1593
1593
|
if (value === undefined && !map.has(key)) {
|
|
1594
1594
|
value = callback(arg);
|
|
@@ -2038,7 +2038,7 @@ var ts;
|
|
|
2038
2038
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
2039
2039
|
function patternText(_a) {
|
|
2040
2040
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
2041
|
-
return prefix
|
|
2041
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
2042
2042
|
}
|
|
2043
2043
|
ts.patternText = patternText;
|
|
2044
2044
|
/**
|
|
@@ -2351,7 +2351,7 @@ var ts;
|
|
|
2351
2351
|
}
|
|
2352
2352
|
function fail(message, stackCrawlMark) {
|
|
2353
2353
|
debugger;
|
|
2354
|
-
var e = new Error(message ? "Debug Failure. "
|
|
2354
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
2355
2355
|
if (Error.captureStackTrace) {
|
|
2356
2356
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
2357
2357
|
}
|
|
@@ -2359,12 +2359,12 @@ var ts;
|
|
|
2359
2359
|
}
|
|
2360
2360
|
Debug.fail = fail;
|
|
2361
2361
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
2362
|
-
return fail((message || "Unexpected node."
|
|
2362
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
2363
2363
|
}
|
|
2364
2364
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
2365
2365
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
2366
2366
|
if (!expression) {
|
|
2367
|
-
message = message ? "False expression: "
|
|
2367
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
2368
2368
|
if (verboseDebugInfo) {
|
|
2369
2369
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
2370
2370
|
}
|
|
@@ -2374,26 +2374,26 @@ var ts;
|
|
|
2374
2374
|
Debug.assert = assert;
|
|
2375
2375
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
2376
2376
|
if (a !== b) {
|
|
2377
|
-
var message = msg ? msg2 ? msg
|
|
2378
|
-
fail("Expected "
|
|
2377
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
2378
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
2379
2379
|
}
|
|
2380
2380
|
}
|
|
2381
2381
|
Debug.assertEqual = assertEqual;
|
|
2382
2382
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
2383
2383
|
if (a >= b) {
|
|
2384
|
-
fail("Expected "
|
|
2384
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
2387
|
Debug.assertLessThan = assertLessThan;
|
|
2388
2388
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
2389
2389
|
if (a > b) {
|
|
2390
|
-
fail("Expected "
|
|
2390
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
2394
2394
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
2395
2395
|
if (a < b) {
|
|
2396
|
-
fail("Expected "
|
|
2396
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
2399
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2424,42 +2424,42 @@ var ts;
|
|
|
2424
2424
|
function assertNever(member, message, stackCrawlMark) {
|
|
2425
2425
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2426
2426
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2427
|
-
return fail(message
|
|
2427
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2428
2428
|
}
|
|
2429
2429
|
Debug.assertNever = assertNever;
|
|
2430
2430
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2431
2431
|
if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
|
|
2432
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2432
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
Debug.assertEachNode = assertEachNode;
|
|
2436
2436
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2437
2437
|
if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
|
|
2438
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2438
|
+
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);
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
2441
|
Debug.assertNode = assertNode;
|
|
2442
2442
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2443
2443
|
if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
|
|
2444
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2444
|
+
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);
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
2447
|
Debug.assertNotNode = assertNotNode;
|
|
2448
2448
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2449
2449
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
|
|
2450
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2450
|
+
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);
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
2453
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2454
2454
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2455
2455
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
|
|
2456
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2456
|
+
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);
|
|
2457
2457
|
}
|
|
2458
2458
|
}
|
|
2459
2459
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2460
2460
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2461
2461
|
if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
|
|
2462
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2462
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2480,7 +2480,7 @@ var ts;
|
|
|
2480
2480
|
}
|
|
2481
2481
|
Debug.getFunctionName = getFunctionName;
|
|
2482
2482
|
function formatSymbol(symbol) {
|
|
2483
|
-
return "{ name: "
|
|
2483
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2484
2484
|
}
|
|
2485
2485
|
Debug.formatSymbol = formatSymbol;
|
|
2486
2486
|
/**
|
|
@@ -2501,7 +2501,7 @@ var ts;
|
|
|
2501
2501
|
break;
|
|
2502
2502
|
}
|
|
2503
2503
|
if (enumValue !== 0 && enumValue & value) {
|
|
2504
|
-
result = ""
|
|
2504
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2505
2505
|
remainingFlags &= ~enumValue;
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
@@ -2611,7 +2611,7 @@ var ts;
|
|
|
2611
2611
|
this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
|
|
2612
2612
|
"UnknownFlow";
|
|
2613
2613
|
var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
|
|
2614
|
-
return ""
|
|
2614
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2615
2615
|
}
|
|
2616
2616
|
},
|
|
2617
2617
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
|
|
@@ -2650,7 +2650,7 @@ var ts;
|
|
|
2650
2650
|
// We don't care, this is debug code that's only enabled with a debugger attached -
|
|
2651
2651
|
// we're just taking note of it for anyone checking regex performance in the future.
|
|
2652
2652
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2653
|
-
return "NodeArray "
|
|
2653
|
+
return "NodeArray ".concat(defaultValue);
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
2656
|
});
|
|
@@ -2705,7 +2705,7 @@ var ts;
|
|
|
2705
2705
|
var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
|
|
2706
2706
|
"Symbol";
|
|
2707
2707
|
var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
|
|
2708
|
-
return symbolHeader
|
|
2708
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2709
2709
|
}
|
|
2710
2710
|
},
|
|
2711
2711
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2715,11 +2715,11 @@ var ts;
|
|
|
2715
2715
|
__tsDebuggerDisplay: {
|
|
2716
2716
|
value: function () {
|
|
2717
2717
|
var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
|
|
2718
|
-
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType "
|
|
2719
|
-
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType "
|
|
2718
|
+
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2719
|
+
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2720
2720
|
this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
|
|
2721
2721
|
this.flags & 32 /* Enum */ ? "EnumType" :
|
|
2722
|
-
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType "
|
|
2722
|
+
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2723
2723
|
this.flags & 1048576 /* Union */ ? "UnionType" :
|
|
2724
2724
|
this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
|
|
2725
2725
|
this.flags & 4194304 /* Index */ ? "IndexType" :
|
|
@@ -2738,7 +2738,7 @@ var ts;
|
|
|
2738
2738
|
"ObjectType" :
|
|
2739
2739
|
"Type";
|
|
2740
2740
|
var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
|
|
2741
|
-
return ""
|
|
2741
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2742
2742
|
}
|
|
2743
2743
|
},
|
|
2744
2744
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2774,11 +2774,11 @@ var ts;
|
|
|
2774
2774
|
__tsDebuggerDisplay: {
|
|
2775
2775
|
value: function () {
|
|
2776
2776
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2777
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2778
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2779
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2780
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2781
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2777
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2778
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2779
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2780
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2781
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2782
2782
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2783
2783
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2784
2784
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -2810,7 +2810,7 @@ var ts;
|
|
|
2810
2810
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
2811
2811
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
2812
2812
|
formatSyntaxKind(this.kind);
|
|
2813
|
-
return ""
|
|
2813
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
2814
2814
|
}
|
|
2815
2815
|
},
|
|
2816
2816
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -2857,10 +2857,10 @@ var ts;
|
|
|
2857
2857
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
2858
2858
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
2859
2859
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
2860
|
-
deprecationMessage += "'"
|
|
2861
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
2862
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
2863
|
-
deprecationMessage += message ? " "
|
|
2860
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
2861
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
2862
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
2863
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
2864
2864
|
return deprecationMessage;
|
|
2865
2865
|
}
|
|
2866
2866
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -2991,11 +2991,11 @@ var ts;
|
|
|
2991
2991
|
}
|
|
2992
2992
|
};
|
|
2993
2993
|
Version.prototype.toString = function () {
|
|
2994
|
-
var result = this.major
|
|
2994
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
2995
2995
|
if (ts.some(this.prerelease))
|
|
2996
|
-
result += "-"
|
|
2996
|
+
result += "-".concat(this.prerelease.join("."));
|
|
2997
2997
|
if (ts.some(this.build))
|
|
2998
|
-
result += "+"
|
|
2998
|
+
result += "+".concat(this.build.join("."));
|
|
2999
2999
|
return result;
|
|
3000
3000
|
};
|
|
3001
3001
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -3262,7 +3262,7 @@ var ts;
|
|
|
3262
3262
|
return ts.map(comparators, formatComparator).join(" ");
|
|
3263
3263
|
}
|
|
3264
3264
|
function formatComparator(comparator) {
|
|
3265
|
-
return ""
|
|
3265
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
3266
3266
|
}
|
|
3267
3267
|
})(ts || (ts = {}));
|
|
3268
3268
|
/*@internal*/
|
|
@@ -3560,7 +3560,7 @@ var ts;
|
|
|
3560
3560
|
fs = require("fs");
|
|
3561
3561
|
}
|
|
3562
3562
|
catch (e) {
|
|
3563
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
3563
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
3564
3564
|
}
|
|
3565
3565
|
}
|
|
3566
3566
|
mode = tracingMode;
|
|
@@ -3572,11 +3572,11 @@ var ts;
|
|
|
3572
3572
|
if (!fs.existsSync(traceDir)) {
|
|
3573
3573
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
3574
3574
|
}
|
|
3575
|
-
var countPart = mode === "build" ? "."
|
|
3576
|
-
: mode === "server" ? "."
|
|
3575
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
3576
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
3577
3577
|
: "";
|
|
3578
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
3579
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
3578
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
3579
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
3580
3580
|
legend.push({
|
|
3581
3581
|
configFilePath: configFilePath,
|
|
3582
3582
|
tracePath: tracePath,
|
|
@@ -3666,7 +3666,7 @@ var ts;
|
|
|
3666
3666
|
}
|
|
3667
3667
|
// test if [time,endTime) straddles a sampling point
|
|
3668
3668
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3669
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3669
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3670
3670
|
}
|
|
3671
3671
|
}
|
|
3672
3672
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3675,11 +3675,11 @@ var ts;
|
|
|
3675
3675
|
if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
|
|
3676
3676
|
return;
|
|
3677
3677
|
ts.performance.mark("beginTracing");
|
|
3678
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3678
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3679
3679
|
if (extras)
|
|
3680
|
-
fs.writeSync(traceFd, ","
|
|
3680
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3681
3681
|
if (args)
|
|
3682
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3682
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3683
3683
|
fs.writeSync(traceFd, "}");
|
|
3684
3684
|
ts.performance.mark("endTracing");
|
|
3685
3685
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -5792,7 +5792,7 @@ var ts;
|
|
|
5792
5792
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
5793
5793
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
5794
5794
|
function getLevel(envVar, level) {
|
|
5795
|
-
return system.getEnvironmentVariable(envVar
|
|
5795
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
5796
5796
|
}
|
|
5797
5797
|
function getCustomLevels(baseVariable) {
|
|
5798
5798
|
var customLevels;
|
|
@@ -6261,7 +6261,7 @@ var ts;
|
|
|
6261
6261
|
}
|
|
6262
6262
|
function onTimerToUpdateChildWatches() {
|
|
6263
6263
|
timerToUpdateChildWatches = undefined;
|
|
6264
|
-
sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
6264
|
+
sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
6265
6265
|
var start = ts.timestamp();
|
|
6266
6266
|
var invokeMap = new ts.Map();
|
|
6267
6267
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -6274,7 +6274,7 @@ var ts;
|
|
|
6274
6274
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
6275
6275
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
6276
6276
|
}
|
|
6277
|
-
sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
6277
|
+
sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
6278
6278
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
6279
6279
|
var existing = invokeMap.get(rootDirName);
|
|
6280
6280
|
if (existing) {
|
|
@@ -6290,7 +6290,7 @@ var ts;
|
|
|
6290
6290
|
}
|
|
6291
6291
|
});
|
|
6292
6292
|
var elapsed = ts.timestamp() - start;
|
|
6293
|
-
sysLog("sysLog:: Elapsed:: "
|
|
6293
|
+
sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
6294
6294
|
}
|
|
6295
6295
|
function removeChildWatches(parentWatcher) {
|
|
6296
6296
|
if (!parentWatcher)
|
|
@@ -6750,7 +6750,7 @@ var ts;
|
|
|
6750
6750
|
var remappedPaths = new ts.Map();
|
|
6751
6751
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
6752
6752
|
// Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
|
|
6753
|
-
var fileUrlRoot = "file://"
|
|
6753
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
6754
6754
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
6755
6755
|
var node = _a[_i];
|
|
6756
6756
|
if (node.callFrame.url) {
|
|
@@ -6759,7 +6759,7 @@ var ts;
|
|
|
6759
6759
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
|
|
6760
6760
|
}
|
|
6761
6761
|
else if (!nativePattern.test(url)) {
|
|
6762
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
6762
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
6763
6763
|
externalFileCounter++;
|
|
6764
6764
|
}
|
|
6765
6765
|
}
|
|
@@ -6775,7 +6775,7 @@ var ts;
|
|
|
6775
6775
|
if (!err) {
|
|
6776
6776
|
try {
|
|
6777
6777
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
6778
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
6778
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
6779
6779
|
}
|
|
6780
6780
|
}
|
|
6781
6781
|
catch (_c) {
|
|
@@ -6877,7 +6877,7 @@ var ts;
|
|
|
6877
6877
|
* @param createWatcher
|
|
6878
6878
|
*/
|
|
6879
6879
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
6880
|
-
sysLog("sysLog:: "
|
|
6880
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
6881
6881
|
// Call the callback for current directory
|
|
6882
6882
|
callback("rename", "");
|
|
6883
6883
|
// If watcher is not closed, update it
|
|
@@ -6902,7 +6902,7 @@ var ts;
|
|
|
6902
6902
|
}
|
|
6903
6903
|
}
|
|
6904
6904
|
if (hitSystemWatcherLimit) {
|
|
6905
|
-
sysLog("sysLog:: "
|
|
6905
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
6906
6906
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
6907
6907
|
}
|
|
6908
6908
|
try {
|
|
@@ -6918,7 +6918,7 @@ var ts;
|
|
|
6918
6918
|
// 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
|
|
6919
6919
|
// so instead of throwing error, use fs.watchFile
|
|
6920
6920
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
6921
|
-
sysLog("sysLog:: "
|
|
6921
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
6922
6922
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
6923
6923
|
}
|
|
6924
6924
|
}
|
|
@@ -9933,7 +9933,7 @@ var ts;
|
|
|
9933
9933
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
9934
9934
|
}
|
|
9935
9935
|
else {
|
|
9936
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
9936
|
+
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"));
|
|
9937
9937
|
}
|
|
9938
9938
|
}
|
|
9939
9939
|
var res = lineStarts[line] + character;
|
|
@@ -12823,7 +12823,7 @@ var ts;
|
|
|
12823
12823
|
: "linkplain";
|
|
12824
12824
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
12825
12825
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
12826
|
-
return "{@"
|
|
12826
|
+
return "{@".concat(kind, " ").concat(name).concat(space).concat(link.text, "}");
|
|
12827
12827
|
}
|
|
12828
12828
|
/**
|
|
12829
12829
|
* Gets the effective type parameters. If the node was parsed in a
|
|
@@ -14080,11 +14080,11 @@ var ts;
|
|
|
14080
14080
|
}
|
|
14081
14081
|
function packageIdToPackageName(_a) {
|
|
14082
14082
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
14083
|
-
return subModuleName ? name
|
|
14083
|
+
return subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
14084
14084
|
}
|
|
14085
14085
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
14086
14086
|
function packageIdToString(packageId) {
|
|
14087
|
-
return packageIdToPackageName(packageId)
|
|
14087
|
+
return "".concat(packageIdToPackageName(packageId), "@").concat(packageId.version);
|
|
14088
14088
|
}
|
|
14089
14089
|
ts.packageIdToString = packageIdToString;
|
|
14090
14090
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -14167,7 +14167,7 @@ var ts;
|
|
|
14167
14167
|
function nodePosToString(node) {
|
|
14168
14168
|
var file = getSourceFileOfNode(node);
|
|
14169
14169
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
14170
|
-
return file.fileName
|
|
14170
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
14171
14171
|
}
|
|
14172
14172
|
ts.nodePosToString = nodePosToString;
|
|
14173
14173
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -14306,7 +14306,7 @@ var ts;
|
|
|
14306
14306
|
ts.isPinnedComment = isPinnedComment;
|
|
14307
14307
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
14308
14308
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
14309
|
-
""
|
|
14309
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
14310
14310
|
commentDirective,
|
|
14311
14311
|
]); }));
|
|
14312
14312
|
var usedLines = new ts.Map();
|
|
@@ -14323,10 +14323,10 @@ var ts;
|
|
|
14323
14323
|
});
|
|
14324
14324
|
}
|
|
14325
14325
|
function markUsed(line) {
|
|
14326
|
-
if (!directivesByLine.has(""
|
|
14326
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
14327
14327
|
return false;
|
|
14328
14328
|
}
|
|
14329
|
-
usedLines.set(""
|
|
14329
|
+
usedLines.set("".concat(line), true);
|
|
14330
14330
|
return true;
|
|
14331
14331
|
}
|
|
14332
14332
|
}
|
|
@@ -14556,7 +14556,7 @@ var ts;
|
|
|
14556
14556
|
}
|
|
14557
14557
|
return node.text;
|
|
14558
14558
|
}
|
|
14559
|
-
return ts.Debug.fail("Literal kind '"
|
|
14559
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
14560
14560
|
}
|
|
14561
14561
|
ts.getLiteralText = getLiteralText;
|
|
14562
14562
|
function canUseOriginalText(node, flags) {
|
|
@@ -17137,11 +17137,11 @@ var ts;
|
|
|
17137
17137
|
}
|
|
17138
17138
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
17139
17139
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
17140
|
-
return "__@"
|
|
17140
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
17141
17141
|
}
|
|
17142
17142
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
17143
17143
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
17144
|
-
return "__#"
|
|
17144
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
17145
17145
|
}
|
|
17146
17146
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
17147
17147
|
function isKnownSymbol(symbol) {
|
|
@@ -19843,7 +19843,7 @@ var ts;
|
|
|
19843
19843
|
}
|
|
19844
19844
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
19845
19845
|
function getJSXRuntimeImport(base, options) {
|
|
19846
|
-
return base ? base
|
|
19846
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
19847
19847
|
}
|
|
19848
19848
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
19849
19849
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -19950,7 +19950,7 @@ var ts;
|
|
|
19950
19950
|
}
|
|
19951
19951
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
19952
19952
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
19953
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
19953
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
19954
19954
|
var filesMatcher = {
|
|
19955
19955
|
/**
|
|
19956
19956
|
* Matches any single directory segment unless it is the last segment and a .min.js file
|
|
@@ -19963,7 +19963,7 @@ var ts;
|
|
|
19963
19963
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
19964
19964
|
* files or directories, does not match subdirectories that start with a . character
|
|
19965
19965
|
*/
|
|
19966
|
-
doubleAsteriskRegexFragment: "(/"
|
|
19966
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
19967
19967
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
19968
19968
|
};
|
|
19969
19969
|
var directoriesMatcher = {
|
|
@@ -19972,7 +19972,7 @@ var ts;
|
|
|
19972
19972
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
19973
19973
|
* files or directories, does not match subdirectories that start with a . character
|
|
19974
19974
|
*/
|
|
19975
|
-
doubleAsteriskRegexFragment: "(/"
|
|
19975
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
19976
19976
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
19977
19977
|
};
|
|
19978
19978
|
var excludeMatcher = {
|
|
@@ -19990,10 +19990,10 @@ var ts;
|
|
|
19990
19990
|
if (!patterns || !patterns.length) {
|
|
19991
19991
|
return undefined;
|
|
19992
19992
|
}
|
|
19993
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
19993
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
19994
19994
|
// If excluding, match "foo/bar/baz...", but if including, only allow "foo".
|
|
19995
19995
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
19996
|
-
return "^("
|
|
19996
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
19997
19997
|
}
|
|
19998
19998
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
19999
19999
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -20015,7 +20015,7 @@ var ts;
|
|
|
20015
20015
|
ts.isImplicitGlob = isImplicitGlob;
|
|
20016
20016
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
20017
20017
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
20018
|
-
return pattern && "^("
|
|
20018
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
20019
20019
|
}
|
|
20020
20020
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
20021
20021
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -20093,7 +20093,7 @@ var ts;
|
|
|
20093
20093
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20094
20094
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
20095
20095
|
return {
|
|
20096
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
20096
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
20097
20097
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
20098
20098
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
20099
20099
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -20374,7 +20374,7 @@ var ts;
|
|
|
20374
20374
|
*/
|
|
20375
20375
|
function extensionFromPath(path) {
|
|
20376
20376
|
var ext = tryGetExtensionFromPath(path);
|
|
20377
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
20377
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
20378
20378
|
}
|
|
20379
20379
|
ts.extensionFromPath = extensionFromPath;
|
|
20380
20380
|
function isAnySupportedFileExtension(path) {
|
|
@@ -26457,7 +26457,7 @@ var ts;
|
|
|
26457
26457
|
case 326 /* JSDocAugmentsTag */: return "augments";
|
|
26458
26458
|
case 327 /* JSDocImplementsTag */: return "implements";
|
|
26459
26459
|
default:
|
|
26460
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
26460
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
26461
26461
|
}
|
|
26462
26462
|
}
|
|
26463
26463
|
var rawTextScanner;
|
|
@@ -26785,7 +26785,7 @@ var ts;
|
|
|
26785
26785
|
};
|
|
26786
26786
|
var definedTextGetter_1 = function (path) {
|
|
26787
26787
|
var result = textGetter_1(path);
|
|
26788
|
-
return result !== undefined ? result : "/* Input file "
|
|
26788
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
26789
26789
|
};
|
|
26790
26790
|
var buildInfo_1;
|
|
26791
26791
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -31323,7 +31323,7 @@ var ts;
|
|
|
31323
31323
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
31324
31324
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
31325
31325
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
31326
|
-
return keyword
|
|
31326
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
31327
31327
|
}
|
|
31328
31328
|
}
|
|
31329
31329
|
return undefined;
|
|
@@ -38093,7 +38093,7 @@ var ts;
|
|
|
38093
38093
|
if (namedArgRegExCache.has(name)) {
|
|
38094
38094
|
return namedArgRegExCache.get(name);
|
|
38095
38095
|
}
|
|
38096
|
-
var result = new RegExp("(\\s"
|
|
38096
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
38097
38097
|
namedArgRegExCache.set(name, result);
|
|
38098
38098
|
return result;
|
|
38099
38099
|
}
|
|
@@ -39571,8 +39571,8 @@ var ts;
|
|
|
39571
39571
|
}
|
|
39572
39572
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
39573
39573
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
39574
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
39575
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
39574
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
39575
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
39576
39576
|
}
|
|
39577
39577
|
/* @internal */
|
|
39578
39578
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -40366,10 +40366,10 @@ var ts;
|
|
|
40366
40366
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
40367
40367
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
40368
40368
|
if (newValue !== defaultValue) {
|
|
40369
|
-
result.push(""
|
|
40369
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
40370
40370
|
}
|
|
40371
40371
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
40372
|
-
result.push(""
|
|
40372
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
40373
40373
|
}
|
|
40374
40374
|
});
|
|
40375
40375
|
return result.join(newLine) + newLine;
|
|
@@ -40420,19 +40420,19 @@ var ts;
|
|
|
40420
40420
|
if (entries.length !== 0) {
|
|
40421
40421
|
entries.push({ value: "" });
|
|
40422
40422
|
}
|
|
40423
|
-
entries.push({ value: "/* "
|
|
40423
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
40424
40424
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
40425
40425
|
var option = options_1[_i];
|
|
40426
40426
|
var optionName = void 0;
|
|
40427
40427
|
if (compilerOptionsMap.has(option.name)) {
|
|
40428
|
-
optionName = "\""
|
|
40428
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
40429
40429
|
}
|
|
40430
40430
|
else {
|
|
40431
|
-
optionName = "// \""
|
|
40431
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
40432
40432
|
}
|
|
40433
40433
|
entries.push({
|
|
40434
40434
|
value: optionName,
|
|
40435
|
-
description: "/* "
|
|
40435
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
40436
40436
|
});
|
|
40437
40437
|
marginLength = Math.max(optionName.length, marginLength);
|
|
40438
40438
|
}
|
|
@@ -40441,25 +40441,25 @@ var ts;
|
|
|
40441
40441
|
var tab = makePadding(2);
|
|
40442
40442
|
var result = [];
|
|
40443
40443
|
result.push("{");
|
|
40444
|
-
result.push(tab
|
|
40445
|
-
result.push(""
|
|
40444
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
40445
|
+
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), " */"));
|
|
40446
40446
|
result.push("");
|
|
40447
40447
|
// Print out each row, aligning all the descriptions on the same column.
|
|
40448
40448
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
40449
40449
|
var entry = entries_2[_a];
|
|
40450
40450
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
40451
|
-
result.push(value && ""
|
|
40451
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
40452
40452
|
}
|
|
40453
40453
|
if (fileNames.length) {
|
|
40454
|
-
result.push(tab
|
|
40455
|
-
result.push(tab
|
|
40454
|
+
result.push("".concat(tab, "},"));
|
|
40455
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
40456
40456
|
for (var i = 0; i < fileNames.length; i++) {
|
|
40457
|
-
result.push(""
|
|
40457
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
40458
40458
|
}
|
|
40459
|
-
result.push(tab
|
|
40459
|
+
result.push("".concat(tab, "]"));
|
|
40460
40460
|
}
|
|
40461
40461
|
else {
|
|
40462
|
-
result.push(tab
|
|
40462
|
+
result.push("".concat(tab, "}"));
|
|
40463
40463
|
}
|
|
40464
40464
|
result.push("}");
|
|
40465
40465
|
return result.join(newLine) + newLine;
|
|
@@ -40857,7 +40857,7 @@ var ts;
|
|
|
40857
40857
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
40858
40858
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
40859
40859
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
|
|
40860
|
-
extendedConfigPath = extendedConfigPath
|
|
40860
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
40861
40861
|
if (!host.fileExists(extendedConfigPath)) {
|
|
40862
40862
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
40863
40863
|
return undefined;
|
|
@@ -41102,7 +41102,7 @@ var ts;
|
|
|
41102
41102
|
// Valid only if *.json specified
|
|
41103
41103
|
if (!jsonOnlyIncludeRegexes) {
|
|
41104
41104
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
|
|
41105
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
41105
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
41106
41106
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
41107
41107
|
}
|
|
41108
41108
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -41538,7 +41538,7 @@ var ts;
|
|
|
41538
41538
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
41539
41539
|
if (typeof bestVersionPaths !== "object") {
|
|
41540
41540
|
if (state.traceEnabled) {
|
|
41541
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
41541
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
41542
41542
|
}
|
|
41543
41543
|
return;
|
|
41544
41544
|
}
|
|
@@ -41945,7 +41945,7 @@ var ts;
|
|
|
41945
41945
|
};
|
|
41946
41946
|
return cache;
|
|
41947
41947
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
41948
|
-
var result = mode === undefined ? specifier : mode
|
|
41948
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
41949
41949
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
41950
41950
|
return result;
|
|
41951
41951
|
}
|
|
@@ -41976,7 +41976,7 @@ var ts;
|
|
|
41976
41976
|
}
|
|
41977
41977
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
41978
41978
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
41979
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
41979
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
41980
41980
|
}
|
|
41981
41981
|
function createPerModuleNameCache() {
|
|
41982
41982
|
var directoryPathMap = new ts.Map();
|
|
@@ -42123,10 +42123,10 @@ var ts;
|
|
|
42123
42123
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42124
42124
|
break;
|
|
42125
42125
|
default:
|
|
42126
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
42126
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
42127
42127
|
}
|
|
42128
42128
|
if (result && result.resolvedModule)
|
|
42129
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
42129
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
42130
42130
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
42131
42131
|
if (perFolderCache) {
|
|
42132
42132
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -42329,7 +42329,7 @@ var ts;
|
|
|
42329
42329
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
42330
42330
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
42331
42331
|
if (!resolvedModule) {
|
|
42332
|
-
throw new Error("Could not resolve JS module '"
|
|
42332
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
42333
42333
|
}
|
|
42334
42334
|
return resolvedModule.resolvedFileName;
|
|
42335
42335
|
}
|
|
@@ -42439,7 +42439,7 @@ var ts;
|
|
|
42439
42439
|
if (traceEnabled) {
|
|
42440
42440
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
42441
42441
|
}
|
|
42442
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
42442
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
42443
42443
|
return real;
|
|
42444
42444
|
}
|
|
42445
42445
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -42916,7 +42916,7 @@ var ts;
|
|
|
42916
42916
|
return undefined;
|
|
42917
42917
|
}
|
|
42918
42918
|
var trailingParts = parts.slice(nameParts.length);
|
|
42919
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
42919
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
42920
42920
|
}
|
|
42921
42921
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
42922
42922
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -43244,7 +43244,7 @@ var ts;
|
|
|
43244
43244
|
}
|
|
43245
43245
|
/* @internal */
|
|
43246
43246
|
function getTypesPackageName(packageName) {
|
|
43247
|
-
return "@types/"
|
|
43247
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
43248
43248
|
}
|
|
43249
43249
|
ts.getTypesPackageName = getTypesPackageName;
|
|
43250
43250
|
/* @internal */
|
|
@@ -43645,7 +43645,7 @@ var ts;
|
|
|
43645
43645
|
if (name) {
|
|
43646
43646
|
if (ts.isAmbientModule(node)) {
|
|
43647
43647
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
43648
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
43648
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
43649
43649
|
}
|
|
43650
43650
|
if (name.kind === 161 /* ComputedPropertyName */) {
|
|
43651
43651
|
var nameExpression = name.expression;
|
|
@@ -43702,7 +43702,7 @@ var ts;
|
|
|
43702
43702
|
case 163 /* Parameter */:
|
|
43703
43703
|
// Parameters with names are handled at the top of this function. Parameters
|
|
43704
43704
|
// without names can only come from JSDocFunctionTypes.
|
|
43705
|
-
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: "
|
|
43705
|
+
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"); });
|
|
43706
43706
|
var functionType = node.parent;
|
|
43707
43707
|
var index = functionType.parameters.indexOf(node);
|
|
43708
43708
|
return "arg" + index;
|
|
@@ -43814,7 +43814,7 @@ var ts;
|
|
|
43814
43814
|
var relatedInformation_1 = [];
|
|
43815
43815
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
|
|
43816
43816
|
// export type T; - may have meant export type { T }?
|
|
43817
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
43817
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
43818
43818
|
}
|
|
43819
43819
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
43820
43820
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -45890,7 +45890,7 @@ var ts;
|
|
|
45890
45890
|
}
|
|
45891
45891
|
}
|
|
45892
45892
|
function bindSourceFileAsExternalModule() {
|
|
45893
|
-
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\""
|
|
45893
|
+
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
45894
45894
|
}
|
|
45895
45895
|
function bindExportAssignment(node) {
|
|
45896
45896
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -47990,7 +47990,7 @@ var ts;
|
|
|
47990
47990
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
47991
47991
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
47992
47992
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
47993
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
47993
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
47994
47994
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
47995
47995
|
});
|
|
47996
47996
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -50643,7 +50643,7 @@ var ts;
|
|
|
50643
50643
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
50644
50644
|
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
|
50645
50645
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
50646
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
50646
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
50647
50647
|
if (cache.has(key)) {
|
|
50648
50648
|
return cache.get(key);
|
|
50649
50649
|
}
|
|
@@ -51492,7 +51492,7 @@ var ts;
|
|
|
51492
51492
|
context.symbolDepth = new ts.Map();
|
|
51493
51493
|
}
|
|
51494
51494
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
51495
|
-
var key = getTypeId(type)
|
|
51495
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
51496
51496
|
if (links) {
|
|
51497
51497
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
51498
51498
|
}
|
|
@@ -51761,7 +51761,7 @@ var ts;
|
|
|
51761
51761
|
}
|
|
51762
51762
|
}
|
|
51763
51763
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
51764
|
-
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... "
|
|
51764
|
+
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
|
|
51765
51765
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
51766
51766
|
break;
|
|
51767
51767
|
}
|
|
@@ -51876,7 +51876,7 @@ var ts;
|
|
|
51876
51876
|
else if (types.length > 2) {
|
|
51877
51877
|
return [
|
|
51878
51878
|
typeToTypeNodeHelper(types[0], context),
|
|
51879
|
-
ts.factory.createTypeReferenceNode("... "
|
|
51879
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
|
|
51880
51880
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
51881
51881
|
];
|
|
51882
51882
|
}
|
|
@@ -51890,7 +51890,7 @@ var ts;
|
|
|
51890
51890
|
var type = types_2[_i];
|
|
51891
51891
|
i++;
|
|
51892
51892
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
51893
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
51893
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
|
|
51894
51894
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
51895
51895
|
if (typeNode_1) {
|
|
51896
51896
|
result_5.push(typeNode_1);
|
|
@@ -52413,7 +52413,7 @@ var ts;
|
|
|
52413
52413
|
var text = rawtext;
|
|
52414
52414
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
52415
52415
|
i++;
|
|
52416
|
-
text = rawtext
|
|
52416
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
52417
52417
|
}
|
|
52418
52418
|
if (text !== rawtext) {
|
|
52419
52419
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -52733,7 +52733,7 @@ var ts;
|
|
|
52733
52733
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
52734
52734
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
52735
52735
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
52736
|
-
: "arg"
|
|
52736
|
+
: "arg".concat(index);
|
|
52737
52737
|
}
|
|
52738
52738
|
function rewriteModuleSpecifier(parent, lit) {
|
|
52739
52739
|
if (bundled) {
|
|
@@ -53818,7 +53818,7 @@ var ts;
|
|
|
53818
53818
|
return results_1;
|
|
53819
53819
|
}
|
|
53820
53820
|
// The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
|
|
53821
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
53821
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
53822
53822
|
};
|
|
53823
53823
|
}
|
|
53824
53824
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -53893,7 +53893,7 @@ var ts;
|
|
|
53893
53893
|
if (ref) {
|
|
53894
53894
|
return ref;
|
|
53895
53895
|
}
|
|
53896
|
-
var tempName = getUnusedName(rootName
|
|
53896
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
53897
53897
|
var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
53898
53898
|
ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
|
|
53899
53899
|
], 2 /* Const */));
|
|
@@ -53940,7 +53940,7 @@ var ts;
|
|
|
53940
53940
|
var original = input;
|
|
53941
53941
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
53942
53942
|
i++;
|
|
53943
|
-
input = original
|
|
53943
|
+
input = "".concat(original, "_").concat(i);
|
|
53944
53944
|
}
|
|
53945
53945
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
53946
53946
|
if (id) {
|
|
@@ -54048,15 +54048,15 @@ var ts;
|
|
|
54048
54048
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
54049
54049
|
var name = "" + nameType.value;
|
|
54050
54050
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
54051
|
-
return "\""
|
|
54051
|
+
return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
|
|
54052
54052
|
}
|
|
54053
54053
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
54054
|
-
return "["
|
|
54054
|
+
return "[".concat(name, "]");
|
|
54055
54055
|
}
|
|
54056
54056
|
return name;
|
|
54057
54057
|
}
|
|
54058
54058
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
54059
|
-
return "["
|
|
54059
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
54060
54060
|
}
|
|
54061
54061
|
}
|
|
54062
54062
|
}
|
|
@@ -56887,7 +56887,7 @@ var ts;
|
|
|
56887
56887
|
!leftName ? rightName :
|
|
56888
56888
|
!rightName ? leftName :
|
|
56889
56889
|
undefined;
|
|
56890
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
56890
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
56891
56891
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
56892
56892
|
params[i] = paramSymbol;
|
|
56893
56893
|
}
|
|
@@ -58838,7 +58838,7 @@ var ts;
|
|
|
58838
58838
|
return result;
|
|
58839
58839
|
}
|
|
58840
58840
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
58841
|
-
return aliasSymbol ? "@"
|
|
58841
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
58842
58842
|
}
|
|
58843
58843
|
// This function is used to propagate certain flags when creating new object type references and union types.
|
|
58844
58844
|
// It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
|
|
@@ -59024,7 +59024,7 @@ var ts;
|
|
|
59024
59024
|
return undefined;
|
|
59025
59025
|
}
|
|
59026
59026
|
function getSymbolPath(symbol) {
|
|
59027
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
59027
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
59028
59028
|
}
|
|
59029
59029
|
function getUnresolvedSymbolForEntityName(name) {
|
|
59030
59030
|
var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
|
|
@@ -59035,7 +59035,7 @@ var ts;
|
|
|
59035
59035
|
var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
|
|
59036
59036
|
name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
59037
59037
|
undefined;
|
|
59038
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
59038
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
59039
59039
|
var result = unresolvedSymbols.get(path);
|
|
59040
59040
|
if (!result) {
|
|
59041
59041
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
@@ -59108,7 +59108,7 @@ var ts;
|
|
|
59108
59108
|
if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
|
|
59109
59109
|
return baseType;
|
|
59110
59110
|
}
|
|
59111
|
-
var id = getTypeId(baseType)
|
|
59111
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
59112
59112
|
var cached = substitutionTypes.get(id);
|
|
59113
59113
|
if (cached) {
|
|
59114
59114
|
return cached;
|
|
@@ -60032,9 +60032,9 @@ var ts;
|
|
|
60032
60032
|
return types[0];
|
|
60033
60033
|
}
|
|
60034
60034
|
var typeKey = !origin ? getTypeListId(types) :
|
|
60035
|
-
origin.flags & 1048576 /* Union */ ? "|"
|
|
60036
|
-
origin.flags & 2097152 /* Intersection */ ? "&"
|
|
60037
|
-
"#"
|
|
60035
|
+
origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
|
|
60036
|
+
origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
|
|
60037
|
+
"#".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
|
|
60038
60038
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
60039
60039
|
var type = unionTypes.get(id);
|
|
60040
60040
|
if (!type) {
|
|
@@ -60556,7 +60556,7 @@ var ts;
|
|
|
60556
60556
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
|
|
60557
60557
|
return stringType;
|
|
60558
60558
|
}
|
|
60559
|
-
var id = getTypeListId(newTypes)
|
|
60559
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
60560
60560
|
var type = templateLiteralTypes.get(id);
|
|
60561
60561
|
if (!type) {
|
|
60562
60562
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -60616,7 +60616,7 @@ var ts;
|
|
|
60616
60616
|
return str;
|
|
60617
60617
|
}
|
|
60618
60618
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
60619
|
-
var id = getSymbolId(symbol)
|
|
60619
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
60620
60620
|
var result = stringMappingTypes.get(id);
|
|
60621
60621
|
if (!result) {
|
|
60622
60622
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -61633,7 +61633,7 @@ var ts;
|
|
|
61633
61633
|
function createUniqueESSymbolType(symbol) {
|
|
61634
61634
|
var type = createType(8192 /* UniqueESSymbol */);
|
|
61635
61635
|
type.symbol = symbol;
|
|
61636
|
-
type.escapedName = "__@"
|
|
61636
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
61637
61637
|
return type;
|
|
61638
61638
|
}
|
|
61639
61639
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -63322,24 +63322,24 @@ var ts;
|
|
|
63322
63322
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
63323
63323
|
// Parenthesize a `new` if there is one
|
|
63324
63324
|
if (path.indexOf("new ") === 0) {
|
|
63325
|
-
path = "("
|
|
63325
|
+
path = "(".concat(path, ")");
|
|
63326
63326
|
}
|
|
63327
63327
|
var str = "" + args[0];
|
|
63328
63328
|
// If leading, just print back the arg (irrespective of if it's a valid identifier)
|
|
63329
63329
|
if (path.length === 0) {
|
|
63330
|
-
path = ""
|
|
63330
|
+
path = "".concat(str);
|
|
63331
63331
|
}
|
|
63332
63332
|
// Otherwise write a dotted name if possible
|
|
63333
63333
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
63334
|
-
path = path
|
|
63334
|
+
path = "".concat(path, ".").concat(str);
|
|
63335
63335
|
}
|
|
63336
63336
|
// Failing that, check if the name is already a computed name
|
|
63337
63337
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
63338
|
-
path = ""
|
|
63338
|
+
path = "".concat(path).concat(str);
|
|
63339
63339
|
}
|
|
63340
63340
|
// And finally write out a computed name as a last resort
|
|
63341
63341
|
else {
|
|
63342
|
-
path = path
|
|
63342
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
63343
63343
|
}
|
|
63344
63344
|
break;
|
|
63345
63345
|
}
|
|
@@ -63368,7 +63368,7 @@ var ts;
|
|
|
63368
63368
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
63369
63369
|
? ""
|
|
63370
63370
|
: "...";
|
|
63371
|
-
path = ""
|
|
63371
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
63372
63372
|
}
|
|
63373
63373
|
break;
|
|
63374
63374
|
}
|
|
@@ -63381,7 +63381,7 @@ var ts;
|
|
|
63381
63381
|
break;
|
|
63382
63382
|
}
|
|
63383
63383
|
default:
|
|
63384
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
63384
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
63385
63385
|
}
|
|
63386
63386
|
}
|
|
63387
63387
|
if (path) {
|
|
@@ -65583,7 +65583,7 @@ var ts;
|
|
|
65583
65583
|
var constraintMarker = "";
|
|
65584
65584
|
var sourceId = getTypeReferenceId(source, 0);
|
|
65585
65585
|
var targetId = getTypeReferenceId(target, 0);
|
|
65586
|
-
return ""
|
|
65586
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
65587
65587
|
// getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
|
|
65588
65588
|
// where A.id=111 and number.id=12
|
|
65589
65589
|
function getTypeReferenceId(type, depth) {
|
|
@@ -65627,7 +65627,7 @@ var ts;
|
|
|
65627
65627
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
65628
65628
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
65629
65629
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
65630
|
-
source.id
|
|
65630
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
65631
65631
|
}
|
|
65632
65632
|
// Invoke the callback for each underlying property symbol of the given symbol and return the first
|
|
65633
65633
|
// value that isn't undefined.
|
|
@@ -67754,11 +67754,11 @@ var ts;
|
|
|
67754
67754
|
case 79 /* Identifier */:
|
|
67755
67755
|
if (!ts.isThisInTypeQuery(node)) {
|
|
67756
67756
|
var symbol = getResolvedSymbol(node);
|
|
67757
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
67757
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
67758
67758
|
}
|
|
67759
67759
|
// falls through
|
|
67760
67760
|
case 108 /* ThisKeyword */:
|
|
67761
|
-
return "0|"
|
|
67761
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
67762
67762
|
case 229 /* NonNullExpression */:
|
|
67763
67763
|
case 211 /* ParenthesizedExpression */:
|
|
67764
67764
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -71647,7 +71647,7 @@ var ts;
|
|
|
71647
71647
|
!leftName ? rightName :
|
|
71648
71648
|
!rightName ? leftName :
|
|
71649
71649
|
undefined;
|
|
71650
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
71650
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
71651
71651
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71652
71652
|
params[i] = paramSymbol;
|
|
71653
71653
|
}
|
|
@@ -81514,7 +81514,7 @@ var ts;
|
|
|
81514
81514
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
81515
81515
|
var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
|
|
81516
81516
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
81517
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
81517
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
81518
81518
|
}
|
|
81519
81519
|
/**
|
|
81520
81520
|
* Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
|
|
@@ -88566,7 +88566,7 @@ var ts;
|
|
|
88566
88566
|
value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
|
|
88567
88567
|
value === 62 ? 43 /* plus */ :
|
|
88568
88568
|
value === 63 ? 47 /* slash */ :
|
|
88569
|
-
ts.Debug.fail(value
|
|
88569
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
88570
88570
|
}
|
|
88571
88571
|
function base64FormatDecode(ch) {
|
|
88572
88572
|
return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
|
|
@@ -88641,7 +88641,7 @@ var ts;
|
|
|
88641
88641
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
88642
88642
|
if (decoder.error !== undefined) {
|
|
88643
88643
|
if (host.log) {
|
|
88644
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
88644
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
88645
88645
|
}
|
|
88646
88646
|
decodedMappings = ts.emptyArray;
|
|
88647
88647
|
}
|
|
@@ -92316,7 +92316,7 @@ var ts;
|
|
|
92316
92316
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
92317
92317
|
? ts.declarationNameToString(originalNode.name)
|
|
92318
92318
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
92319
|
-
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " "
|
|
92319
|
+
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
|
|
92320
92320
|
}
|
|
92321
92321
|
return substitute;
|
|
92322
92322
|
}
|
|
@@ -93792,8 +93792,8 @@ var ts;
|
|
|
93792
93792
|
}
|
|
93793
93793
|
function createHoistedVariableForClass(name, node) {
|
|
93794
93794
|
var className = getPrivateIdentifierEnvironment().className;
|
|
93795
|
-
var prefix = className ? "_"
|
|
93796
|
-
var identifier = factory.createUniqueName(prefix
|
|
93795
|
+
var prefix = className ? "_".concat(className) : "";
|
|
93796
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
|
|
93797
93797
|
if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
|
|
93798
93798
|
addBlockScopedVariable(identifier);
|
|
93799
93799
|
}
|
|
@@ -95798,7 +95798,7 @@ var ts;
|
|
|
95798
95798
|
specifierSourceImports = new ts.Map();
|
|
95799
95799
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
95800
95800
|
}
|
|
95801
|
-
var generatedName = factory.createUniqueName("_"
|
|
95801
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
|
|
95802
95802
|
var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
|
|
95803
95803
|
generatedName.generatedImportReference = specifier;
|
|
95804
95804
|
specifierSourceImports.set(name, specifier);
|
|
@@ -96946,11 +96946,11 @@ var ts;
|
|
|
96946
96946
|
}
|
|
96947
96947
|
else {
|
|
96948
96948
|
if (node.kind === 245 /* BreakStatement */) {
|
|
96949
|
-
labelMarker = "break-"
|
|
96949
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
96950
96950
|
setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
|
|
96951
96951
|
}
|
|
96952
96952
|
else {
|
|
96953
|
-
labelMarker = "continue-"
|
|
96953
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
96954
96954
|
setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
|
|
96955
96955
|
}
|
|
96956
96956
|
}
|
|
@@ -105807,7 +105807,7 @@ var ts;
|
|
|
105807
105807
|
return getTypeAliasDeclarationVisibilityError;
|
|
105808
105808
|
}
|
|
105809
105809
|
else {
|
|
105810
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
105810
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
105811
105811
|
}
|
|
105812
105812
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
105813
105813
|
if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
|
|
@@ -106018,7 +106018,7 @@ var ts;
|
|
|
106018
106018
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
106019
106019
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
106020
106020
|
default:
|
|
106021
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
106021
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
106022
106022
|
}
|
|
106023
106023
|
}
|
|
106024
106024
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -106776,7 +106776,7 @@ var ts;
|
|
|
106776
106776
|
while (ts.length(lateMarkedStatements)) {
|
|
106777
106777
|
var i = lateMarkedStatements.shift();
|
|
106778
106778
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
106779
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
106779
|
+
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));
|
|
106780
106780
|
}
|
|
106781
106781
|
var priorNeedsDeclare = needsDeclare;
|
|
106782
106782
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -106965,7 +106965,7 @@ var ts;
|
|
|
106965
106965
|
return cleanup(input);
|
|
106966
106966
|
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));
|
|
106967
106967
|
}
|
|
106968
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
106968
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
106969
106969
|
}
|
|
106970
106970
|
}
|
|
106971
106971
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -107256,7 +107256,7 @@ var ts;
|
|
|
107256
107256
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
|
|
107257
107257
|
// We must add a temporary declaration for the extends clause expression
|
|
107258
107258
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
107259
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
107259
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
|
|
107260
107260
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
107261
107261
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
107262
107262
|
errorNode: extendsClause_1,
|
|
@@ -107297,7 +107297,7 @@ var ts;
|
|
|
107297
107297
|
}
|
|
107298
107298
|
}
|
|
107299
107299
|
// Anything left unhandled is an error, so this should be unreachable
|
|
107300
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
107300
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
107301
107301
|
function cleanup(node) {
|
|
107302
107302
|
if (isEnclosingDeclaration(input)) {
|
|
107303
107303
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -108189,13 +108189,13 @@ var ts;
|
|
|
108189
108189
|
if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
|
|
108190
108190
|
return;
|
|
108191
108191
|
if (js && configFile.options.sourceMap) {
|
|
108192
|
-
addOutput(js
|
|
108192
|
+
addOutput("".concat(js, ".map"));
|
|
108193
108193
|
}
|
|
108194
108194
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
108195
108195
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
108196
108196
|
addOutput(dts);
|
|
108197
108197
|
if (configFile.options.declarationMap) {
|
|
108198
|
-
addOutput(dts
|
|
108198
|
+
addOutput("".concat(dts, ".map"));
|
|
108199
108199
|
}
|
|
108200
108200
|
}
|
|
108201
108201
|
}
|
|
@@ -108264,7 +108264,7 @@ var ts;
|
|
|
108264
108264
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
108265
108265
|
if (ts.outFile(configFile.options)) {
|
|
108266
108266
|
var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
|
|
108267
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
108267
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
108268
108268
|
}
|
|
108269
108269
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
108270
108270
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -108283,7 +108283,7 @@ var ts;
|
|
|
108283
108283
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
108284
108284
|
if (buildInfoPath)
|
|
108285
108285
|
return buildInfoPath;
|
|
108286
|
-
return ts.Debug.fail("project "
|
|
108286
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
108287
108287
|
}
|
|
108288
108288
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
108289
108289
|
/*@internal*/
|
|
@@ -108509,7 +108509,7 @@ var ts;
|
|
|
108509
108509
|
if (sourceMappingURL) {
|
|
108510
108510
|
if (!writer.isAtStartOfLine())
|
|
108511
108511
|
writer.rawWrite(newLine);
|
|
108512
|
-
writer.writeComment("//# "
|
|
108512
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
|
|
108513
108513
|
}
|
|
108514
108514
|
// Write the source map
|
|
108515
108515
|
if (sourceMapFilePath) {
|
|
@@ -108558,7 +108558,7 @@ var ts;
|
|
|
108558
108558
|
// Encode the sourceMap into the sourceMap url
|
|
108559
108559
|
var sourceMapText = sourceMapGenerator.toString();
|
|
108560
108560
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
108561
|
-
return "data:application/json;base64,"
|
|
108561
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
108562
108562
|
}
|
|
108563
108563
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
108564
108564
|
if (mapOptions.mapRoot) {
|
|
@@ -108738,7 +108738,7 @@ var ts;
|
|
|
108738
108738
|
return;
|
|
108739
108739
|
break;
|
|
108740
108740
|
default:
|
|
108741
|
-
ts.Debug.fail("Unexpected path: "
|
|
108741
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
108742
108742
|
}
|
|
108743
108743
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
108744
108744
|
},
|
|
@@ -109598,7 +109598,7 @@ var ts;
|
|
|
109598
109598
|
return writeTokenNode(node, writeKeyword);
|
|
109599
109599
|
if (ts.isTokenKind(node.kind))
|
|
109600
109600
|
return writeTokenNode(node, writePunctuation);
|
|
109601
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
109601
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
109602
109602
|
}
|
|
109603
109603
|
function emitMappedTypeParameter(node) {
|
|
109604
109604
|
emit(node.name);
|
|
@@ -109768,16 +109768,16 @@ var ts;
|
|
|
109768
109768
|
}
|
|
109769
109769
|
}
|
|
109770
109770
|
function emitPlaceholder(hint, node, snippet) {
|
|
109771
|
-
nonEscapingWrite("${"
|
|
109771
|
+
nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
|
|
109772
109772
|
pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
|
|
109773
109773
|
nonEscapingWrite("}"); // `}`
|
|
109774
109774
|
// `${2:...}`
|
|
109775
109775
|
}
|
|
109776
109776
|
function emitTabStop(hint, node, snippet) {
|
|
109777
109777
|
// A tab stop should only be attached to an empty node, i.e. a node that doesn't emit any text.
|
|
109778
|
-
ts.Debug.assert(node.kind === 235 /* EmptyStatement */, "A tab stop cannot be attached to a node of kind "
|
|
109778
|
+
ts.Debug.assert(node.kind === 235 /* EmptyStatement */, "A tab stop cannot be attached to a node of kind ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
109779
109779
|
ts.Debug.assert(hint !== 5 /* EmbeddedStatement */, "A tab stop cannot be attached to an embedded statement.");
|
|
109780
|
-
nonEscapingWrite("$"
|
|
109780
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
109781
109781
|
}
|
|
109782
109782
|
//
|
|
109783
109783
|
// Identifiers
|
|
@@ -111539,17 +111539,17 @@ var ts;
|
|
|
111539
111539
|
writeLine();
|
|
111540
111540
|
}
|
|
111541
111541
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
111542
|
-
writeComment("/// <amd-module name=\""
|
|
111542
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
111543
111543
|
writeLine();
|
|
111544
111544
|
}
|
|
111545
111545
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
111546
111546
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
111547
111547
|
var dep = _b[_a];
|
|
111548
111548
|
if (dep.name) {
|
|
111549
|
-
writeComment("/// <amd-dependency name=\""
|
|
111549
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
111550
111550
|
}
|
|
111551
111551
|
else {
|
|
111552
|
-
writeComment("/// <amd-dependency path=\""
|
|
111552
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
111553
111553
|
}
|
|
111554
111554
|
writeLine();
|
|
111555
111555
|
}
|
|
@@ -111557,7 +111557,7 @@ var ts;
|
|
|
111557
111557
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
111558
111558
|
var directive = files_2[_c];
|
|
111559
111559
|
var pos = writer.getTextPos();
|
|
111560
|
-
writeComment("/// <reference path=\""
|
|
111560
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
111561
111561
|
if (bundleFileInfo)
|
|
111562
111562
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
|
|
111563
111563
|
writeLine();
|
|
@@ -111565,7 +111565,7 @@ var ts;
|
|
|
111565
111565
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
111566
111566
|
var directive = types_24[_d];
|
|
111567
111567
|
var pos = writer.getTextPos();
|
|
111568
|
-
writeComment("/// <reference types=\""
|
|
111568
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
111569
111569
|
if (bundleFileInfo)
|
|
111570
111570
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
|
|
111571
111571
|
writeLine();
|
|
@@ -111573,7 +111573,7 @@ var ts;
|
|
|
111573
111573
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
111574
111574
|
var directive = libs_1[_e];
|
|
111575
111575
|
var pos = writer.getTextPos();
|
|
111576
|
-
writeComment("/// <reference lib=\""
|
|
111576
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
111577
111577
|
if (bundleFileInfo)
|
|
111578
111578
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
|
|
111579
111579
|
writeLine();
|
|
@@ -112353,9 +112353,9 @@ var ts;
|
|
|
112353
112353
|
var textSourceNode = node.textSourceNode;
|
|
112354
112354
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
112355
112355
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
112356
|
-
return jsxAttributeEscape ? "\""
|
|
112357
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\""
|
|
112358
|
-
"\""
|
|
112356
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
112357
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
112358
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
112359
112359
|
}
|
|
112360
112360
|
else {
|
|
112361
112361
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -112832,8 +112832,8 @@ var ts;
|
|
|
112832
112832
|
}
|
|
112833
112833
|
function formatSynthesizedComment(comment) {
|
|
112834
112834
|
return comment.kind === 3 /* MultiLineCommentTrivia */
|
|
112835
|
-
? "/*"
|
|
112836
|
-
: "//"
|
|
112835
|
+
? "/*".concat(comment.text, "*/")
|
|
112836
|
+
: "//".concat(comment.text);
|
|
112837
112837
|
}
|
|
112838
112838
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
112839
112839
|
enterComment();
|
|
@@ -113554,7 +113554,7 @@ var ts;
|
|
|
113554
113554
|
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;
|
|
113555
113555
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
113556
113556
|
if (!newPath) {
|
|
113557
|
-
writeLog("Project: "
|
|
113557
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
113558
113558
|
return true;
|
|
113559
113559
|
}
|
|
113560
113560
|
fileOrDirectoryPath = newPath;
|
|
@@ -113563,11 +113563,11 @@ var ts;
|
|
|
113563
113563
|
// If the the added or created file or directory is not supported file name, ignore the file
|
|
113564
113564
|
// But when watched directory is added/removed, we need to reload the file list
|
|
113565
113565
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
113566
|
-
writeLog("Project: "
|
|
113566
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
113567
113567
|
return true;
|
|
113568
113568
|
}
|
|
113569
113569
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
113570
|
-
writeLog("Project: "
|
|
113570
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
113571
113571
|
return true;
|
|
113572
113572
|
}
|
|
113573
113573
|
if (!program)
|
|
@@ -113591,7 +113591,7 @@ var ts;
|
|
|
113591
113591
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
113592
113592
|
if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
|
|
113593
113593
|
hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
|
|
113594
|
-
writeLog("Project: "
|
|
113594
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
113595
113595
|
return true;
|
|
113596
113596
|
}
|
|
113597
113597
|
return false;
|
|
@@ -113659,36 +113659,36 @@ var ts;
|
|
|
113659
113659
|
host.useCaseSensitiveFileNames();
|
|
113660
113660
|
}
|
|
113661
113661
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
113662
|
-
log("ExcludeWatcher:: Added:: "
|
|
113662
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113663
113663
|
return {
|
|
113664
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
113664
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
113665
113665
|
};
|
|
113666
113666
|
}
|
|
113667
113667
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
113668
|
-
log("FileWatcher:: Added:: "
|
|
113668
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113669
113669
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
113670
113670
|
return {
|
|
113671
113671
|
close: function () {
|
|
113672
|
-
log("FileWatcher:: Close:: "
|
|
113672
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113673
113673
|
watcher.close();
|
|
113674
113674
|
}
|
|
113675
113675
|
};
|
|
113676
113676
|
}
|
|
113677
113677
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
113678
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
113678
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
113679
113679
|
log(watchInfo);
|
|
113680
113680
|
var start = ts.timestamp();
|
|
113681
113681
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
113682
113682
|
var elapsed = ts.timestamp() - start;
|
|
113683
|
-
log("Elapsed:: "
|
|
113683
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
113684
113684
|
return {
|
|
113685
113685
|
close: function () {
|
|
113686
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
113686
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
113687
113687
|
log(watchInfo);
|
|
113688
113688
|
var start = ts.timestamp();
|
|
113689
113689
|
watcher.close();
|
|
113690
113690
|
var elapsed = ts.timestamp() - start;
|
|
113691
|
-
log("Elapsed:: "
|
|
113691
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
113692
113692
|
}
|
|
113693
113693
|
};
|
|
113694
113694
|
}
|
|
@@ -113698,16 +113698,16 @@ var ts;
|
|
|
113698
113698
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
113699
113699
|
args[_i] = arguments[_i];
|
|
113700
113700
|
}
|
|
113701
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
113701
|
+
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));
|
|
113702
113702
|
log(triggerredInfo);
|
|
113703
113703
|
var start = ts.timestamp();
|
|
113704
113704
|
cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
|
|
113705
113705
|
var elapsed = ts.timestamp() - start;
|
|
113706
|
-
log("Elapsed:: "
|
|
113706
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
113707
113707
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
113708
113708
|
}
|
|
113709
113709
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
113710
|
-
return "WatchInfo: "
|
|
113710
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
113711
113711
|
}
|
|
113712
113712
|
}
|
|
113713
113713
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -114014,12 +114014,12 @@ var ts;
|
|
|
114014
114014
|
}
|
|
114015
114015
|
ts.formatDiagnostics = formatDiagnostics;
|
|
114016
114016
|
function formatDiagnostic(diagnostic, host) {
|
|
114017
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
114017
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
114018
114018
|
if (diagnostic.file) {
|
|
114019
114019
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
|
|
114020
114020
|
var fileName = diagnostic.file.fileName;
|
|
114021
114021
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
114022
|
-
return relativeFileName
|
|
114022
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
114023
114023
|
}
|
|
114024
114024
|
return errorMessage;
|
|
114025
114025
|
}
|
|
@@ -114107,9 +114107,9 @@ var ts;
|
|
|
114107
114107
|
var output = "";
|
|
114108
114108
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
114109
114109
|
output += ":";
|
|
114110
|
-
output += color(""
|
|
114110
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
114111
114111
|
output += ":";
|
|
114112
|
-
output += color(""
|
|
114112
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
114113
114113
|
return output;
|
|
114114
114114
|
}
|
|
114115
114115
|
ts.formatLocation = formatLocation;
|
|
@@ -114123,7 +114123,7 @@ var ts;
|
|
|
114123
114123
|
output += " - ";
|
|
114124
114124
|
}
|
|
114125
114125
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
114126
|
-
output += formatColorAndReset(" TS"
|
|
114126
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
114127
114127
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
114128
114128
|
if (diagnostic.file) {
|
|
114129
114129
|
output += host.getNewLine();
|
|
@@ -114232,7 +114232,7 @@ var ts;
|
|
|
114232
114232
|
var result = void 0;
|
|
114233
114233
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
114234
114234
|
i++;
|
|
114235
|
-
var cacheKey = mode !== undefined ? mode
|
|
114235
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
114236
114236
|
if (cache.has(cacheKey)) {
|
|
114237
114237
|
result = cache.get(cacheKey);
|
|
114238
114238
|
}
|
|
@@ -116421,7 +116421,7 @@ var ts;
|
|
|
116421
116421
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
116422
116422
|
i++;
|
|
116423
116423
|
}
|
|
116424
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
116424
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
116425
116425
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
116426
116426
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
116427
116427
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -117242,12 +117242,12 @@ var ts;
|
|
|
117242
117242
|
}
|
|
117243
117243
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
117244
117244
|
var dirPath = host.toPath(dir);
|
|
117245
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
117245
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
117246
117246
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
117247
117247
|
// Any parent directory of declaration dir
|
|
117248
117248
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
117249
117249
|
// Any directory inside declaration dir
|
|
117250
|
-
ts.startsWith(dirPath, declDirPath
|
|
117250
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
117251
117251
|
}
|
|
117252
117252
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
117253
117253
|
var _a;
|
|
@@ -117300,7 +117300,7 @@ var ts;
|
|
|
117300
117300
|
if (isFile && result) {
|
|
117301
117301
|
// Store the real path for the file'
|
|
117302
117302
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
117303
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
117303
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
117304
117304
|
}
|
|
117305
117305
|
return result;
|
|
117306
117306
|
}) || false;
|
|
@@ -117758,7 +117758,7 @@ var ts;
|
|
|
117758
117758
|
/*forceDtsEmit*/ true);
|
|
117759
117759
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
117760
117760
|
if (firstDts_1) {
|
|
117761
|
-
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: "
|
|
117761
|
+
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; }))); });
|
|
117762
117762
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
117763
117763
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
117764
117764
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -118266,7 +118266,7 @@ var ts;
|
|
|
118266
118266
|
return;
|
|
118267
118267
|
}
|
|
118268
118268
|
else {
|
|
118269
|
-
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: "
|
|
118269
|
+
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));
|
|
118270
118270
|
}
|
|
118271
118271
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
118272
118272
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -119411,7 +119411,7 @@ var ts;
|
|
|
119411
119411
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
119412
119412
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
119413
119413
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
119414
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
119414
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
119415
119415
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
119416
119416
|
// Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
|
|
119417
119417
|
return {
|
|
@@ -120493,7 +120493,7 @@ var ts;
|
|
|
120493
120493
|
}
|
|
120494
120494
|
function getJSExtensionForFile(fileName, options) {
|
|
120495
120495
|
var _a;
|
|
120496
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
120496
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
120497
120497
|
}
|
|
120498
120498
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
120499
120499
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -120596,8 +120596,8 @@ var ts;
|
|
|
120596
120596
|
return pretty ?
|
|
120597
120597
|
function (diagnostic, newLine, options) {
|
|
120598
120598
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
120599
|
-
var output = "["
|
|
120600
|
-
output += ""
|
|
120599
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
120600
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
120601
120601
|
system.write(output);
|
|
120602
120602
|
} :
|
|
120603
120603
|
function (diagnostic, newLine, options) {
|
|
@@ -120605,8 +120605,8 @@ var ts;
|
|
|
120605
120605
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
120606
120606
|
output += newLine;
|
|
120607
120607
|
}
|
|
120608
|
-
output += getLocaleTimeString(system)
|
|
120609
|
-
output += ""
|
|
120608
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
120609
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
120610
120610
|
system.write(output);
|
|
120611
120611
|
};
|
|
120612
120612
|
}
|
|
@@ -120629,7 +120629,7 @@ var ts;
|
|
|
120629
120629
|
.map(function (errorDiagnostic) {
|
|
120630
120630
|
if (errorDiagnostic.file === undefined)
|
|
120631
120631
|
return;
|
|
120632
|
-
return ""
|
|
120632
|
+
return "".concat(errorDiagnostic.file.fileName);
|
|
120633
120633
|
});
|
|
120634
120634
|
return filesInError.map(function (fileName) {
|
|
120635
120635
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -120662,7 +120662,7 @@ var ts;
|
|
|
120662
120662
|
if (errorCount === 0)
|
|
120663
120663
|
return "";
|
|
120664
120664
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
120665
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName
|
|
120665
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return "".concat(fileInError.fileName, ":").concat(fileInError.line); })
|
|
120666
120666
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
120667
120667
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
120668
120668
|
var d = errorCount === 1 ?
|
|
@@ -120675,7 +120675,7 @@ var ts;
|
|
|
120675
120675
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
120676
120676
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
120677
120677
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
120678
|
-
return ""
|
|
120678
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine).concat(suffix);
|
|
120679
120679
|
}
|
|
120680
120680
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
120681
120681
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -120698,7 +120698,7 @@ var ts;
|
|
|
120698
120698
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
120699
120699
|
: "";
|
|
120700
120700
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
120701
|
-
tabularData += ""
|
|
120701
|
+
tabularData += "".concat(leftPadding).concat(errorCount, " ").concat(fileRef, "\n");
|
|
120702
120702
|
});
|
|
120703
120703
|
return tabularData;
|
|
120704
120704
|
}
|
|
@@ -120725,9 +120725,9 @@ var ts;
|
|
|
120725
120725
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
120726
120726
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
120727
120727
|
var file = _c[_i];
|
|
120728
|
-
write(""
|
|
120729
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
120730
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
120728
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
120729
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
120730
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
120731
120731
|
}
|
|
120732
120732
|
}
|
|
120733
120733
|
ts.explainFiles = explainFiles;
|
|
@@ -120767,7 +120767,7 @@ var ts;
|
|
|
120767
120767
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
|
|
120768
120768
|
return false;
|
|
120769
120769
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
120770
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
120770
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
120771
120771
|
});
|
|
120772
120772
|
}
|
|
120773
120773
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -120776,7 +120776,7 @@ var ts;
|
|
|
120776
120776
|
var options = program.getCompilerOptions();
|
|
120777
120777
|
if (ts.isReferencedFile(reason)) {
|
|
120778
120778
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
120779
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
120779
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
120780
120780
|
var message = void 0;
|
|
120781
120781
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
120782
120782
|
switch (reason.kind) {
|
|
@@ -120900,7 +120900,7 @@ var ts;
|
|
|
120900
120900
|
var currentDir_1 = program.getCurrentDirectory();
|
|
120901
120901
|
ts.forEach(emittedFiles, function (file) {
|
|
120902
120902
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
120903
|
-
write("TSFILE: "
|
|
120903
|
+
write("TSFILE: ".concat(filepath));
|
|
120904
120904
|
});
|
|
120905
120905
|
listFiles(program, write);
|
|
120906
120906
|
}
|
|
@@ -121229,7 +121229,7 @@ var ts;
|
|
|
121229
121229
|
}
|
|
121230
121230
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
121231
121231
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
121232
|
-
writeLog("Current directory: "
|
|
121232
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
121233
121233
|
var configFileWatcher;
|
|
121234
121234
|
if (configFileName) {
|
|
121235
121235
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -121385,10 +121385,10 @@ var ts;
|
|
|
121385
121385
|
function createNewProgram(hasInvalidatedResolution) {
|
|
121386
121386
|
// Compile the program
|
|
121387
121387
|
writeLog("CreatingProgramWith::");
|
|
121388
|
-
writeLog(" roots: "
|
|
121389
|
-
writeLog(" options: "
|
|
121388
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
121389
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
121390
121390
|
if (projectReferences)
|
|
121391
|
-
writeLog(" projectReferences: "
|
|
121391
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
121392
121392
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
121393
121393
|
hasChangedCompilerOptions = false;
|
|
121394
121394
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -121549,7 +121549,7 @@ var ts;
|
|
|
121549
121549
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
121550
121550
|
}
|
|
121551
121551
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
121552
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
121552
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
121553
121553
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
121554
121554
|
}
|
|
121555
121555
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -121609,7 +121609,7 @@ var ts;
|
|
|
121609
121609
|
synchronizeProgram();
|
|
121610
121610
|
}
|
|
121611
121611
|
function reloadConfigFile() {
|
|
121612
|
-
writeLog("Reloading config file: "
|
|
121612
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
121613
121613
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
121614
121614
|
if (cachedDirectoryStructureHost) {
|
|
121615
121615
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -121650,7 +121650,7 @@ var ts;
|
|
|
121650
121650
|
return config.parsedCommandLine;
|
|
121651
121651
|
}
|
|
121652
121652
|
}
|
|
121653
|
-
writeLog("Loading config file: "
|
|
121653
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
121654
121654
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
121655
121655
|
host.getParsedCommandLine(configFileName) :
|
|
121656
121656
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -121954,8 +121954,8 @@ var ts;
|
|
|
121954
121954
|
*/
|
|
121955
121955
|
function createBuilderStatusReporter(system, pretty) {
|
|
121956
121956
|
return function (diagnostic) {
|
|
121957
|
-
var output = pretty ? "["
|
|
121958
|
-
output += ""
|
|
121957
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
121958
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
121959
121959
|
system.write(output);
|
|
121960
121960
|
};
|
|
121961
121961
|
}
|
|
@@ -122730,7 +122730,7 @@ var ts;
|
|
|
122730
122730
|
function listEmittedFile(_a, proj, file) {
|
|
122731
122731
|
var write = _a.write;
|
|
122732
122732
|
if (write && proj.options.listEmittedFiles) {
|
|
122733
|
-
write("TSFILE: "
|
|
122733
|
+
write("TSFILE: ".concat(file));
|
|
122734
122734
|
}
|
|
122735
122735
|
}
|
|
122736
122736
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -122759,7 +122759,7 @@ var ts;
|
|
|
122759
122759
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
122760
122760
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
122761
122761
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
122762
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
122762
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
122763
122763
|
if (canEmitBuildInfo)
|
|
122764
122764
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
122765
122765
|
afterProgramDone(state, program, config);
|
|
@@ -122787,7 +122787,7 @@ var ts;
|
|
|
122787
122787
|
if (!host.fileExists(inputFile)) {
|
|
122788
122788
|
return {
|
|
122789
122789
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
122790
|
-
reason: inputFile
|
|
122790
|
+
reason: "".concat(inputFile, " does not exist")
|
|
122791
122791
|
};
|
|
122792
122792
|
}
|
|
122793
122793
|
if (!force) {
|
|
@@ -123146,7 +123146,7 @@ var ts;
|
|
|
123146
123146
|
}
|
|
123147
123147
|
}
|
|
123148
123148
|
if (filesToDelete) {
|
|
123149
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
123149
|
+
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(""));
|
|
123150
123150
|
}
|
|
123151
123151
|
return ts.ExitStatus.Success;
|
|
123152
123152
|
}
|
|
@@ -125976,7 +125976,7 @@ var ts;
|
|
|
125976
125976
|
var prefix = ts.isJSDocLink(link) ? "link"
|
|
125977
125977
|
: ts.isJSDocLinkCode(link) ? "linkcode"
|
|
125978
125978
|
: "linkplain";
|
|
125979
|
-
var parts = [linkPart("{@"
|
|
125979
|
+
var parts = [linkPart("{@".concat(prefix, " "))];
|
|
125980
125980
|
if (!link.name) {
|
|
125981
125981
|
if (link.text)
|
|
125982
125982
|
parts.push(linkTextPart(link.text));
|
|
@@ -126224,7 +126224,7 @@ var ts;
|
|
|
126224
126224
|
function getUniqueName(baseName, sourceFile) {
|
|
126225
126225
|
var nameText = baseName;
|
|
126226
126226
|
for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
|
|
126227
|
-
nameText = baseName
|
|
126227
|
+
nameText = "".concat(baseName, "_").concat(i);
|
|
126228
126228
|
}
|
|
126229
126229
|
return nameText;
|
|
126230
126230
|
}
|
|
@@ -126334,7 +126334,7 @@ var ts;
|
|
|
126334
126334
|
// Editors can pass in undefined or empty string - we want to infer the preference in those cases.
|
|
126335
126335
|
var quotePreference = getQuotePreference(sourceFile, preferences);
|
|
126336
126336
|
var quoted = JSON.stringify(text);
|
|
126337
|
-
return quotePreference === 0 /* Single */ ? "'"
|
|
126337
|
+
return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
|
|
126338
126338
|
}
|
|
126339
126339
|
ts.quote = quote;
|
|
126340
126340
|
function isEqualityOperatorKind(kind) {
|
|
@@ -126718,7 +126718,7 @@ var ts;
|
|
|
126718
126718
|
var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
|
|
126719
126719
|
// Scoped packages
|
|
126720
126720
|
if (ts.startsWith(components[0], "@")) {
|
|
126721
|
-
return components[0]
|
|
126721
|
+
return "".concat(components[0], "/").concat(components[1]);
|
|
126722
126722
|
}
|
|
126723
126723
|
return components[0];
|
|
126724
126724
|
}
|
|
@@ -126845,13 +126845,13 @@ var ts;
|
|
|
126845
126845
|
}
|
|
126846
126846
|
function getSymbolParentOrFail(symbol) {
|
|
126847
126847
|
var _a;
|
|
126848
|
-
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: "
|
|
126849
|
-
|
|
126848
|
+
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
|
|
126849
|
+
"Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
|
|
126850
126850
|
var kind = ts.Debug.formatSyntaxKind(d.kind);
|
|
126851
126851
|
var inJS = ts.isInJSFile(d);
|
|
126852
126852
|
var expression = d.expression;
|
|
126853
|
-
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: "
|
|
126854
|
-
}).join(", ")
|
|
126853
|
+
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
|
|
126854
|
+
}).join(", "), "."));
|
|
126855
126855
|
}
|
|
126856
126856
|
/**
|
|
126857
126857
|
* Useful to check whether a string contains another string at a specific index
|
|
@@ -127112,7 +127112,7 @@ var ts;
|
|
|
127112
127112
|
: checker.tryFindAmbientModule(info.moduleName));
|
|
127113
127113
|
var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
|
|
127114
127114
|
? checker.resolveExternalModuleSymbol(moduleSymbol)
|
|
127115
|
-
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '"
|
|
127115
|
+
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '".concat(info.symbolName, "' by key '").concat(info.symbolTableKey, "' in module ").concat(moduleSymbol.name));
|
|
127116
127116
|
symbols.set(id, [symbol, moduleSymbol]);
|
|
127117
127117
|
return {
|
|
127118
127118
|
symbol: symbol,
|
|
@@ -127125,7 +127125,7 @@ var ts;
|
|
|
127125
127125
|
}
|
|
127126
127126
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
127127
127127
|
var moduleKey = ambientModuleName || "";
|
|
127128
|
-
return importedName
|
|
127128
|
+
return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
|
|
127129
127129
|
}
|
|
127130
127130
|
function parseKey(key) {
|
|
127131
127131
|
var symbolName = key.substring(0, key.indexOf("|"));
|
|
@@ -127211,7 +127211,7 @@ var ts;
|
|
|
127211
127211
|
if (autoImportProvider) {
|
|
127212
127212
|
var start = ts.timestamp();
|
|
127213
127213
|
forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), function (module, file) { return cb(module, file, autoImportProvider, /*isFromPackageJson*/ true); });
|
|
127214
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: "
|
|
127214
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
|
|
127215
127215
|
}
|
|
127216
127216
|
}
|
|
127217
127217
|
ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
|
|
@@ -127264,7 +127264,7 @@ var ts;
|
|
|
127264
127264
|
}
|
|
127265
127265
|
});
|
|
127266
127266
|
});
|
|
127267
|
-
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in "
|
|
127267
|
+
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
|
|
127268
127268
|
return cache;
|
|
127269
127269
|
}
|
|
127270
127270
|
ts.getExportInfoMap = getExportInfoMap;
|
|
@@ -127797,7 +127797,7 @@ var ts;
|
|
|
127797
127797
|
return { spans: spans, endOfLineState: 0 /* None */ };
|
|
127798
127798
|
function pushClassification(start, end, type) {
|
|
127799
127799
|
var length = end - start;
|
|
127800
|
-
ts.Debug.assert(length > 0, "Classification had non-positive length of "
|
|
127800
|
+
ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
|
|
127801
127801
|
spans.push(start);
|
|
127802
127802
|
spans.push(length);
|
|
127803
127803
|
spans.push(type);
|
|
@@ -128669,7 +128669,7 @@ var ts;
|
|
|
128669
128669
|
case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
|
|
128670
128670
|
case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
|
|
128671
128671
|
case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
|
|
128672
|
-
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension "
|
|
128672
|
+
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
|
|
128673
128673
|
case undefined: return "" /* none */;
|
|
128674
128674
|
default:
|
|
128675
128675
|
return ts.Debug.assertNever(extension);
|
|
@@ -129405,10 +129405,10 @@ var ts;
|
|
|
129405
129405
|
var resolvedFromCacheCount = 0;
|
|
129406
129406
|
var cacheAttemptCount = 0;
|
|
129407
129407
|
var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
|
|
129408
|
-
var hitRateMessage = cacheAttemptCount ? " ("
|
|
129409
|
-
(_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix
|
|
129410
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix
|
|
129411
|
-
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix
|
|
129408
|
+
var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
|
|
129409
|
+
(_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, "".concat(logPrefix, ": resolved ").concat(resolvedCount, " module specifiers, plus ").concat(ambientCount, " ambient and ").concat(resolvedFromCacheCount, " from cache").concat(hitRateMessage));
|
|
129410
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
|
|
129411
|
+
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
|
|
129412
129412
|
return result;
|
|
129413
129413
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
129414
129414
|
if (isFromAmbientModule) {
|
|
@@ -129741,15 +129741,15 @@ var ts;
|
|
|
129741
129741
|
var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
|
|
129742
129742
|
if (origin && originIsThisType(origin)) {
|
|
129743
129743
|
insertText = needsConvertPropertyAccess
|
|
129744
|
-
? "this"
|
|
129745
|
-
: "this"
|
|
129744
|
+
? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
|
|
129745
|
+
: "this".concat(insertQuestionDot ? "?." : ".").concat(name);
|
|
129746
129746
|
}
|
|
129747
129747
|
// We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
|
|
129748
129748
|
// Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro.
|
|
129749
129749
|
else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
|
|
129750
|
-
insertText = useBraces ? needsConvertPropertyAccess ? "["
|
|
129750
|
+
insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
|
|
129751
129751
|
if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
|
|
129752
|
-
insertText = "?."
|
|
129752
|
+
insertText = "?.".concat(insertText);
|
|
129753
129753
|
}
|
|
129754
129754
|
var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
|
|
129755
129755
|
ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
|
|
@@ -129763,7 +129763,7 @@ var ts;
|
|
|
129763
129763
|
if (isJsxInitializer) {
|
|
129764
129764
|
if (insertText === undefined)
|
|
129765
129765
|
insertText = name;
|
|
129766
|
-
insertText = "{"
|
|
129766
|
+
insertText = "{".concat(insertText, "}");
|
|
129767
129767
|
if (typeof isJsxInitializer !== "boolean") {
|
|
129768
129768
|
replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
|
|
129769
129769
|
}
|
|
@@ -129776,8 +129776,8 @@ var ts;
|
|
|
129776
129776
|
if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
|
|
129777
129777
|
awaitText = ";";
|
|
129778
129778
|
}
|
|
129779
|
-
awaitText += "(await "
|
|
129780
|
-
insertText = needsConvertPropertyAccess ? ""
|
|
129779
|
+
awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
|
|
129780
|
+
insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
|
|
129781
129781
|
replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
|
|
129782
129782
|
}
|
|
129783
129783
|
if (originIsResolvedExport(origin)) {
|
|
@@ -129810,7 +129810,7 @@ var ts;
|
|
|
129810
129810
|
&& !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
|
|
129811
129811
|
if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
|
|
129812
129812
|
// If is string like or undefined use quotes
|
|
129813
|
-
insertText = ts.escapeSnippetText(name)
|
|
129813
|
+
insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
|
|
129814
129814
|
isSnippet = true;
|
|
129815
129815
|
}
|
|
129816
129816
|
else {
|
|
@@ -129819,7 +129819,7 @@ var ts;
|
|
|
129819
129819
|
}
|
|
129820
129820
|
}
|
|
129821
129821
|
if (useBraces_1) {
|
|
129822
|
-
insertText = ts.escapeSnippetText(name)
|
|
129822
|
+
insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
|
|
129823
129823
|
isSnippet = true;
|
|
129824
129824
|
}
|
|
129825
129825
|
}
|
|
@@ -130104,14 +130104,14 @@ var ts;
|
|
|
130104
130104
|
var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
|
|
130105
130105
|
var isTopLevelTypeOnly = ((_b = (_a = ts.tryCast(importCompletionNode, ts.isImportDeclaration)) === null || _a === void 0 ? void 0 : _a.importClause) === null || _b === void 0 ? void 0 : _b.isTypeOnly) || ((_c = ts.tryCast(importCompletionNode, ts.isImportEqualsDeclaration)) === null || _c === void 0 ? void 0 : _c.isTypeOnly);
|
|
130106
130106
|
var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
|
|
130107
|
-
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " "
|
|
130108
|
-
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */)
|
|
130107
|
+
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
|
|
130108
|
+
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
|
|
130109
130109
|
var suffix = useSemicolons ? ";" : "";
|
|
130110
130110
|
switch (importKind) {
|
|
130111
|
-
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130112
|
-
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130113
|
-
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130114
|
-
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130111
|
+
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
|
|
130112
|
+
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130113
|
+
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130114
|
+
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130115
130115
|
}
|
|
130116
130116
|
}
|
|
130117
130117
|
function quotePropertyName(sourceFile, preferences, name) {
|
|
@@ -133073,7 +133073,7 @@ var ts;
|
|
|
133073
133073
|
}
|
|
133074
133074
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
133075
133075
|
var entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(ts.Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided"));
|
|
133076
|
-
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:"
|
|
133076
|
+
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:".concat(scriptKind, " and sourceFile.scriptKind: ").concat(entry === null || entry === void 0 ? void 0 : entry.sourceFile.scriptKind, ", !entry: ").concat(!entry));
|
|
133077
133077
|
return entry;
|
|
133078
133078
|
}
|
|
133079
133079
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
@@ -134102,7 +134102,7 @@ var ts;
|
|
|
134102
134102
|
sourceFile: def.file,
|
|
134103
134103
|
name: def.reference.fileName,
|
|
134104
134104
|
kind: "string" /* string */,
|
|
134105
|
-
displayParts: [ts.displayPart("\""
|
|
134105
|
+
displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
|
|
134106
134106
|
};
|
|
134107
134107
|
}
|
|
134108
134108
|
default:
|
|
@@ -134682,7 +134682,7 @@ var ts;
|
|
|
134682
134682
|
if (symbol.flags & 33554432 /* Transient */)
|
|
134683
134683
|
return undefined;
|
|
134684
134684
|
// Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
|
|
134685
|
-
ts.Debug.fail("Unexpected symbol at "
|
|
134685
|
+
ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
|
|
134686
134686
|
}
|
|
134687
134687
|
return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
|
|
134688
134688
|
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
|
|
@@ -135967,8 +135967,8 @@ var ts;
|
|
|
135967
135967
|
var end = pos + 6; /* "static".length */
|
|
135968
135968
|
var typeChecker = program.getTypeChecker();
|
|
135969
135969
|
var symbol = typeChecker.getSymbolAtLocation(node.parent);
|
|
135970
|
-
var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent)
|
|
135971
|
-
return { text: prefix
|
|
135970
|
+
var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
|
|
135971
|
+
return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
|
|
135972
135972
|
}
|
|
135973
135973
|
var declName = isConstNamedExpression(node) ? node.parent.name :
|
|
135974
135974
|
ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
@@ -137252,7 +137252,7 @@ var ts;
|
|
|
137252
137252
|
function getJSDocTagCompletions() {
|
|
137253
137253
|
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
|
|
137254
137254
|
return {
|
|
137255
|
-
name: "@"
|
|
137255
|
+
name: "@".concat(tagName),
|
|
137256
137256
|
kind: "keyword" /* keyword */,
|
|
137257
137257
|
kindModifiers: "",
|
|
137258
137258
|
sortText: ts.Completions.SortText.LocationPriority
|
|
@@ -137384,11 +137384,11 @@ var ts;
|
|
|
137384
137384
|
var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
|
|
137385
137385
|
var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
|
|
137386
137386
|
var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
|
|
137387
|
-
return indentationStr
|
|
137387
|
+
return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
|
|
137388
137388
|
}).join("");
|
|
137389
137389
|
}
|
|
137390
137390
|
function returnsDocComment(indentationStr, newLine) {
|
|
137391
|
-
return indentationStr
|
|
137391
|
+
return "".concat(indentationStr, " * @returns").concat(newLine);
|
|
137392
137392
|
}
|
|
137393
137393
|
function getCommentOwnerInfo(tokenAtPos, options) {
|
|
137394
137394
|
return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
|
|
@@ -138231,7 +138231,7 @@ var ts;
|
|
|
138231
138231
|
}
|
|
138232
138232
|
if (name) {
|
|
138233
138233
|
var text = ts.isIdentifier(name) ? name.text
|
|
138234
|
-
: ts.isElementAccessExpression(name) ? "["
|
|
138234
|
+
: ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
|
|
138235
138235
|
: nodeText(name);
|
|
138236
138236
|
if (text.length > 0) {
|
|
138237
138237
|
return cleanText(text);
|
|
@@ -138241,7 +138241,7 @@ var ts;
|
|
|
138241
138241
|
case 303 /* SourceFile */:
|
|
138242
138242
|
var sourceFile = node;
|
|
138243
138243
|
return ts.isExternalModule(sourceFile)
|
|
138244
|
-
? "\""
|
|
138244
|
+
? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
|
|
138245
138245
|
: "<global>";
|
|
138246
138246
|
case 270 /* ExportAssignment */:
|
|
138247
138247
|
return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
|
|
@@ -138437,10 +138437,10 @@ var ts;
|
|
|
138437
138437
|
if (name !== undefined) {
|
|
138438
138438
|
name = cleanText(name);
|
|
138439
138439
|
if (name.length > maxLength) {
|
|
138440
|
-
return name
|
|
138440
|
+
return "".concat(name, " callback");
|
|
138441
138441
|
}
|
|
138442
138442
|
var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
|
|
138443
|
-
return name
|
|
138443
|
+
return "".concat(name, "(").concat(args, ") callback");
|
|
138444
138444
|
}
|
|
138445
138445
|
}
|
|
138446
138446
|
return "<function>";
|
|
@@ -138453,7 +138453,7 @@ var ts;
|
|
|
138453
138453
|
else if (ts.isPropertyAccessExpression(expr)) {
|
|
138454
138454
|
var left = getCalledExpressionName(expr.expression);
|
|
138455
138455
|
var right = expr.name.text;
|
|
138456
|
-
return left === undefined ? right : left
|
|
138456
|
+
return left === undefined ? right : "".concat(left, ".").concat(right);
|
|
138457
138457
|
}
|
|
138458
138458
|
else {
|
|
138459
138459
|
return undefined;
|
|
@@ -140900,7 +140900,7 @@ var ts;
|
|
|
140900
140900
|
var _loop_9 = function (n) {
|
|
140901
140901
|
// If the node is not a subspan of its parent, this is a big problem.
|
|
140902
140902
|
// There have been crashes that might be caused by this violation.
|
|
140903
|
-
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: "
|
|
140903
|
+
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: ".concat(ts.Debug.formatSyntaxKind(n.kind), ", parent: ").concat(ts.Debug.formatSyntaxKind(n.parent.kind)); });
|
|
140904
140904
|
var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
|
|
140905
140905
|
if (argumentInfo) {
|
|
140906
140906
|
return { value: argumentInfo };
|
|
@@ -141072,7 +141072,7 @@ var ts;
|
|
|
141072
141072
|
(function (InlayHints) {
|
|
141073
141073
|
var maxHintsLength = 30;
|
|
141074
141074
|
var leadingParameterNameCommentRegexFactory = function (name) {
|
|
141075
|
-
return new RegExp("^\\s?/\\*\\*?\\s?"
|
|
141075
|
+
return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
|
|
141076
141076
|
};
|
|
141077
141077
|
function shouldShowParameterNameHints(preferences) {
|
|
141078
141078
|
return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
|
|
@@ -141136,7 +141136,7 @@ var ts;
|
|
|
141136
141136
|
}
|
|
141137
141137
|
function addParameterHints(text, position, isFirstVariadicArgument) {
|
|
141138
141138
|
result.push({
|
|
141139
|
-
text: ""
|
|
141139
|
+
text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
|
|
141140
141140
|
position: position,
|
|
141141
141141
|
kind: "Parameter" /* Parameter */,
|
|
141142
141142
|
whitespaceAfter: true,
|
|
@@ -141144,7 +141144,7 @@ var ts;
|
|
|
141144
141144
|
}
|
|
141145
141145
|
function addTypeHints(text, position) {
|
|
141146
141146
|
result.push({
|
|
141147
|
-
text: ": "
|
|
141147
|
+
text: ": ".concat(truncation(text, maxHintsLength)),
|
|
141148
141148
|
position: position,
|
|
141149
141149
|
kind: "Type" /* Type */,
|
|
141150
141150
|
whitespaceBefore: true,
|
|
@@ -141152,7 +141152,7 @@ var ts;
|
|
|
141152
141152
|
}
|
|
141153
141153
|
function addEnumMemberValueHints(text, position) {
|
|
141154
141154
|
result.push({
|
|
141155
|
-
text: "= "
|
|
141155
|
+
text: "= ".concat(truncation(text, maxHintsLength)),
|
|
141156
141156
|
position: position,
|
|
141157
141157
|
kind: "Enum" /* Enum */,
|
|
141158
141158
|
whitespaceBefore: true,
|
|
@@ -141687,7 +141687,7 @@ var ts;
|
|
|
141687
141687
|
}
|
|
141688
141688
|
}
|
|
141689
141689
|
function getKeyFromNode(exp) {
|
|
141690
|
-
return exp.pos.toString()
|
|
141690
|
+
return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
|
|
141691
141691
|
}
|
|
141692
141692
|
function canBeConvertedToClass(node, checker) {
|
|
141693
141693
|
var _a, _b, _c, _d;
|
|
@@ -145836,7 +145836,7 @@ var ts;
|
|
|
145836
145836
|
var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
145837
145837
|
var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
145838
145838
|
var indent = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
145839
|
-
var text = (insertAtLineStart ? "" : this.newLineCharacter
|
|
145839
|
+
var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
|
|
145840
145840
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
145841
145841
|
};
|
|
145842
145842
|
ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
|
|
@@ -146060,7 +146060,7 @@ var ts;
|
|
|
146060
146060
|
};
|
|
146061
146061
|
ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
|
|
146062
146062
|
var options = this.getInsertNodeAfterOptionsWorker(after);
|
|
146063
|
-
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n"
|
|
146063
|
+
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
|
|
146064
146064
|
};
|
|
146065
146065
|
ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
|
|
146066
146066
|
switch (node.kind) {
|
|
@@ -146094,7 +146094,7 @@ var ts;
|
|
|
146094
146094
|
}
|
|
146095
146095
|
else {
|
|
146096
146096
|
// `x => {}` -> `function f(x) {}`
|
|
146097
|
-
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function "
|
|
146097
|
+
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
|
|
146098
146098
|
// Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
|
|
146099
146099
|
this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
|
|
146100
146100
|
}
|
|
@@ -146160,7 +146160,7 @@ var ts;
|
|
|
146160
146160
|
var nextNode = containingList[index + 1];
|
|
146161
146161
|
var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
146162
146162
|
// write separator and leading trivia of the next element as suffix
|
|
146163
|
-
var suffix = ""
|
|
146163
|
+
var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
|
|
146164
146164
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
|
|
146165
146165
|
}
|
|
146166
146166
|
}
|
|
@@ -146205,7 +146205,7 @@ var ts;
|
|
|
146205
146205
|
this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
|
|
146206
146206
|
}
|
|
146207
146207
|
else {
|
|
146208
|
-
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator)
|
|
146208
|
+
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
|
|
146209
146209
|
}
|
|
146210
146210
|
}
|
|
146211
146211
|
};
|
|
@@ -146336,7 +146336,7 @@ var ts;
|
|
|
146336
146336
|
var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
|
|
146337
146337
|
var _loop_12 = function (i) {
|
|
146338
146338
|
ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
|
|
146339
|
-
return JSON.stringify(normalized[i].range)
|
|
146339
|
+
return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
|
|
146340
146340
|
});
|
|
146341
146341
|
};
|
|
146342
146342
|
// verify that change intervals do not overlap, except possibly at end points.
|
|
@@ -146427,7 +146427,7 @@ var ts;
|
|
|
146427
146427
|
function applyChanges(text, changes) {
|
|
146428
146428
|
for (var i = changes.length - 1; i >= 0; i--) {
|
|
146429
146429
|
var _a = changes[i], span = _a.span, newText = _a.newText;
|
|
146430
|
-
text = ""
|
|
146430
|
+
text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
|
|
146431
146431
|
}
|
|
146432
146432
|
return text;
|
|
146433
146433
|
}
|
|
@@ -148912,7 +148912,7 @@ var ts;
|
|
|
148912
148912
|
if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
|
|
148913
148913
|
|| checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
|
|
148914
148914
|
// Unconditionally add an underscore in case `text` is a keyword.
|
|
148915
|
-
res.set(text, makeUniqueName("_"
|
|
148915
|
+
res.set(text, makeUniqueName("_".concat(text), identifiers));
|
|
148916
148916
|
}
|
|
148917
148917
|
});
|
|
148918
148918
|
return res;
|
|
@@ -149012,7 +149012,7 @@ var ts;
|
|
|
149012
149012
|
// `const a = require("b").c` --> `import { c as a } from "./b";
|
|
149013
149013
|
return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
|
|
149014
149014
|
default:
|
|
149015
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form "
|
|
149015
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
|
|
149016
149016
|
}
|
|
149017
149017
|
}
|
|
149018
149018
|
function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
|
|
@@ -149063,7 +149063,7 @@ var ts;
|
|
|
149063
149063
|
case 168 /* MethodDeclaration */:
|
|
149064
149064
|
return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
|
|
149065
149065
|
default:
|
|
149066
|
-
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind "
|
|
149066
|
+
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
|
|
149067
149067
|
}
|
|
149068
149068
|
});
|
|
149069
149069
|
return statements && [statements, false];
|
|
@@ -149195,7 +149195,7 @@ var ts;
|
|
|
149195
149195
|
case 79 /* Identifier */:
|
|
149196
149196
|
return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
|
|
149197
149197
|
default:
|
|
149198
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind "
|
|
149198
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
|
|
149199
149199
|
}
|
|
149200
149200
|
}
|
|
149201
149201
|
/**
|
|
@@ -149252,7 +149252,7 @@ var ts;
|
|
|
149252
149252
|
// Identifiers helpers
|
|
149253
149253
|
function makeUniqueName(name, identifiers) {
|
|
149254
149254
|
while (identifiers.original.has(name) || identifiers.additional.has(name)) {
|
|
149255
|
-
name = "_"
|
|
149255
|
+
name = "_".concat(name);
|
|
149256
149256
|
}
|
|
149257
149257
|
identifiers.additional.add(name);
|
|
149258
149258
|
return name;
|
|
@@ -149332,7 +149332,7 @@ var ts;
|
|
|
149332
149332
|
if (!qualifiedName)
|
|
149333
149333
|
return undefined;
|
|
149334
149334
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
|
|
149335
|
-
var newText = qualifiedName.left.text
|
|
149335
|
+
var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
|
|
149336
149336
|
return [codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, ts.Diagnostics.Rewrite_all_as_indexed_access_types)];
|
|
149337
149337
|
},
|
|
149338
149338
|
fixIds: [fixId],
|
|
@@ -149734,7 +149734,7 @@ var ts;
|
|
|
149734
149734
|
// Excluding from fix-all
|
|
149735
149735
|
break;
|
|
149736
149736
|
default:
|
|
149737
|
-
ts.Debug.assertNever(fix, "fix wasn't never - got kind "
|
|
149737
|
+
ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
|
|
149738
149738
|
}
|
|
149739
149739
|
function reduceAddAsTypeOnlyValues(prevValue, newValue) {
|
|
149740
149740
|
// `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
|
|
@@ -149778,7 +149778,7 @@ var ts;
|
|
|
149778
149778
|
return newEntry;
|
|
149779
149779
|
}
|
|
149780
149780
|
function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
|
|
149781
|
-
return (topLevelTypeOnly ? 1 : 0
|
|
149781
|
+
return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
|
|
149782
149782
|
}
|
|
149783
149783
|
}
|
|
149784
149784
|
function writeFixes(changeTracker) {
|
|
@@ -150276,7 +150276,7 @@ var ts;
|
|
|
150276
150276
|
case ts.ModuleKind.NodeNext:
|
|
150277
150277
|
return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
|
|
150278
150278
|
default:
|
|
150279
|
-
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind "
|
|
150279
|
+
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
|
|
150280
150280
|
}
|
|
150281
150281
|
}
|
|
150282
150282
|
function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
|
|
@@ -150399,7 +150399,7 @@ var ts;
|
|
|
150399
150399
|
switch (fix.kind) {
|
|
150400
150400
|
case 0 /* UseNamespace */:
|
|
150401
150401
|
addNamespaceQualifier(changes, sourceFile, fix);
|
|
150402
|
-
return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix
|
|
150402
|
+
return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
|
|
150403
150403
|
case 1 /* JsdocTypeImport */:
|
|
150404
150404
|
addImportType(changes, sourceFile, fix, quotePreference);
|
|
150405
150405
|
return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
|
|
@@ -150430,7 +150430,7 @@ var ts;
|
|
|
150430
150430
|
: [ts.Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)];
|
|
150431
150431
|
}
|
|
150432
150432
|
default:
|
|
150433
|
-
return ts.Debug.assertNever(fix, "Unexpected fix kind "
|
|
150433
|
+
return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
|
|
150434
150434
|
}
|
|
150435
150435
|
}
|
|
150436
150436
|
function getModuleSpecifierText(promotedDeclaration) {
|
|
@@ -150583,7 +150583,7 @@ var ts;
|
|
|
150583
150583
|
}
|
|
150584
150584
|
function getImportTypePrefix(moduleSpecifier, quotePreference) {
|
|
150585
150585
|
var quote = ts.getQuoteFromPreference(quotePreference);
|
|
150586
|
-
return "import("
|
|
150586
|
+
return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
|
|
150587
150587
|
}
|
|
150588
150588
|
function needsTypeOnly(_a) {
|
|
150589
150589
|
var addAsTypeOnly = _a.addAsTypeOnly;
|
|
@@ -150679,7 +150679,7 @@ var ts;
|
|
|
150679
150679
|
lastCharWasValid = isValid;
|
|
150680
150680
|
}
|
|
150681
150681
|
// Need `|| "_"` to ensure result isn't empty.
|
|
150682
|
-
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_"
|
|
150682
|
+
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
|
|
150683
150683
|
}
|
|
150684
150684
|
codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
|
|
150685
150685
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -151935,7 +151935,7 @@ var ts;
|
|
|
151935
151935
|
break;
|
|
151936
151936
|
}
|
|
151937
151937
|
default:
|
|
151938
|
-
ts.Debug.fail("Bad fixId: "
|
|
151938
|
+
ts.Debug.fail("Bad fixId: ".concat(context.fixId));
|
|
151939
151939
|
}
|
|
151940
151940
|
});
|
|
151941
151941
|
},
|
|
@@ -152383,7 +152383,7 @@ var ts;
|
|
|
152383
152383
|
if (!isValidCharacter(character)) {
|
|
152384
152384
|
return;
|
|
152385
152385
|
}
|
|
152386
|
-
var replacement = useHtmlEntity ? htmlEntity[character] : "{"
|
|
152386
|
+
var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
|
|
152387
152387
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
152388
152388
|
}
|
|
152389
152389
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -152663,11 +152663,11 @@ var ts;
|
|
|
152663
152663
|
token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
|
|
152664
152664
|
}
|
|
152665
152665
|
if (ts.isIdentifier(token) && canPrefix(token)) {
|
|
152666
|
-
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_"
|
|
152666
|
+
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
|
|
152667
152667
|
if (ts.isParameter(token.parent)) {
|
|
152668
152668
|
ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
|
|
152669
152669
|
if (ts.isIdentifier(tag.name)) {
|
|
152670
|
-
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_"
|
|
152670
|
+
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
|
|
152671
152671
|
}
|
|
152672
152672
|
});
|
|
152673
152673
|
}
|
|
@@ -153009,7 +153009,7 @@ var ts;
|
|
|
153009
153009
|
}); }
|
|
153010
153010
|
});
|
|
153011
153011
|
function doChange(changes, sourceFile, name) {
|
|
153012
|
-
changes.replaceNodeWithText(sourceFile, name, name.text
|
|
153012
|
+
changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
|
|
153013
153013
|
}
|
|
153014
153014
|
function getCallName(sourceFile, start) {
|
|
153015
153015
|
var token = ts.getTokenAtPosition(sourceFile, start);
|
|
@@ -154133,7 +154133,7 @@ var ts;
|
|
|
154133
154133
|
var parameters = [];
|
|
154134
154134
|
var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
|
|
154135
154135
|
var _loop_16 = function (i) {
|
|
154136
|
-
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg"
|
|
154136
|
+
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
|
|
154137
154137
|
symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
|
|
154138
154138
|
if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
|
|
154139
154139
|
symbol.flags |= 16777216 /* Optional */;
|
|
@@ -154236,7 +154236,7 @@ var ts;
|
|
|
154236
154236
|
codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
|
|
154237
154237
|
ts.createTextChange(sourceFile.checkJsDirective
|
|
154238
154238
|
? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
|
|
154239
|
-
: ts.createTextSpan(0, 0), "// @ts-nocheck"
|
|
154239
|
+
: ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
|
|
154240
154240
|
])], ts.Diagnostics.Disable_checking_for_this_file),
|
|
154241
154241
|
];
|
|
154242
154242
|
if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
|
|
@@ -154502,7 +154502,7 @@ var ts;
|
|
|
154502
154502
|
var typeParameters = isJs || typeArguments === undefined
|
|
154503
154503
|
? undefined
|
|
154504
154504
|
: ts.map(typeArguments, function (_, i) {
|
|
154505
|
-
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T"
|
|
154505
|
+
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
|
|
154506
154506
|
});
|
|
154507
154507
|
var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
|
|
154508
154508
|
var type = isJs || contextualType === undefined
|
|
@@ -154537,7 +154537,7 @@ var ts;
|
|
|
154537
154537
|
/*decorators*/ undefined,
|
|
154538
154538
|
/*modifiers*/ undefined,
|
|
154539
154539
|
/*dotDotDotToken*/ undefined,
|
|
154540
|
-
/*name*/ names && names[i] || "arg"
|
|
154540
|
+
/*name*/ names && names[i] || "arg".concat(i),
|
|
154541
154541
|
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
|
|
154542
154542
|
/*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
|
|
154543
154543
|
/*initializer*/ undefined);
|
|
@@ -154788,7 +154788,7 @@ var ts;
|
|
|
154788
154788
|
}
|
|
154789
154789
|
var name = declaration.name.text;
|
|
154790
154790
|
var startWithUnderscore = ts.startsWithUnderscore(name);
|
|
154791
|
-
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_"
|
|
154791
|
+
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
|
|
154792
154792
|
var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
|
|
154793
154793
|
return {
|
|
154794
154794
|
isStatic: ts.hasStaticModifier(declaration),
|
|
@@ -155827,7 +155827,7 @@ var ts;
|
|
|
155827
155827
|
changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
|
|
155828
155828
|
break;
|
|
155829
155829
|
default:
|
|
155830
|
-
ts.Debug.fail("Unexpected exportNode kind "
|
|
155830
|
+
ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
|
|
155831
155831
|
}
|
|
155832
155832
|
}
|
|
155833
155833
|
}
|
|
@@ -155915,7 +155915,7 @@ var ts;
|
|
|
155915
155915
|
break;
|
|
155916
155916
|
}
|
|
155917
155917
|
default:
|
|
155918
|
-
ts.Debug.assertNever(parent, "Unexpected parent kind "
|
|
155918
|
+
ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
|
|
155919
155919
|
}
|
|
155920
155920
|
}
|
|
155921
155921
|
function makeImportSpecifier(propertyName, name) {
|
|
@@ -156498,7 +156498,7 @@ var ts;
|
|
|
156498
156498
|
var newComment = ts.displayPartsToString(parameterDocComment);
|
|
156499
156499
|
if (newComment.length) {
|
|
156500
156500
|
ts.setSyntheticLeadingComments(result, [{
|
|
156501
|
-
text: "*\n"
|
|
156501
|
+
text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
|
|
156502
156502
|
kind: 3 /* MultiLineCommentTrivia */,
|
|
156503
156503
|
pos: -1,
|
|
156504
156504
|
end: -1,
|
|
@@ -156643,7 +156643,7 @@ var ts;
|
|
|
156643
156643
|
usedFunctionNames.set(description, true);
|
|
156644
156644
|
functionActions.push({
|
|
156645
156645
|
description: description,
|
|
156646
|
-
name: "function_scope_"
|
|
156646
|
+
name: "function_scope_".concat(i),
|
|
156647
156647
|
kind: extractFunctionAction.kind
|
|
156648
156648
|
});
|
|
156649
156649
|
}
|
|
@@ -156651,7 +156651,7 @@ var ts;
|
|
|
156651
156651
|
else if (!innermostErrorFunctionAction) {
|
|
156652
156652
|
innermostErrorFunctionAction = {
|
|
156653
156653
|
description: description,
|
|
156654
|
-
name: "function_scope_"
|
|
156654
|
+
name: "function_scope_".concat(i),
|
|
156655
156655
|
notApplicableReason: getStringError(functionExtraction.errors),
|
|
156656
156656
|
kind: extractFunctionAction.kind
|
|
156657
156657
|
};
|
|
@@ -156667,7 +156667,7 @@ var ts;
|
|
|
156667
156667
|
usedConstantNames.set(description_1, true);
|
|
156668
156668
|
constantActions.push({
|
|
156669
156669
|
description: description_1,
|
|
156670
|
-
name: "constant_scope_"
|
|
156670
|
+
name: "constant_scope_".concat(i),
|
|
156671
156671
|
kind: extractConstantAction.kind
|
|
156672
156672
|
});
|
|
156673
156673
|
}
|
|
@@ -156675,7 +156675,7 @@ var ts;
|
|
|
156675
156675
|
else if (!innermostErrorConstantAction) {
|
|
156676
156676
|
innermostErrorConstantAction = {
|
|
156677
156677
|
description: description,
|
|
156678
|
-
name: "constant_scope_"
|
|
156678
|
+
name: "constant_scope_".concat(i),
|
|
156679
156679
|
notApplicableReason: getStringError(constantExtraction.errors),
|
|
156680
156680
|
kind: extractConstantAction.kind
|
|
156681
156681
|
};
|
|
@@ -157259,28 +157259,28 @@ var ts;
|
|
|
157259
157259
|
case 212 /* FunctionExpression */:
|
|
157260
157260
|
case 255 /* FunctionDeclaration */:
|
|
157261
157261
|
return scope.name
|
|
157262
|
-
? "function '"
|
|
157262
|
+
? "function '".concat(scope.name.text, "'")
|
|
157263
157263
|
: ts.ANONYMOUS;
|
|
157264
157264
|
case 213 /* ArrowFunction */:
|
|
157265
157265
|
return "arrow function";
|
|
157266
157266
|
case 168 /* MethodDeclaration */:
|
|
157267
|
-
return "method '"
|
|
157267
|
+
return "method '".concat(scope.name.getText(), "'");
|
|
157268
157268
|
case 171 /* GetAccessor */:
|
|
157269
|
-
return "'get "
|
|
157269
|
+
return "'get ".concat(scope.name.getText(), "'");
|
|
157270
157270
|
case 172 /* SetAccessor */:
|
|
157271
|
-
return "'set "
|
|
157271
|
+
return "'set ".concat(scope.name.getText(), "'");
|
|
157272
157272
|
default:
|
|
157273
|
-
throw ts.Debug.assertNever(scope, "Unexpected scope kind "
|
|
157273
|
+
throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
|
|
157274
157274
|
}
|
|
157275
157275
|
}
|
|
157276
157276
|
function getDescriptionForClassLikeDeclaration(scope) {
|
|
157277
157277
|
return scope.kind === 256 /* ClassDeclaration */
|
|
157278
|
-
? scope.name ? "class '"
|
|
157279
|
-
: scope.name ? "class expression '"
|
|
157278
|
+
? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
|
|
157279
|
+
: scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
|
|
157280
157280
|
}
|
|
157281
157281
|
function getDescriptionForModuleLikeDeclaration(scope) {
|
|
157282
157282
|
return scope.kind === 261 /* ModuleBlock */
|
|
157283
|
-
? "namespace '"
|
|
157283
|
+
? "namespace '".concat(scope.parent.name.getText(), "'")
|
|
157284
157284
|
: scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
|
|
157285
157285
|
}
|
|
157286
157286
|
var SpecialScope;
|
|
@@ -158756,7 +158756,7 @@ var ts;
|
|
|
158756
158756
|
case 253 /* VariableDeclaration */:
|
|
158757
158757
|
return ts.tryCast(node.name, ts.isIdentifier);
|
|
158758
158758
|
default:
|
|
158759
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
158759
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
158760
158760
|
}
|
|
158761
158761
|
}
|
|
158762
158762
|
function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
|
|
@@ -158793,7 +158793,7 @@ var ts;
|
|
|
158793
158793
|
case 253 /* VariableDeclaration */:
|
|
158794
158794
|
return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
|
|
158795
158795
|
default:
|
|
158796
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
158796
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
158797
158797
|
}
|
|
158798
158798
|
}
|
|
158799
158799
|
function moduleSpecifierFromImport(i) {
|
|
@@ -158880,7 +158880,7 @@ var ts;
|
|
|
158880
158880
|
deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
|
|
158881
158881
|
break;
|
|
158882
158882
|
default:
|
|
158883
|
-
ts.Debug.assertNever(importDecl, "Unexpected import decl kind "
|
|
158883
|
+
ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
|
|
158884
158884
|
}
|
|
158885
158885
|
}
|
|
158886
158886
|
function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
|
|
@@ -158980,7 +158980,7 @@ var ts;
|
|
|
158980
158980
|
var name = ts.combinePaths(inDirectory, newModuleName + extension);
|
|
158981
158981
|
if (!host.fileExists(name))
|
|
158982
158982
|
return newModuleName; // TODO: GH#18217
|
|
158983
|
-
newModuleName = moduleName
|
|
158983
|
+
newModuleName = "".concat(moduleName, ".").concat(i);
|
|
158984
158984
|
}
|
|
158985
158985
|
}
|
|
158986
158986
|
function getNewModuleName(movedSymbols) {
|
|
@@ -159087,7 +159087,7 @@ var ts;
|
|
|
159087
159087
|
return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
|
|
159088
159088
|
}
|
|
159089
159089
|
default:
|
|
159090
|
-
return ts.Debug.assertNever(i, "Unexpected import kind "
|
|
159090
|
+
return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
|
|
159091
159091
|
}
|
|
159092
159092
|
}
|
|
159093
159093
|
function filterNamedBindings(namedBindings, keep) {
|
|
@@ -159202,7 +159202,7 @@ var ts;
|
|
|
159202
159202
|
case 200 /* ObjectBindingPattern */:
|
|
159203
159203
|
return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
|
|
159204
159204
|
default:
|
|
159205
|
-
return ts.Debug.assertNever(name, "Unexpected name kind "
|
|
159205
|
+
return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
|
|
159206
159206
|
}
|
|
159207
159207
|
}
|
|
159208
159208
|
function nameOfTopLevelDeclaration(d) {
|
|
@@ -159263,7 +159263,7 @@ var ts;
|
|
|
159263
159263
|
case 237 /* ExpressionStatement */:
|
|
159264
159264
|
return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
159265
159265
|
default:
|
|
159266
|
-
return ts.Debug.assertNever(d, "Unexpected declaration kind "
|
|
159266
|
+
return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
|
|
159267
159267
|
}
|
|
159268
159268
|
}
|
|
159269
159269
|
function addCommonjsExport(decl) {
|
|
@@ -159285,7 +159285,7 @@ var ts;
|
|
|
159285
159285
|
case 237 /* ExpressionStatement */:
|
|
159286
159286
|
return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
159287
159287
|
default:
|
|
159288
|
-
return ts.Debug.assertNever(decl, "Unexpected decl kind "
|
|
159288
|
+
return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
|
|
159289
159289
|
}
|
|
159290
159290
|
}
|
|
159291
159291
|
/** Creates `exports.x = x;` */
|
|
@@ -159923,7 +159923,7 @@ var ts;
|
|
|
159923
159923
|
return [functionDeclaration.name, functionDeclaration.parent.name];
|
|
159924
159924
|
return [functionDeclaration.parent.name];
|
|
159925
159925
|
default:
|
|
159926
|
-
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind "
|
|
159926
|
+
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
|
|
159927
159927
|
}
|
|
159928
159928
|
}
|
|
159929
159929
|
})(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
|
|
@@ -160627,7 +160627,7 @@ var ts;
|
|
|
160627
160627
|
var textPos = ts.scanner.getTextPos();
|
|
160628
160628
|
if (textPos <= end) {
|
|
160629
160629
|
if (token === 79 /* Identifier */) {
|
|
160630
|
-
ts.Debug.fail("Did not expect "
|
|
160630
|
+
ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
|
|
160631
160631
|
}
|
|
160632
160632
|
nodes.push(createNode(token, pos, textPos, parent));
|
|
160633
160633
|
}
|
|
@@ -161557,7 +161557,7 @@ var ts;
|
|
|
161557
161557
|
function getValidSourceFile(fileName) {
|
|
161558
161558
|
var sourceFile = program.getSourceFile(fileName);
|
|
161559
161559
|
if (!sourceFile) {
|
|
161560
|
-
var error = new Error("Could not find source file: '"
|
|
161560
|
+
var error = new Error("Could not find source file: '".concat(fileName, "'."));
|
|
161561
161561
|
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
|
161562
161562
|
// See https://github.com/microsoft/TypeScript/issues/30180.
|
|
161563
161563
|
error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
|
|
@@ -162233,7 +162233,7 @@ var ts;
|
|
|
162233
162233
|
var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
|
|
162234
162234
|
: ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
|
|
162235
162235
|
if (element && isUnclosedTag(element)) {
|
|
162236
|
-
return { newText: "</"
|
|
162236
|
+
return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
|
|
162237
162237
|
}
|
|
162238
162238
|
var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
|
|
162239
162239
|
: ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
|
|
@@ -162339,7 +162339,7 @@ var ts;
|
|
|
162339
162339
|
pos = commentRange.end + 1;
|
|
162340
162340
|
}
|
|
162341
162341
|
else { // If it's not in a comment range, then we need to comment the uncommented portions.
|
|
162342
|
-
var newPos = text.substring(pos, textRange.end).search("("
|
|
162342
|
+
var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
|
|
162343
162343
|
isCommenting = insertComment !== undefined
|
|
162344
162344
|
? insertComment
|
|
162345
162345
|
: isCommenting || !ts.isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); // If isCommenting is already true we don't need to check whitespace again.
|
|
@@ -162734,14 +162734,14 @@ var ts;
|
|
|
162734
162734
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
162735
162735
|
invalidOperationsInPartialSemanticMode.forEach(function (key) {
|
|
162736
162736
|
return ls[key] = function () {
|
|
162737
|
-
throw new Error("LanguageService Operation: "
|
|
162737
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
162738
162738
|
};
|
|
162739
162739
|
});
|
|
162740
162740
|
break;
|
|
162741
162741
|
case ts.LanguageServiceMode.Syntactic:
|
|
162742
162742
|
invalidOperationsInSyntacticMode.forEach(function (key) {
|
|
162743
162743
|
return ls[key] = function () {
|
|
162744
|
-
throw new Error("LanguageService Operation: "
|
|
162744
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
|
|
162745
162745
|
};
|
|
162746
162746
|
});
|
|
162747
162747
|
break;
|
|
@@ -163723,13 +163723,13 @@ var ts;
|
|
|
163723
163723
|
var result = action();
|
|
163724
163724
|
if (logPerformance) {
|
|
163725
163725
|
var end = ts.timestamp();
|
|
163726
|
-
logger.log(actionDescription
|
|
163726
|
+
logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
|
|
163727
163727
|
if (ts.isString(result)) {
|
|
163728
163728
|
var str = result;
|
|
163729
163729
|
if (str.length > 128) {
|
|
163730
163730
|
str = str.substring(0, 128) + "...";
|
|
163731
163731
|
}
|
|
163732
|
-
logger.log(" result.length="
|
|
163732
|
+
logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
|
|
163733
163733
|
}
|
|
163734
163734
|
}
|
|
163735
163735
|
return result;
|
|
@@ -163811,7 +163811,7 @@ var ts;
|
|
|
163811
163811
|
* Update the list of scripts known to the compiler
|
|
163812
163812
|
*/
|
|
163813
163813
|
LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
|
|
163814
|
-
this.forwardJSONCall("refresh("
|
|
163814
|
+
this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
|
|
163815
163815
|
);
|
|
163816
163816
|
};
|
|
163817
163817
|
LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
|
|
@@ -163827,43 +163827,43 @@ var ts;
|
|
|
163827
163827
|
};
|
|
163828
163828
|
LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
|
|
163829
163829
|
var _this = this;
|
|
163830
|
-
return this.forwardJSONCall("getSyntacticClassifications('"
|
|
163830
|
+
return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
163831
163831
|
};
|
|
163832
163832
|
LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
|
|
163833
163833
|
var _this = this;
|
|
163834
|
-
return this.forwardJSONCall("getSemanticClassifications('"
|
|
163834
|
+
return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
163835
163835
|
};
|
|
163836
163836
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
163837
163837
|
var _this = this;
|
|
163838
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('"
|
|
163838
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
163839
163839
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
163840
163840
|
// on the managed side versus a full JSON array.
|
|
163841
163841
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
163842
163842
|
};
|
|
163843
163843
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
163844
163844
|
var _this = this;
|
|
163845
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('"
|
|
163845
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
163846
163846
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
163847
163847
|
// on the managed side versus a full JSON array.
|
|
163848
163848
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
163849
163849
|
};
|
|
163850
163850
|
LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
|
|
163851
163851
|
var _this = this;
|
|
163852
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('"
|
|
163852
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
|
|
163853
163853
|
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
|
|
163854
163854
|
return _this.realizeDiagnostics(diagnostics);
|
|
163855
163855
|
});
|
|
163856
163856
|
};
|
|
163857
163857
|
LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
|
|
163858
163858
|
var _this = this;
|
|
163859
|
-
return this.forwardJSONCall("getSemanticDiagnostics('"
|
|
163859
|
+
return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
|
|
163860
163860
|
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
|
|
163861
163861
|
return _this.realizeDiagnostics(diagnostics);
|
|
163862
163862
|
});
|
|
163863
163863
|
};
|
|
163864
163864
|
LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
|
|
163865
163865
|
var _this = this;
|
|
163866
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('"
|
|
163866
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
|
|
163867
163867
|
};
|
|
163868
163868
|
LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
|
|
163869
163869
|
var _this = this;
|
|
@@ -163879,7 +163879,7 @@ var ts;
|
|
|
163879
163879
|
*/
|
|
163880
163880
|
LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
|
|
163881
163881
|
var _this = this;
|
|
163882
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('"
|
|
163882
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
|
|
163883
163883
|
};
|
|
163884
163884
|
/// NAMEORDOTTEDNAMESPAN
|
|
163885
163885
|
/**
|
|
@@ -163888,7 +163888,7 @@ var ts;
|
|
|
163888
163888
|
*/
|
|
163889
163889
|
LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
|
|
163890
163890
|
var _this = this;
|
|
163891
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('"
|
|
163891
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
|
|
163892
163892
|
};
|
|
163893
163893
|
/**
|
|
163894
163894
|
* STATEMENTSPAN
|
|
@@ -163896,12 +163896,12 @@ var ts;
|
|
|
163896
163896
|
*/
|
|
163897
163897
|
LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
|
|
163898
163898
|
var _this = this;
|
|
163899
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('"
|
|
163899
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
|
|
163900
163900
|
};
|
|
163901
163901
|
/// SIGNATUREHELP
|
|
163902
163902
|
LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
|
|
163903
163903
|
var _this = this;
|
|
163904
|
-
return this.forwardJSONCall("getSignatureHelpItems('"
|
|
163904
|
+
return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
|
|
163905
163905
|
};
|
|
163906
163906
|
/// GOTO DEFINITION
|
|
163907
163907
|
/**
|
|
@@ -163910,7 +163910,7 @@ var ts;
|
|
|
163910
163910
|
*/
|
|
163911
163911
|
LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
|
|
163912
163912
|
var _this = this;
|
|
163913
|
-
return this.forwardJSONCall("getDefinitionAtPosition('"
|
|
163913
|
+
return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
|
|
163914
163914
|
};
|
|
163915
163915
|
/**
|
|
163916
163916
|
* Computes the definition location and file for the symbol
|
|
@@ -163918,7 +163918,7 @@ var ts;
|
|
|
163918
163918
|
*/
|
|
163919
163919
|
LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
|
|
163920
163920
|
var _this = this;
|
|
163921
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('"
|
|
163921
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
|
|
163922
163922
|
};
|
|
163923
163923
|
/// GOTO Type
|
|
163924
163924
|
/**
|
|
@@ -163927,7 +163927,7 @@ var ts;
|
|
|
163927
163927
|
*/
|
|
163928
163928
|
LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
|
|
163929
163929
|
var _this = this;
|
|
163930
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('"
|
|
163930
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
|
|
163931
163931
|
};
|
|
163932
163932
|
/// GOTO Implementation
|
|
163933
163933
|
/**
|
|
@@ -163936,37 +163936,37 @@ var ts;
|
|
|
163936
163936
|
*/
|
|
163937
163937
|
LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
|
|
163938
163938
|
var _this = this;
|
|
163939
|
-
return this.forwardJSONCall("getImplementationAtPosition('"
|
|
163939
|
+
return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
|
|
163940
163940
|
};
|
|
163941
163941
|
LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
|
|
163942
163942
|
var _this = this;
|
|
163943
|
-
return this.forwardJSONCall("getRenameInfo('"
|
|
163943
|
+
return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
|
|
163944
163944
|
};
|
|
163945
163945
|
LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
|
|
163946
163946
|
var _this = this;
|
|
163947
|
-
return this.forwardJSONCall("getSmartSelectionRange('"
|
|
163947
|
+
return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
|
|
163948
163948
|
};
|
|
163949
163949
|
LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
163950
163950
|
var _this = this;
|
|
163951
|
-
return this.forwardJSONCall("findRenameLocations('"
|
|
163951
|
+
return this.forwardJSONCall("findRenameLocations('".concat(fileName, "', ").concat(position, ", ").concat(findInStrings, ", ").concat(findInComments, ", ").concat(providePrefixAndSuffixTextForRename, ")"), function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
|
|
163952
163952
|
};
|
|
163953
163953
|
/// GET BRACE MATCHING
|
|
163954
163954
|
LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
|
|
163955
163955
|
var _this = this;
|
|
163956
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('"
|
|
163956
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
|
|
163957
163957
|
};
|
|
163958
163958
|
LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
|
|
163959
163959
|
var _this = this;
|
|
163960
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('"
|
|
163960
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
|
|
163961
163961
|
};
|
|
163962
163962
|
LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
|
|
163963
163963
|
var _this = this;
|
|
163964
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('"
|
|
163964
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
|
|
163965
163965
|
};
|
|
163966
163966
|
/// GET SMART INDENT
|
|
163967
163967
|
LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
|
|
163968
163968
|
var _this = this;
|
|
163969
|
-
return this.forwardJSONCall("getIndentationAtPosition('"
|
|
163969
|
+
return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
163970
163970
|
var localOptions = JSON.parse(options);
|
|
163971
163971
|
return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
|
163972
163972
|
});
|
|
@@ -163974,23 +163974,23 @@ var ts;
|
|
|
163974
163974
|
/// GET REFERENCES
|
|
163975
163975
|
LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
|
|
163976
163976
|
var _this = this;
|
|
163977
|
-
return this.forwardJSONCall("getReferencesAtPosition('"
|
|
163977
|
+
return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
|
|
163978
163978
|
};
|
|
163979
163979
|
LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
|
|
163980
163980
|
var _this = this;
|
|
163981
|
-
return this.forwardJSONCall("findReferences('"
|
|
163981
|
+
return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
|
|
163982
163982
|
};
|
|
163983
163983
|
LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
|
|
163984
163984
|
var _this = this;
|
|
163985
|
-
return this.forwardJSONCall("getFileReferences('"
|
|
163985
|
+
return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
|
|
163986
163986
|
};
|
|
163987
163987
|
LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
|
|
163988
163988
|
var _this = this;
|
|
163989
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('"
|
|
163989
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
|
|
163990
163990
|
};
|
|
163991
163991
|
LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
|
|
163992
163992
|
var _this = this;
|
|
163993
|
-
return this.forwardJSONCall("getDocumentHighlights('"
|
|
163993
|
+
return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
163994
163994
|
var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
|
163995
163995
|
// workaround for VS document highlighting issue - keep only items from the initial file
|
|
163996
163996
|
var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
|
|
@@ -164005,108 +164005,108 @@ var ts;
|
|
|
164005
164005
|
*/
|
|
164006
164006
|
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences, formattingSettings) {
|
|
164007
164007
|
var _this = this;
|
|
164008
|
-
return this.forwardJSONCall("getCompletionsAtPosition('"
|
|
164008
|
+
return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ", ").concat(formattingSettings, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences, formattingSettings); });
|
|
164009
164009
|
};
|
|
164010
164010
|
/** Get a string based representation of a completion list entry details */
|
|
164011
164011
|
LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
|
|
164012
164012
|
var _this = this;
|
|
164013
|
-
return this.forwardJSONCall("getCompletionEntryDetails('"
|
|
164013
|
+
return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
|
|
164014
164014
|
var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
|
|
164015
164015
|
return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
|
|
164016
164016
|
});
|
|
164017
164017
|
};
|
|
164018
164018
|
LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
|
|
164019
164019
|
var _this = this;
|
|
164020
|
-
return this.forwardJSONCall("getFormattingEditsForRange('"
|
|
164020
|
+
return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
|
|
164021
164021
|
var localOptions = JSON.parse(options);
|
|
164022
164022
|
return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
|
164023
164023
|
});
|
|
164024
164024
|
};
|
|
164025
164025
|
LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
|
|
164026
164026
|
var _this = this;
|
|
164027
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('"
|
|
164027
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
|
|
164028
164028
|
var localOptions = JSON.parse(options);
|
|
164029
164029
|
return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
|
164030
164030
|
});
|
|
164031
164031
|
};
|
|
164032
164032
|
LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
|
|
164033
164033
|
var _this = this;
|
|
164034
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"
|
|
164034
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
|
|
164035
164035
|
var localOptions = JSON.parse(options);
|
|
164036
164036
|
return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
|
164037
164037
|
});
|
|
164038
164038
|
};
|
|
164039
164039
|
LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
|
|
164040
164040
|
var _this = this;
|
|
164041
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('"
|
|
164041
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
|
|
164042
164042
|
};
|
|
164043
164043
|
/// NAVIGATE TO
|
|
164044
164044
|
/** Return a list of symbols that are interesting to navigate to */
|
|
164045
164045
|
LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
|
|
164046
164046
|
var _this = this;
|
|
164047
|
-
return this.forwardJSONCall("getNavigateToItems('"
|
|
164047
|
+
return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
|
|
164048
164048
|
};
|
|
164049
164049
|
LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
|
|
164050
164050
|
var _this = this;
|
|
164051
|
-
return this.forwardJSONCall("getNavigationBarItems('"
|
|
164051
|
+
return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
|
|
164052
164052
|
};
|
|
164053
164053
|
LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
|
|
164054
164054
|
var _this = this;
|
|
164055
|
-
return this.forwardJSONCall("getNavigationTree('"
|
|
164055
|
+
return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
|
|
164056
164056
|
};
|
|
164057
164057
|
LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
|
|
164058
164058
|
var _this = this;
|
|
164059
|
-
return this.forwardJSONCall("getOutliningSpans('"
|
|
164059
|
+
return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
|
|
164060
164060
|
};
|
|
164061
164061
|
LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
|
|
164062
164062
|
var _this = this;
|
|
164063
|
-
return this.forwardJSONCall("getTodoComments('"
|
|
164063
|
+
return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
|
|
164064
164064
|
};
|
|
164065
164065
|
/// CALL HIERARCHY
|
|
164066
164066
|
LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
|
|
164067
164067
|
var _this = this;
|
|
164068
|
-
return this.forwardJSONCall("prepareCallHierarchy('"
|
|
164068
|
+
return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
|
|
164069
164069
|
};
|
|
164070
164070
|
LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
|
|
164071
164071
|
var _this = this;
|
|
164072
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"
|
|
164072
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
|
|
164073
164073
|
};
|
|
164074
164074
|
LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
|
|
164075
164075
|
var _this = this;
|
|
164076
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"
|
|
164076
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
|
|
164077
164077
|
};
|
|
164078
164078
|
LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
|
|
164079
164079
|
var _this = this;
|
|
164080
|
-
return this.forwardJSONCall("provideInlayHints('"
|
|
164080
|
+
return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
|
|
164081
164081
|
};
|
|
164082
164082
|
/// Emit
|
|
164083
164083
|
LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
|
|
164084
164084
|
var _this = this;
|
|
164085
|
-
return this.forwardJSONCall("getEmitOutput('"
|
|
164085
|
+
return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
|
|
164086
164086
|
var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
164087
164087
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
164088
164088
|
});
|
|
164089
164089
|
};
|
|
164090
164090
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
164091
164091
|
var _this = this;
|
|
164092
|
-
return forwardCall(this.logger, "getEmitOutput('"
|
|
164092
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
164093
164093
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
164094
164094
|
};
|
|
164095
164095
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|
|
164096
164096
|
var _this = this;
|
|
164097
|
-
return this.forwardJSONCall("toggleLineComment('"
|
|
164097
|
+
return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
|
|
164098
164098
|
};
|
|
164099
164099
|
LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
|
|
164100
164100
|
var _this = this;
|
|
164101
|
-
return this.forwardJSONCall("toggleMultilineComment('"
|
|
164101
|
+
return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
|
|
164102
164102
|
};
|
|
164103
164103
|
LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
|
|
164104
164104
|
var _this = this;
|
|
164105
|
-
return this.forwardJSONCall("commentSelection('"
|
|
164105
|
+
return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
|
|
164106
164106
|
};
|
|
164107
164107
|
LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
|
|
164108
164108
|
var _this = this;
|
|
164109
|
-
return this.forwardJSONCall("uncommentSelection('"
|
|
164109
|
+
return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
|
|
164110
164110
|
};
|
|
164111
164111
|
return LanguageServiceShimObject;
|
|
164112
164112
|
}(ShimBase));
|
|
@@ -164156,7 +164156,7 @@ var ts;
|
|
|
164156
164156
|
};
|
|
164157
164157
|
CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
|
|
164158
164158
|
var _this = this;
|
|
164159
|
-
return this.forwardJSONCall("resolveModuleName('"
|
|
164159
|
+
return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
|
|
164160
164160
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164161
164161
|
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
164162
164162
|
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
|
|
@@ -164171,7 +164171,7 @@ var ts;
|
|
|
164171
164171
|
};
|
|
164172
164172
|
CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
|
|
164173
164173
|
var _this = this;
|
|
164174
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective("
|
|
164174
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
|
|
164175
164175
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164176
164176
|
var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
164177
164177
|
return {
|
|
@@ -164183,7 +164183,7 @@ var ts;
|
|
|
164183
164183
|
};
|
|
164184
164184
|
CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
|
|
164185
164185
|
var _this = this;
|
|
164186
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('"
|
|
164186
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
|
|
164187
164187
|
// for now treat files as JavaScript
|
|
164188
164188
|
var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
|
164189
164189
|
return {
|
|
@@ -164198,7 +164198,7 @@ var ts;
|
|
|
164198
164198
|
};
|
|
164199
164199
|
CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
|
|
164200
164200
|
var _this = this;
|
|
164201
|
-
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"
|
|
164201
|
+
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
|
|
164202
164202
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164203
164203
|
return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
|
|
164204
164204
|
});
|
|
@@ -164220,7 +164220,7 @@ var ts;
|
|
|
164220
164220
|
};
|
|
164221
164221
|
CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
|
|
164222
164222
|
var _this = this;
|
|
164223
|
-
return this.forwardJSONCall("getTSConfigFileInfo('"
|
|
164223
|
+
return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
|
|
164224
164224
|
var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
|
|
164225
164225
|
var normalizedFileName = ts.normalizeSlashes(fileName);
|
|
164226
164226
|
var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
|
|
@@ -164420,7 +164420,7 @@ var ts;
|
|
|
164420
164420
|
function nowString() {
|
|
164421
164421
|
// E.g. "12:34:56.789"
|
|
164422
164422
|
var d = new Date();
|
|
164423
|
-
return ts.padLeft(d.getHours().toString(), 2, "0")
|
|
164423
|
+
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"));
|
|
164424
164424
|
}
|
|
164425
164425
|
server.nowString = nowString;
|
|
164426
164426
|
})(server = ts.server || (ts.server = {}));
|
|
@@ -164431,7 +164431,7 @@ var ts;
|
|
|
164431
164431
|
var JsTyping;
|
|
164432
164432
|
(function (JsTyping) {
|
|
164433
164433
|
function isTypingUpToDate(cachedTyping, availableTypingVersions) {
|
|
164434
|
-
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts"
|
|
164434
|
+
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
|
|
164435
164435
|
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
|
164436
164436
|
}
|
|
164437
164437
|
JsTyping.isTypingUpToDate = isTypingUpToDate;
|
|
@@ -164484,7 +164484,7 @@ var ts;
|
|
|
164484
164484
|
"worker_threads",
|
|
164485
164485
|
"zlib"
|
|
164486
164486
|
];
|
|
164487
|
-
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:"
|
|
164487
|
+
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
|
|
164488
164488
|
JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
|
|
164489
164489
|
JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
|
|
164490
164490
|
function nonRelativeModuleNameForTypingCache(moduleName) {
|
|
@@ -164557,7 +164557,7 @@ var ts;
|
|
|
164557
164557
|
var excludeTypingName = exclude_1[_i];
|
|
164558
164558
|
var didDelete = inferredTypings.delete(excludeTypingName);
|
|
164559
164559
|
if (didDelete && log)
|
|
164560
|
-
log("Typing for "
|
|
164560
|
+
log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
|
|
164561
164561
|
}
|
|
164562
164562
|
var newTypingNames = [];
|
|
164563
164563
|
var cachedTypingPaths = [];
|
|
@@ -164571,7 +164571,7 @@ var ts;
|
|
|
164571
164571
|
});
|
|
164572
164572
|
var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
|
|
164573
164573
|
if (log)
|
|
164574
|
-
log("Result: "
|
|
164574
|
+
log("Result: ".concat(JSON.stringify(result)));
|
|
164575
164575
|
return result;
|
|
164576
164576
|
function addInferredTyping(typingName) {
|
|
164577
164577
|
if (!inferredTypings.has(typingName)) {
|
|
@@ -164580,7 +164580,7 @@ var ts;
|
|
|
164580
164580
|
}
|
|
164581
164581
|
function addInferredTypings(typingNames, message) {
|
|
164582
164582
|
if (log)
|
|
164583
|
-
log(message
|
|
164583
|
+
log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
|
|
164584
164584
|
ts.forEach(typingNames, addInferredTyping);
|
|
164585
164585
|
}
|
|
164586
164586
|
/**
|
|
@@ -164602,7 +164602,7 @@ var ts;
|
|
|
164602
164602
|
filesToWatch.push(manifestPath);
|
|
164603
164603
|
manifest = ts.readConfigFile(manifestPath, function (path) { return host.readFile(path); }).config;
|
|
164604
164604
|
manifestTypingNames = ts.flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], ts.getOwnKeys);
|
|
164605
|
-
addInferredTypings(manifestTypingNames, "Typing names in '"
|
|
164605
|
+
addInferredTypings(manifestTypingNames, "Typing names in '".concat(manifestPath, "' dependencies"));
|
|
164606
164606
|
}
|
|
164607
164607
|
// Now we scan the directories for typing information in
|
|
164608
164608
|
// already-installed dependencies (if present). Note that this
|
|
@@ -164646,7 +164646,7 @@ var ts;
|
|
|
164646
164646
|
!isScoped && pathComponents[pathComponents.length - 3].toLowerCase() === modulesDirName; // `node_modules/foo`
|
|
164647
164647
|
});
|
|
164648
164648
|
if (log)
|
|
164649
|
-
log("Searching for typing names in "
|
|
164649
|
+
log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(dependencyManifestNames)));
|
|
164650
164650
|
// Once we have the names of things to look up, we iterate over
|
|
164651
164651
|
// and either collect their included typings, or add them to the
|
|
164652
164652
|
// list of typings we need to look up separately.
|
|
@@ -164665,12 +164665,12 @@ var ts;
|
|
|
164665
164665
|
var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
|
|
164666
164666
|
if (host.fileExists(absolutePath)) {
|
|
164667
164667
|
if (log)
|
|
164668
|
-
log(" Package '"
|
|
164668
|
+
log(" Package '".concat(manifest_1.name, "' provides its own types."));
|
|
164669
164669
|
inferredTypings.set(manifest_1.name, absolutePath);
|
|
164670
164670
|
}
|
|
164671
164671
|
else {
|
|
164672
164672
|
if (log)
|
|
164673
|
-
log(" Package '"
|
|
164673
|
+
log(" Package '".concat(manifest_1.name, "' provides its own types but they are missing."));
|
|
164674
164674
|
}
|
|
164675
164675
|
}
|
|
164676
164676
|
else {
|
|
@@ -164766,15 +164766,15 @@ var ts;
|
|
|
164766
164766
|
var kind = isScopeName ? "Scope" : "Package";
|
|
164767
164767
|
switch (result) {
|
|
164768
164768
|
case 1 /* EmptyName */:
|
|
164769
|
-
return "'"
|
|
164769
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
|
|
164770
164770
|
case 2 /* NameTooLong */:
|
|
164771
|
-
return "'"
|
|
164771
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
|
|
164772
164772
|
case 3 /* NameStartsWithDot */:
|
|
164773
|
-
return "'"
|
|
164773
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
|
|
164774
164774
|
case 4 /* NameStartsWithUnderscore */:
|
|
164775
|
-
return "'"
|
|
164775
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
|
|
164776
164776
|
case 5 /* NameContainsNonURISafeCharacters */:
|
|
164777
|
-
return "'"
|
|
164777
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
|
|
164778
164778
|
case 0 /* Ok */:
|
|
164779
164779
|
return ts.Debug.fail(); // Shouldn't have called this.
|
|
164780
164780
|
default:
|
|
@@ -164827,7 +164827,7 @@ var ts;
|
|
|
164827
164827
|
}
|
|
164828
164828
|
Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
|
|
164829
164829
|
function ThrowProjectDoesNotContainDocument(fileName, project) {
|
|
164830
|
-
throw new Error("Project '"
|
|
164830
|
+
throw new Error("Project '".concat(project.getProjectName(), "' does not contain document '").concat(fileName, "'"));
|
|
164831
164831
|
}
|
|
164832
164832
|
Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
|
|
164833
164833
|
})(Errors = server.Errors || (server.Errors = {}));
|
|
@@ -164868,12 +164868,12 @@ var ts;
|
|
|
164868
164868
|
}
|
|
164869
164869
|
server.isInferredProjectName = isInferredProjectName;
|
|
164870
164870
|
function makeInferredProjectName(counter) {
|
|
164871
|
-
return "/dev/null/inferredProject"
|
|
164871
|
+
return "/dev/null/inferredProject".concat(counter, "*");
|
|
164872
164872
|
}
|
|
164873
164873
|
server.makeInferredProjectName = makeInferredProjectName;
|
|
164874
164874
|
/*@internal*/
|
|
164875
164875
|
function makeAutoImportProviderProjectName(counter) {
|
|
164876
|
-
return "/dev/null/autoImportProviderProject"
|
|
164876
|
+
return "/dev/null/autoImportProviderProject".concat(counter, "*");
|
|
164877
164877
|
}
|
|
164878
164878
|
server.makeAutoImportProviderProjectName = makeAutoImportProviderProjectName;
|
|
164879
164879
|
function createSortedArray() {
|
|
@@ -164908,7 +164908,7 @@ var ts;
|
|
|
164908
164908
|
// schedule new operation, pass arguments
|
|
164909
164909
|
this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
|
|
164910
164910
|
if (this.logger) {
|
|
164911
|
-
this.logger.info("Scheduled: "
|
|
164911
|
+
this.logger.info("Scheduled: ".concat(operationId).concat(pendingTimeout ? ", Cancelled earlier one" : ""));
|
|
164912
164912
|
}
|
|
164913
164913
|
};
|
|
164914
164914
|
ThrottledOperations.prototype.cancel = function (operationId) {
|
|
@@ -164922,7 +164922,7 @@ var ts;
|
|
|
164922
164922
|
ts.perfLogger.logStartScheduledOperation(operationId);
|
|
164923
164923
|
self.pendingTimeouts.delete(operationId);
|
|
164924
164924
|
if (self.logger) {
|
|
164925
|
-
self.logger.info("Running: "
|
|
164925
|
+
self.logger.info("Running: ".concat(operationId));
|
|
164926
164926
|
}
|
|
164927
164927
|
cb();
|
|
164928
164928
|
ts.perfLogger.logStopScheduledOperation();
|
|
@@ -164951,7 +164951,7 @@ var ts;
|
|
|
164951
164951
|
self.host.gc(); // TODO: GH#18217
|
|
164952
164952
|
if (log) {
|
|
164953
164953
|
var after = self.host.getMemoryUsage(); // TODO: GH#18217
|
|
164954
|
-
self.logger.perftrc("GC::before "
|
|
164954
|
+
self.logger.perftrc("GC::before ".concat(before, ", after ").concat(after));
|
|
164955
164955
|
}
|
|
164956
164956
|
ts.perfLogger.logStopScheduledOperation();
|
|
164957
164957
|
};
|
|
@@ -165304,8 +165304,8 @@ var ts;
|
|
|
165304
165304
|
}
|
|
165305
165305
|
TextStorage.prototype.getVersion = function () {
|
|
165306
165306
|
return this.svc
|
|
165307
|
-
? "SVC-"
|
|
165308
|
-
: "Text-"
|
|
165307
|
+
? "SVC-".concat(this.version.svc, "-").concat(this.svc.getSnapshotVersion())
|
|
165308
|
+
: "Text-".concat(this.version.text);
|
|
165309
165309
|
};
|
|
165310
165310
|
TextStorage.prototype.hasScriptVersionCache_TestOnly = function () {
|
|
165311
165311
|
return this.svc !== undefined;
|
|
@@ -165448,7 +165448,7 @@ var ts;
|
|
|
165448
165448
|
if (fileSize > server.maxFileSize) {
|
|
165449
165449
|
ts.Debug.assert(!!this.info.containingProjects.length);
|
|
165450
165450
|
var service = this.info.containingProjects[0].projectService;
|
|
165451
|
-
service.logger.info("Skipped loading contents of large file "
|
|
165451
|
+
service.logger.info("Skipped loading contents of large file ".concat(fileName, " for info ").concat(this.info.fileName, ": fileSize: ").concat(fileSize));
|
|
165452
165452
|
this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize);
|
|
165453
165453
|
return { text: "", fileSize: fileSize };
|
|
165454
165454
|
}
|
|
@@ -165824,14 +165824,14 @@ var ts;
|
|
|
165824
165824
|
return project;
|
|
165825
165825
|
}
|
|
165826
165826
|
function failIfInvalidPosition(position) {
|
|
165827
|
-
ts.Debug.assert(typeof position === "number", "Expected position "
|
|
165827
|
+
ts.Debug.assert(typeof position === "number", "Expected position ".concat(position, " to be a number."));
|
|
165828
165828
|
ts.Debug.assert(position >= 0, "Expected position to be non-negative.");
|
|
165829
165829
|
}
|
|
165830
165830
|
function failIfInvalidLocation(location) {
|
|
165831
|
-
ts.Debug.assert(typeof location.line === "number", "Expected line "
|
|
165832
|
-
ts.Debug.assert(typeof location.offset === "number", "Expected offset "
|
|
165833
|
-
ts.Debug.assert(location.line > 0, "Expected line to be non-"
|
|
165834
|
-
ts.Debug.assert(location.offset > 0, "Expected offset to be non-"
|
|
165831
|
+
ts.Debug.assert(typeof location.line === "number", "Expected line ".concat(location.line, " to be a number."));
|
|
165832
|
+
ts.Debug.assert(typeof location.offset === "number", "Expected offset ".concat(location.offset, " to be a number."));
|
|
165833
|
+
ts.Debug.assert(location.line > 0, "Expected line to be non-".concat(location.line === 0 ? "zero" : "negative"));
|
|
165834
|
+
ts.Debug.assert(location.offset > 0, "Expected offset to be non-".concat(location.offset === 0 ? "zero" : "negative"));
|
|
165835
165835
|
}
|
|
165836
165836
|
})(server = ts.server || (ts.server = {}));
|
|
165837
165837
|
})(ts || (ts = {}));
|
|
@@ -166143,11 +166143,11 @@ var ts;
|
|
|
166143
166143
|
};
|
|
166144
166144
|
Project.resolveModule = function (moduleName, initialDir, host, log, logErrors) {
|
|
166145
166145
|
var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
|
|
166146
|
-
log("Loading "
|
|
166146
|
+
log("Loading ".concat(moduleName, " from ").concat(initialDir, " (resolved to ").concat(resolvedPath, ")"));
|
|
166147
166147
|
var result = host.require(resolvedPath, moduleName); // TODO: GH#18217
|
|
166148
166148
|
if (result.error) {
|
|
166149
166149
|
var err = result.error.stack || result.error.message || JSON.stringify(result.error);
|
|
166150
|
-
(logErrors || log)("Failed to load module '"
|
|
166150
|
+
(logErrors || log)("Failed to load module '".concat(moduleName, "' from ").concat(resolvedPath, ": ").concat(err));
|
|
166151
166151
|
return undefined;
|
|
166152
166152
|
}
|
|
166153
166153
|
return result.module;
|
|
@@ -166298,12 +166298,12 @@ var ts;
|
|
|
166298
166298
|
};
|
|
166299
166299
|
/*@internal*/
|
|
166300
166300
|
Project.prototype.clearInvalidateResolutionOfFailedLookupTimer = function () {
|
|
166301
|
-
return this.projectService.throttledOperations.cancel(this.getProjectName()
|
|
166301
|
+
return this.projectService.throttledOperations.cancel("".concat(this.getProjectName(), "FailedLookupInvalidation"));
|
|
166302
166302
|
};
|
|
166303
166303
|
/*@internal*/
|
|
166304
166304
|
Project.prototype.scheduleInvalidateResolutionsOfFailedLookupLocations = function () {
|
|
166305
166305
|
var _this = this;
|
|
166306
|
-
this.projectService.throttledOperations.schedule(this.getProjectName()
|
|
166306
|
+
this.projectService.throttledOperations.schedule("".concat(this.getProjectName(), "FailedLookupInvalidation"), /*delay*/ 1000, function () {
|
|
166307
166307
|
if (_this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {
|
|
166308
166308
|
_this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this);
|
|
166309
166309
|
}
|
|
@@ -166481,7 +166481,7 @@ var ts;
|
|
|
166481
166481
|
return plugin.module.getExternalFiles(_this);
|
|
166482
166482
|
}
|
|
166483
166483
|
catch (e) {
|
|
166484
|
-
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: "
|
|
166484
|
+
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: ".concat(e));
|
|
166485
166485
|
if (e.stack) {
|
|
166486
166486
|
_this.projectService.logger.info(e.stack);
|
|
166487
166487
|
}
|
|
@@ -166584,7 +166584,7 @@ var ts;
|
|
|
166584
166584
|
}
|
|
166585
166585
|
return ts.map(this.program.getSourceFiles(), function (sourceFile) {
|
|
166586
166586
|
var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
166587
|
-
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '"
|
|
166587
|
+
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '".concat(sourceFile.fileName, "' Path: '").concat(sourceFile.path, "' / '").concat(sourceFile.resolvedPath, "' is missing."); });
|
|
166588
166588
|
return scriptInfo;
|
|
166589
166589
|
});
|
|
166590
166590
|
};
|
|
@@ -166827,7 +166827,7 @@ var ts;
|
|
|
166827
166827
|
var _this = this;
|
|
166828
166828
|
var oldProgram = this.program;
|
|
166829
166829
|
ts.Debug.assert(!this.isClosed(), "Called update graph worker of closed project");
|
|
166830
|
-
this.writeLog("Starting updateGraphWorker: Project: "
|
|
166830
|
+
this.writeLog("Starting updateGraphWorker: Project: ".concat(this.getProjectName()));
|
|
166831
166831
|
var start = ts.timestamp();
|
|
166832
166832
|
this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution();
|
|
166833
166833
|
this.resolutionCache.startCachingPerDirectoryResolution();
|
|
@@ -166929,7 +166929,7 @@ var ts;
|
|
|
166929
166929
|
}, function (removed) { return _this.detachScriptInfoFromProject(removed); });
|
|
166930
166930
|
var elapsed = ts.timestamp() - start;
|
|
166931
166931
|
this.sendPerformanceEvent("UpdateGraph", elapsed);
|
|
166932
|
-
this.writeLog("Finishing updateGraphWorker: Project: "
|
|
166932
|
+
this.writeLog("Finishing updateGraphWorker: Project: ".concat(this.getProjectName(), " Version: ").concat(this.getProjectVersion(), " structureChanged: ").concat(hasNewProgram).concat(this.program ? " structureIsReused:: ".concat(ts.StructureIsReused[this.program.structureIsReused]) : "", " Elapsed: ").concat(elapsed, "ms"));
|
|
166933
166933
|
if (this.hasAddedorRemovedFiles) {
|
|
166934
166934
|
this.print(/*writeProjectFileNames*/ true);
|
|
166935
166935
|
}
|
|
@@ -166989,7 +166989,7 @@ var ts;
|
|
|
166989
166989
|
var path = this.toPath(sourceFile);
|
|
166990
166990
|
if (this.generatedFilesMap) {
|
|
166991
166991
|
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
|
166992
|
-
ts.Debug.fail(this.projectName
|
|
166992
|
+
ts.Debug.fail("".concat(this.projectName, " Expected to not have --out watcher for generated file with options: ").concat(JSON.stringify(this.compilerOptions)));
|
|
166993
166993
|
return;
|
|
166994
166994
|
}
|
|
166995
166995
|
if (this.generatedFilesMap.has(path))
|
|
@@ -167041,20 +167041,20 @@ var ts;
|
|
|
167041
167041
|
if (!this.program)
|
|
167042
167042
|
return "\tFiles (0) NoProgram\n";
|
|
167043
167043
|
var sourceFiles = this.program.getSourceFiles();
|
|
167044
|
-
var strBuilder = "\tFiles ("
|
|
167044
|
+
var strBuilder = "\tFiles (".concat(sourceFiles.length, ")\n");
|
|
167045
167045
|
if (writeProjectFileNames) {
|
|
167046
167046
|
for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
|
|
167047
167047
|
var file = sourceFiles_1[_i];
|
|
167048
|
-
strBuilder += "\t"
|
|
167048
|
+
strBuilder += "\t".concat(file.fileName, "\n");
|
|
167049
167049
|
}
|
|
167050
167050
|
strBuilder += "\n\n";
|
|
167051
|
-
ts.explainFiles(this.program, function (s) { return strBuilder += "\t"
|
|
167051
|
+
ts.explainFiles(this.program, function (s) { return strBuilder += "\t".concat(s, "\n"); });
|
|
167052
167052
|
}
|
|
167053
167053
|
return strBuilder;
|
|
167054
167054
|
};
|
|
167055
167055
|
/*@internal*/
|
|
167056
167056
|
Project.prototype.print = function (writeProjectFileNames) {
|
|
167057
|
-
this.writeLog("Project '"
|
|
167057
|
+
this.writeLog("Project '".concat(this.projectName, "' (").concat(ProjectKind[this.projectKind], ")"));
|
|
167058
167058
|
this.writeLog(this.filesToString(writeProjectFileNames && this.projectService.logger.hasLevel(server.LogLevel.verbose)));
|
|
167059
167059
|
this.writeLog("-----------------------------------------------");
|
|
167060
167060
|
if (this.autoImportProviderHost) {
|
|
@@ -167216,7 +167216,7 @@ var ts;
|
|
|
167216
167216
|
if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
|
|
167217
167217
|
return "continue";
|
|
167218
167218
|
// Provide global: true so plugins can detect why they can't find their config
|
|
167219
|
-
this_1.projectService.logger.info("Loading global plugin "
|
|
167219
|
+
this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
|
|
167220
167220
|
this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
|
|
167221
167221
|
};
|
|
167222
167222
|
var this_1 = this;
|
|
@@ -167229,9 +167229,9 @@ var ts;
|
|
|
167229
167229
|
};
|
|
167230
167230
|
Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) {
|
|
167231
167231
|
var _this = this;
|
|
167232
|
-
this.projectService.logger.info("Enabling plugin "
|
|
167232
|
+
this.projectService.logger.info("Enabling plugin ".concat(pluginConfigEntry.name, " from candidate paths: ").concat(searchPaths.join(",")));
|
|
167233
167233
|
if (!pluginConfigEntry.name || ts.parsePackageName(pluginConfigEntry.name).rest) {
|
|
167234
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
167234
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(pluginConfigEntry.name || JSON.stringify(pluginConfigEntry), " because only package name is allowed plugin name"));
|
|
167235
167235
|
return;
|
|
167236
167236
|
}
|
|
167237
167237
|
var log = function (message) { return _this.projectService.logger.info(message); };
|
|
@@ -167254,13 +167254,13 @@ var ts;
|
|
|
167254
167254
|
}
|
|
167255
167255
|
else {
|
|
167256
167256
|
ts.forEach(errorLogs, log);
|
|
167257
|
-
this.projectService.logger.info("Couldn't find "
|
|
167257
|
+
this.projectService.logger.info("Couldn't find ".concat(pluginConfigEntry.name));
|
|
167258
167258
|
}
|
|
167259
167259
|
};
|
|
167260
167260
|
Project.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
|
|
167261
167261
|
try {
|
|
167262
167262
|
if (typeof pluginModuleFactory !== "function") {
|
|
167263
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
167263
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(configEntry.name, " because it did not expose a proper factory function"));
|
|
167264
167264
|
return;
|
|
167265
167265
|
}
|
|
167266
167266
|
var info = {
|
|
@@ -167277,7 +167277,7 @@ var ts;
|
|
|
167277
167277
|
var k = _a[_i];
|
|
167278
167278
|
// eslint-disable-next-line no-in-operator
|
|
167279
167279
|
if (!(k in newLS)) {
|
|
167280
|
-
this.projectService.logger.info("Plugin activation warning: Missing proxied method "
|
|
167280
|
+
this.projectService.logger.info("Plugin activation warning: Missing proxied method ".concat(k, " in created LS. Patching."));
|
|
167281
167281
|
newLS[k] = this.languageService[k];
|
|
167282
167282
|
}
|
|
167283
167283
|
}
|
|
@@ -167286,7 +167286,7 @@ var ts;
|
|
|
167286
167286
|
this.plugins.push({ name: configEntry.name, module: pluginModule });
|
|
167287
167287
|
}
|
|
167288
167288
|
catch (e) {
|
|
167289
|
-
this.projectService.logger.info("Plugin activation failed: "
|
|
167289
|
+
this.projectService.logger.info("Plugin activation failed: ".concat(e));
|
|
167290
167290
|
}
|
|
167291
167291
|
};
|
|
167292
167292
|
/*@internal*/
|
|
@@ -167551,7 +167551,7 @@ var ts;
|
|
|
167551
167551
|
var name = _d[_c];
|
|
167552
167552
|
// Avoid creating a large project that would significantly slow down time to editor interactivity
|
|
167553
167553
|
if (dependencySelection === 2 /* Auto */ && dependenciesAdded > this.maxDependencies) {
|
|
167554
|
-
hostProject.log("AutoImportProviderProject: attempted to add more than "
|
|
167554
|
+
hostProject.log("AutoImportProviderProject: attempted to add more than ".concat(this.maxDependencies, " dependencies. Aborting."));
|
|
167555
167555
|
return ts.emptyArray;
|
|
167556
167556
|
}
|
|
167557
167557
|
// 1. Try to load from the implementation package. For many dependencies, the
|
|
@@ -167568,7 +167568,7 @@ var ts;
|
|
|
167568
167568
|
}
|
|
167569
167569
|
}
|
|
167570
167570
|
// 2. Try to load from the @types package.
|
|
167571
|
-
var typesPackageJson = ts.resolvePackageNameToPackageJson("@types/"
|
|
167571
|
+
var typesPackageJson = ts.resolvePackageNameToPackageJson("@types/".concat(name), hostProject.currentDirectory, compilerOptions, moduleResolutionHost, program.getModuleResolutionCache());
|
|
167572
167572
|
if (typesPackageJson) {
|
|
167573
167573
|
var entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache);
|
|
167574
167574
|
rootNames = ts.concatenate(rootNames, entrypoints);
|
|
@@ -167586,7 +167586,7 @@ var ts;
|
|
|
167586
167586
|
}
|
|
167587
167587
|
}
|
|
167588
167588
|
if (rootNames === null || rootNames === void 0 ? void 0 : rootNames.length) {
|
|
167589
|
-
hostProject.log("AutoImportProviderProject: found "
|
|
167589
|
+
hostProject.log("AutoImportProviderProject: found ".concat(rootNames.length, " root files in ").concat(dependenciesAdded, " dependencies in ").concat(ts.timestamp() - start, " ms"));
|
|
167590
167590
|
}
|
|
167591
167591
|
return rootNames || ts.emptyArray;
|
|
167592
167592
|
function addDependency(dependency) {
|
|
@@ -167843,7 +167843,7 @@ var ts;
|
|
|
167843
167843
|
var searchPaths = __spreadArray([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations, true);
|
|
167844
167844
|
if (this.projectService.allowLocalPluginLoads) {
|
|
167845
167845
|
var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
|
|
167846
|
-
this.projectService.logger.info("Local plugin loading enabled; adding "
|
|
167846
|
+
this.projectService.logger.info("Local plugin loading enabled; adding ".concat(local, " to search paths"));
|
|
167847
167847
|
searchPaths.unshift(local);
|
|
167848
167848
|
}
|
|
167849
167849
|
// Enable tsconfig-specified plugins
|
|
@@ -168269,7 +168269,7 @@ var ts;
|
|
|
168269
168269
|
return forEachAnyProjectReferenceKind(project, function (resolvedRef) { return callbackRefProject(project, cb, resolvedRef.sourceFile.path); }, function (projectRef) { return callbackRefProject(project, cb, project.toPath(ts.resolveProjectReferencePath(projectRef))); }, function (potentialProjectRef) { return callbackRefProject(project, cb, potentialProjectRef); });
|
|
168270
168270
|
}
|
|
168271
168271
|
function getDetailWatchInfo(watchType, project) {
|
|
168272
|
-
return (ts.isString(project) ? "Config: "
|
|
168272
|
+
return "".concat(ts.isString(project) ? "Config: ".concat(project, " ") : project ? "Project: ".concat(project.getProjectName(), " ") : "", "WatchType: ").concat(watchType);
|
|
168273
168273
|
}
|
|
168274
168274
|
function isScriptInfoWatchedFromNodeModules(info) {
|
|
168275
168275
|
return !info.isScriptOpen() && info.mTime !== undefined;
|
|
@@ -168474,7 +168474,7 @@ var ts;
|
|
|
168474
168474
|
try {
|
|
168475
168475
|
var fileContent = this.host.readFile(this.typesMapLocation); // TODO: GH#18217
|
|
168476
168476
|
if (fileContent === undefined) {
|
|
168477
|
-
this.logger.info("Provided types map file \""
|
|
168477
|
+
this.logger.info("Provided types map file \"".concat(this.typesMapLocation, "\" doesn't exist"));
|
|
168478
168478
|
return;
|
|
168479
168479
|
}
|
|
168480
168480
|
var raw = JSON.parse(fileContent);
|
|
@@ -168492,7 +168492,7 @@ var ts;
|
|
|
168492
168492
|
}
|
|
168493
168493
|
}
|
|
168494
168494
|
catch (e) {
|
|
168495
|
-
this.logger.info("Error loading types map: "
|
|
168495
|
+
this.logger.info("Error loading types map: ".concat(e));
|
|
168496
168496
|
this.safelist = defaultTypeSafeList;
|
|
168497
168497
|
this.legacySafelist.clear();
|
|
168498
168498
|
}
|
|
@@ -168814,7 +168814,7 @@ var ts;
|
|
|
168814
168814
|
var fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
168815
168815
|
if (ts.getBaseFileName(fileOrDirectoryPath) === "package.json" && !ts.isInsideNodeModules(fileOrDirectoryPath) &&
|
|
168816
168816
|
(fsResult && fsResult.fileExists || !fsResult && _this.host.fileExists(fileOrDirectoryPath))) {
|
|
168817
|
-
_this.logger.info("Config: "
|
|
168817
|
+
_this.logger.info("Config: ".concat(configFileName, " Detected new package.json: ").concat(fileOrDirectory));
|
|
168818
168818
|
_this.onAddPackageJson(fileOrDirectoryPath);
|
|
168819
168819
|
}
|
|
168820
168820
|
var configuredProjectForConfig = _this.findConfiguredProjectByProjectName(configFileName);
|
|
@@ -168937,13 +168937,13 @@ var ts;
|
|
|
168937
168937
|
project.print(/*writeProjectFileNames*/ true);
|
|
168938
168938
|
project.close();
|
|
168939
168939
|
if (ts.Debug.shouldAssert(1 /* Normal */)) {
|
|
168940
|
-
this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return project.projectName
|
|
168940
|
+
this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return "".concat(project.projectName, ": ScriptInfos still attached: ").concat(JSON.stringify(ts.arrayFrom(ts.mapDefinedIterator(_this.filenameToScriptInfo.values(), function (info) { return info.isAttached(project) ?
|
|
168941
168941
|
{
|
|
168942
168942
|
fileName: info.fileName,
|
|
168943
168943
|
projects: info.containingProjects.map(function (p) { return p.projectName; }),
|
|
168944
168944
|
hasMixedContent: info.hasMixedContent
|
|
168945
168945
|
} : undefined; })),
|
|
168946
|
-
/*replacer*/ undefined, " "); }); });
|
|
168946
|
+
/*replacer*/ undefined, " ")); }); });
|
|
168947
168947
|
}
|
|
168948
168948
|
// Remove the project from pending project updates
|
|
168949
168949
|
this.pendingProjectUpdates.delete(project.getProjectName());
|
|
@@ -169344,15 +169344,15 @@ var ts;
|
|
|
169344
169344
|
if (result !== undefined)
|
|
169345
169345
|
return result || undefined;
|
|
169346
169346
|
}
|
|
169347
|
-
this.logger.info("Search path: "
|
|
169347
|
+
this.logger.info("Search path: ".concat(ts.getDirectoryPath(info.fileName)));
|
|
169348
169348
|
var configFileName = this.forEachConfigFileLocation(info, function (canonicalConfigFilePath, configFileName) {
|
|
169349
169349
|
return _this.configFileExists(configFileName, canonicalConfigFilePath, info);
|
|
169350
169350
|
});
|
|
169351
169351
|
if (configFileName) {
|
|
169352
|
-
this.logger.info("For info: "
|
|
169352
|
+
this.logger.info("For info: ".concat(info.fileName, " :: Config file name: ").concat(configFileName));
|
|
169353
169353
|
}
|
|
169354
169354
|
else {
|
|
169355
|
-
this.logger.info("For info: "
|
|
169355
|
+
this.logger.info("For info: ".concat(info.fileName, " :: No config files found."));
|
|
169356
169356
|
}
|
|
169357
169357
|
if (isOpenScriptInfo(info)) {
|
|
169358
169358
|
this.configFileForOpenFiles.set(info.path, configFileName || false);
|
|
@@ -169371,8 +169371,8 @@ var ts;
|
|
|
169371
169371
|
this.logger.info("Open files: ");
|
|
169372
169372
|
this.openFiles.forEach(function (projectRootPath, path) {
|
|
169373
169373
|
var info = _this.getScriptInfoForPath(path);
|
|
169374
|
-
_this.logger.info("\tFileName: "
|
|
169375
|
-
_this.logger.info("\t\tProjects: "
|
|
169374
|
+
_this.logger.info("\tFileName: ".concat(info.fileName, " ProjectRootPath: ").concat(projectRootPath));
|
|
169375
|
+
_this.logger.info("\t\tProjects: ".concat(info.containingProjects.map(function (p) { return p.getProjectName(); })));
|
|
169376
169376
|
});
|
|
169377
169377
|
this.logger.endGroup();
|
|
169378
169378
|
};
|
|
@@ -169411,7 +169411,7 @@ var ts;
|
|
|
169411
169411
|
.map(function (name) { return ({ name: name, size: _this.host.getFileSize(name) }); })
|
|
169412
169412
|
.sort(function (a, b) { return b.size - a.size; })
|
|
169413
169413
|
.slice(0, 5);
|
|
169414
|
-
this.logger.info("Non TS file size exceeded limit ("
|
|
169414
|
+
this.logger.info("Non TS file size exceeded limit (".concat(totalNonTsFileSize, "). Largest files: ").concat(top5LargestFiles.map(function (file) { return "".concat(file.name, ":").concat(file.size); }).join(", ")));
|
|
169415
169415
|
// Keep the size as zero since it's disabled
|
|
169416
169416
|
return fileName;
|
|
169417
169417
|
}
|
|
@@ -169480,7 +169480,7 @@ var ts;
|
|
|
169480
169480
|
};
|
|
169481
169481
|
/* @internal */
|
|
169482
169482
|
ProjectService.prototype.createConfiguredProject = function (configFileName) {
|
|
169483
|
-
this.logger.info("Creating configuration project "
|
|
169483
|
+
this.logger.info("Creating configuration project ".concat(configFileName));
|
|
169484
169484
|
var canonicalConfigFilePath = server.asNormalizedPath(this.toCanonicalFileName(configFileName));
|
|
169485
169485
|
var configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
169486
169486
|
// We could be in this scenario if project is the configured project tracked by external project
|
|
@@ -169591,12 +169591,12 @@ var ts;
|
|
|
169591
169591
|
if (parsedCommandLine.errors.length) {
|
|
169592
169592
|
configFileErrors.push.apply(configFileErrors, parsedCommandLine.errors);
|
|
169593
169593
|
}
|
|
169594
|
-
this.logger.info("Config: "
|
|
169594
|
+
this.logger.info("Config: ".concat(configFilename, " : ").concat(JSON.stringify({
|
|
169595
169595
|
rootNames: parsedCommandLine.fileNames,
|
|
169596
169596
|
options: parsedCommandLine.options,
|
|
169597
169597
|
watchOptions: parsedCommandLine.watchOptions,
|
|
169598
169598
|
projectReferences: parsedCommandLine.projectReferences
|
|
169599
|
-
}, /*replacer*/ undefined, " "));
|
|
169599
|
+
}, /*replacer*/ undefined, " ")));
|
|
169600
169600
|
var oldCommandLine = (_b = configFileExistenceInfo.config) === null || _b === void 0 ? void 0 : _b.parsedCommandLine;
|
|
169601
169601
|
if (!configFileExistenceInfo.config) {
|
|
169602
169602
|
configFileExistenceInfo.config = { parsedCommandLine: parsedCommandLine, cachedDirectoryStructureHost: cachedDirectoryStructureHost, projects: new ts.Map() };
|
|
@@ -169626,7 +169626,7 @@ var ts;
|
|
|
169626
169626
|
// Update projects
|
|
169627
169627
|
var ensureProjectsForOpenFiles = false;
|
|
169628
169628
|
(_a = _this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (canonicalPath) {
|
|
169629
|
-
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file "
|
|
169629
|
+
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file ".concat(extendedConfigFileName, " detected")) || ensureProjectsForOpenFiles;
|
|
169630
169630
|
});
|
|
169631
169631
|
if (ensureProjectsForOpenFiles)
|
|
169632
169632
|
_this.delayEnsureProjectForOpenFiles();
|
|
@@ -169782,7 +169782,7 @@ var ts;
|
|
|
169782
169782
|
// Clear the cache since we are reloading the project from disk
|
|
169783
169783
|
host.clearCache();
|
|
169784
169784
|
var configFileName = project.getConfigFilePath();
|
|
169785
|
-
this.logger.info((isInitialLoad ? "Loading" : "Reloading"
|
|
169785
|
+
this.logger.info("".concat(isInitialLoad ? "Loading" : "Reloading", " configured project ").concat(configFileName));
|
|
169786
169786
|
// Load project from the disk
|
|
169787
169787
|
this.loadConfiguredProject(project, reason);
|
|
169788
169788
|
project.updateGraph();
|
|
@@ -169921,7 +169921,7 @@ var ts;
|
|
|
169921
169921
|
var path = _a[0], scriptInfo = _a[1];
|
|
169922
169922
|
return ({ path: path, fileName: scriptInfo.fileName });
|
|
169923
169923
|
});
|
|
169924
|
-
this.logger.msg("Could not find file "
|
|
169924
|
+
this.logger.msg("Could not find file ".concat(JSON.stringify(fileName), ".\nAll files are: ").concat(JSON.stringify(names)), server.Msg.Err);
|
|
169925
169925
|
};
|
|
169926
169926
|
/**
|
|
169927
169927
|
* Returns the projects that contain script info through SymLink
|
|
@@ -170105,9 +170105,9 @@ var ts;
|
|
|
170105
170105
|
var info = this.getScriptInfoForPath(path);
|
|
170106
170106
|
if (!info) {
|
|
170107
170107
|
var isDynamic = server.isDynamicFileName(fileName);
|
|
170108
|
-
ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
170109
|
-
ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
170110
|
-
ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
170108
|
+
ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nScript info with non-dynamic relative file name can only be open script info or in context of host currentDirectory"); });
|
|
170109
|
+
ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nOpen script files with non rooted disk path opened with current directory context cannot have same canonical names"); });
|
|
170110
|
+
ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."); });
|
|
170111
170111
|
// If the file is not opened by client and the file doesnot exist on the disk, return
|
|
170112
170112
|
if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
|
|
170113
170113
|
return;
|
|
@@ -170286,13 +170286,13 @@ var ts;
|
|
|
170286
170286
|
var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file));
|
|
170287
170287
|
if (info) {
|
|
170288
170288
|
info.setOptions(convertFormatOptions(args.formatOptions), args.preferences);
|
|
170289
|
-
this.logger.info("Host configuration update for file "
|
|
170289
|
+
this.logger.info("Host configuration update for file ".concat(args.file));
|
|
170290
170290
|
}
|
|
170291
170291
|
}
|
|
170292
170292
|
else {
|
|
170293
170293
|
if (args.hostInfo !== undefined) {
|
|
170294
170294
|
this.hostConfiguration.hostInfo = args.hostInfo;
|
|
170295
|
-
this.logger.info("Host information "
|
|
170295
|
+
this.logger.info("Host information ".concat(args.hostInfo));
|
|
170296
170296
|
}
|
|
170297
170297
|
if (args.formatOptions) {
|
|
170298
170298
|
this.hostConfiguration.formatCodeOptions = __assign(__assign({}, this.hostConfiguration.formatCodeOptions), convertFormatOptions(args.formatOptions));
|
|
@@ -170324,7 +170324,7 @@ var ts;
|
|
|
170324
170324
|
}
|
|
170325
170325
|
if (args.watchOptions) {
|
|
170326
170326
|
this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions;
|
|
170327
|
-
this.logger.info("Host watch options changed to "
|
|
170327
|
+
this.logger.info("Host watch options changed to ".concat(JSON.stringify(this.hostConfiguration.watchOptions), ", it will be take effect for next watches."));
|
|
170328
170328
|
}
|
|
170329
170329
|
}
|
|
170330
170330
|
};
|
|
@@ -170536,7 +170536,7 @@ var ts;
|
|
|
170536
170536
|
? originalLocation
|
|
170537
170537
|
: location;
|
|
170538
170538
|
}
|
|
170539
|
-
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: "
|
|
170539
|
+
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: ".concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
|
|
170540
170540
|
}
|
|
170541
170541
|
updateProjectIfDirty(configuredProject);
|
|
170542
170542
|
var projectContainsOriginalInfo = function (project) {
|
|
@@ -170548,7 +170548,7 @@ var ts;
|
|
|
170548
170548
|
configuredProject = forEachResolvedProjectReferenceProject(configuredProject, fileName, function (child) {
|
|
170549
170549
|
updateProjectIfDirty(child);
|
|
170550
170550
|
return projectContainsOriginalInfo(child) ? child : undefined;
|
|
170551
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
170551
|
+
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(configuredProject.projectName, " to find possible configured project for original file: ").concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
|
|
170552
170552
|
if (!configuredProject)
|
|
170553
170553
|
return undefined;
|
|
170554
170554
|
if (configuredProject === project)
|
|
@@ -170602,7 +170602,7 @@ var ts;
|
|
|
170602
170602
|
if (configFileName) {
|
|
170603
170603
|
project = this.findConfiguredProjectByProjectName(configFileName);
|
|
170604
170604
|
if (!project) {
|
|
170605
|
-
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for "
|
|
170605
|
+
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for ".concat(info.fileName, " to open"));
|
|
170606
170606
|
defaultConfigProjectIsCreated = true;
|
|
170607
170607
|
}
|
|
170608
170608
|
else {
|
|
@@ -170632,7 +170632,7 @@ var ts;
|
|
|
170632
170632
|
if (!projectForConfigFileDiag && child.containsScriptInfo(info)) {
|
|
170633
170633
|
projectForConfigFileDiag = child;
|
|
170634
170634
|
}
|
|
170635
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
170635
|
+
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(project.projectName, " to find possible configured project for ").concat(info.fileName, " to open"));
|
|
170636
170636
|
}
|
|
170637
170637
|
// Send the event only if the project got created as part of this open request and info is part of the project
|
|
170638
170638
|
if (projectForConfigFileDiag) {
|
|
@@ -170694,7 +170694,7 @@ var ts;
|
|
|
170694
170694
|
return;
|
|
170695
170695
|
// find or delay load the project
|
|
170696
170696
|
var ancestor = this.findConfiguredProjectByProjectName(configFileName) ||
|
|
170697
|
-
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project "
|
|
170697
|
+
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project ".concat(project.getProjectName(), " of open file ").concat(info.fileName));
|
|
170698
170698
|
if (ancestor.isInitialLoadPending()) {
|
|
170699
170699
|
// Set a potential project reference
|
|
170700
170700
|
ancestor.setPotentialProjectReference(project.canonicalConfigFilePath);
|
|
@@ -170737,7 +170737,7 @@ var ts;
|
|
|
170737
170737
|
// Load this project,
|
|
170738
170738
|
var configFileName = server.toNormalizedPath(child.sourceFile.fileName);
|
|
170739
170739
|
var childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) ||
|
|
170740
|
-
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : "
|
|
170740
|
+
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : ".concat(project.projectName, " as it references project ").concat(referencedProject.sourceFile.fileName));
|
|
170741
170741
|
updateProjectIfDirty(childProject);
|
|
170742
170742
|
// Ensure children for this project
|
|
170743
170743
|
this.ensureProjectChildren(childProject, forProjects, seenProjects);
|
|
@@ -171038,7 +171038,7 @@ var ts;
|
|
|
171038
171038
|
for (var _b = 0, normalizedNames_1 = normalizedNames; _b < normalizedNames_1.length; _b++) {
|
|
171039
171039
|
var root = normalizedNames_1[_b];
|
|
171040
171040
|
if (rule.match.test(root)) {
|
|
171041
|
-
this_2.logger.info("Excluding files based on rule "
|
|
171041
|
+
this_2.logger.info("Excluding files based on rule ".concat(name, " matching file '").concat(root, "'"));
|
|
171042
171042
|
// If the file matches, collect its types packages and exclude rules
|
|
171043
171043
|
if (rule.types) {
|
|
171044
171044
|
for (var _c = 0, _d = rule.types; _c < _d.length; _c++) {
|
|
@@ -171063,7 +171063,7 @@ var ts;
|
|
|
171063
171063
|
if (typeof groupNumberOrString === "number") {
|
|
171064
171064
|
if (!ts.isString(groups[groupNumberOrString])) {
|
|
171065
171065
|
// Specification was wrong - exclude nothing!
|
|
171066
|
-
_this.logger.info("Incorrect RegExp specification in safelist rule "
|
|
171066
|
+
_this.logger.info("Incorrect RegExp specification in safelist rule ".concat(name, " - not enough groups"));
|
|
171067
171067
|
// * can't appear in a filename; escape it because it's feeding into a RegExp
|
|
171068
171068
|
return "\\*";
|
|
171069
171069
|
}
|
|
@@ -171111,7 +171111,7 @@ var ts;
|
|
|
171111
171111
|
var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName);
|
|
171112
171112
|
var typeName = this_3.legacySafelist.get(cleanedTypingName);
|
|
171113
171113
|
if (typeName !== undefined) {
|
|
171114
|
-
this_3.logger.info("Excluded '"
|
|
171114
|
+
this_3.logger.info("Excluded '".concat(normalizedNames[i], "' because it matched ").concat(cleanedTypingName, " from the legacy safelist"));
|
|
171115
171115
|
excludedFiles.push(normalizedNames[i]);
|
|
171116
171116
|
// *exclude* it from the project...
|
|
171117
171117
|
exclude = true;
|
|
@@ -171241,8 +171241,8 @@ var ts;
|
|
|
171241
171241
|
if (!project) {
|
|
171242
171242
|
// errors are stored in the project, do not need to update the graph
|
|
171243
171243
|
project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ?
|
|
171244
|
-
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: "
|
|
171245
|
-
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: "
|
|
171244
|
+
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName)) :
|
|
171245
|
+
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName));
|
|
171246
171246
|
}
|
|
171247
171247
|
if (project && !ts.contains(exisingConfigFiles, tsconfigFile)) {
|
|
171248
171248
|
// keep project alive even if no documents are opened - its lifetime is bound to the lifetime of containing external project
|
|
@@ -171480,7 +171480,7 @@ var ts;
|
|
|
171480
171480
|
return cache || (cache = new ts.Map());
|
|
171481
171481
|
}
|
|
171482
171482
|
function key(fromFileName, preferences) {
|
|
171483
|
-
return fromFileName
|
|
171483
|
+
return "".concat(fromFileName, ",").concat(preferences.importModuleSpecifierEnding, ",").concat(preferences.importModuleSpecifierPreference);
|
|
171484
171484
|
}
|
|
171485
171485
|
function createInfo(modulePaths, moduleSpecifiers, isAutoImportable) {
|
|
171486
171486
|
return { modulePaths: modulePaths, moduleSpecifiers: moduleSpecifiers, isAutoImportable: isAutoImportable };
|
|
@@ -171639,10 +171639,10 @@ var ts;
|
|
|
171639
171639
|
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
|
|
171640
171640
|
var json = JSON.stringify(msg);
|
|
171641
171641
|
if (verboseLogging) {
|
|
171642
|
-
logger.info(msg.type
|
|
171642
|
+
logger.info("".concat(msg.type, ":").concat(server.indent(json)));
|
|
171643
171643
|
}
|
|
171644
171644
|
var len = byteLength(json, "utf8");
|
|
171645
|
-
return "Content-Length: "
|
|
171645
|
+
return "Content-Length: ".concat(1 + len, "\r\n\r\n").concat(json).concat(newLine);
|
|
171646
171646
|
}
|
|
171647
171647
|
server.formatMessage = formatMessage;
|
|
171648
171648
|
/**
|
|
@@ -171707,7 +171707,7 @@ var ts;
|
|
|
171707
171707
|
}
|
|
171708
171708
|
else {
|
|
171709
171709
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("session" /* Session */, "stepError", { seq: this.requestId, message: e.message });
|
|
171710
|
-
this.operationHost.logError(e, "delayed processing of request "
|
|
171710
|
+
this.operationHost.logError(e, "delayed processing of request ".concat(this.requestId));
|
|
171711
171711
|
}
|
|
171712
171712
|
}
|
|
171713
171713
|
if (stop || !this.hasPendingWork()) {
|
|
@@ -171808,7 +171808,7 @@ var ts;
|
|
|
171808
171808
|
function combineProjectOutputForReferences(projects, defaultProject, initialLocation, logger) {
|
|
171809
171809
|
var outputs = [];
|
|
171810
171810
|
combineProjectOutputWorker(projects, defaultProject, initialLocation, function (project, location, getMappedLocation) {
|
|
171811
|
-
logger.info("Finding references to "
|
|
171811
|
+
logger.info("Finding references to ".concat(location.fileName, " position ").concat(location.pos, " in project ").concat(project.getProjectName()));
|
|
171812
171812
|
var _loop_8 = function (outputReferencedSymbol) {
|
|
171813
171813
|
var mappedDefinitionFile = getMappedLocation(project, documentSpanLocation(outputReferencedSymbol.definition));
|
|
171814
171814
|
var definition = mappedDefinitionFile === undefined ?
|
|
@@ -172493,14 +172493,14 @@ var ts;
|
|
|
172493
172493
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
172494
172494
|
invalidPartialSemanticModeCommands.forEach(function (commandName) {
|
|
172495
172495
|
return _this.handlers.set(commandName, function (request) {
|
|
172496
|
-
throw new Error("Request: "
|
|
172496
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
172497
172497
|
});
|
|
172498
172498
|
});
|
|
172499
172499
|
break;
|
|
172500
172500
|
case ts.LanguageServiceMode.Syntactic:
|
|
172501
172501
|
invalidSyntacticModeCommands.forEach(function (commandName) {
|
|
172502
172502
|
return _this.handlers.set(commandName, function (request) {
|
|
172503
|
-
throw new Error("Request: "
|
|
172503
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.Syntactic"));
|
|
172504
172504
|
});
|
|
172505
172505
|
});
|
|
172506
172506
|
break;
|
|
@@ -172575,7 +172575,7 @@ var ts;
|
|
|
172575
172575
|
};
|
|
172576
172576
|
Session.prototype.projectsUpdatedInBackgroundEvent = function (openFiles) {
|
|
172577
172577
|
var _this = this;
|
|
172578
|
-
this.projectService.logger.info("got projects updated in background, updating diagnostics for "
|
|
172578
|
+
this.projectService.logger.info("got projects updated in background, updating diagnostics for ".concat(openFiles));
|
|
172579
172579
|
if (openFiles.length) {
|
|
172580
172580
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
172581
172581
|
// For now only queue error checking for open files. We can change this to include non open files as well
|
|
@@ -172605,17 +172605,17 @@ var ts;
|
|
|
172605
172605
|
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
|
|
172606
172606
|
if (scriptInfo) {
|
|
172607
172607
|
var text = ts.getSnapshotText(scriptInfo.getSnapshot());
|
|
172608
|
-
msg += "\n\nFile text of "
|
|
172608
|
+
msg += "\n\nFile text of ".concat(fileRequest.file, ":").concat(server.indent(text), "\n");
|
|
172609
172609
|
}
|
|
172610
172610
|
}
|
|
172611
172611
|
catch (_b) { } // eslint-disable-line no-empty
|
|
172612
172612
|
}
|
|
172613
172613
|
if (err.ProgramFiles) {
|
|
172614
|
-
msg += "\n\nProgram files: "
|
|
172614
|
+
msg += "\n\nProgram files: ".concat(JSON.stringify(err.ProgramFiles), "\n");
|
|
172615
172615
|
msg += "\n\nProjects::\n";
|
|
172616
172616
|
var counter_1 = 0;
|
|
172617
172617
|
var addProjectInfo = function (project) {
|
|
172618
|
-
msg += "\nProject '"
|
|
172618
|
+
msg += "\nProject '".concat(project.projectName, "' (").concat(server.ProjectKind[project.projectKind], ") ").concat(counter_1, "\n");
|
|
172619
172619
|
msg += project.filesToString(/*writeProjectFileNames*/ true);
|
|
172620
172620
|
msg += "\n-----------------------------------------------\n";
|
|
172621
172621
|
counter_1++;
|
|
@@ -172630,7 +172630,7 @@ var ts;
|
|
|
172630
172630
|
Session.prototype.send = function (msg) {
|
|
172631
172631
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
172632
172632
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
172633
|
-
this.logger.info("Session does not support events: ignored event: "
|
|
172633
|
+
this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
|
|
172634
172634
|
}
|
|
172635
172635
|
return;
|
|
172636
172636
|
}
|
|
@@ -172638,7 +172638,7 @@ var ts;
|
|
|
172638
172638
|
};
|
|
172639
172639
|
Session.prototype.writeMessage = function (msg) {
|
|
172640
172640
|
var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
|
|
172641
|
-
ts.perfLogger.logEvent("Response message size: "
|
|
172641
|
+
ts.perfLogger.logEvent("Response message size: ".concat(msgText.length));
|
|
172642
172642
|
this.host.write(msgText);
|
|
172643
172643
|
};
|
|
172644
172644
|
Session.prototype.event = function (body, eventName) {
|
|
@@ -172776,7 +172776,7 @@ var ts;
|
|
|
172776
172776
|
if (!projects) {
|
|
172777
172777
|
return;
|
|
172778
172778
|
}
|
|
172779
|
-
this.logger.info("cleaning "
|
|
172779
|
+
this.logger.info("cleaning ".concat(caption));
|
|
172780
172780
|
for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
|
|
172781
172781
|
var p = projects_4[_i];
|
|
172782
172782
|
p.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache();
|
|
@@ -173190,7 +173190,7 @@ var ts;
|
|
|
173190
173190
|
var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
|
|
173191
173191
|
return {
|
|
173192
173192
|
refs: refs,
|
|
173193
|
-
symbolName: "\""
|
|
173193
|
+
symbolName: "\"".concat(args.file, "\"")
|
|
173194
173194
|
};
|
|
173195
173195
|
};
|
|
173196
173196
|
/**
|
|
@@ -173734,7 +173734,7 @@ var ts;
|
|
|
173734
173734
|
});
|
|
173735
173735
|
var badCode = args.errorCodes.find(function (c) { return !existingDiagCodes_1.includes(c); });
|
|
173736
173736
|
if (badCode !== undefined) {
|
|
173737
|
-
e.message = "BADCLIENT: Bad error code, "
|
|
173737
|
+
e.message = "BADCLIENT: Bad error code, ".concat(badCode, " not found in range ").concat(startPosition, "..").concat(endPosition, " (found: ").concat(existingDiagCodes_1.join(", "), "); could have caused this error:\n").concat(e.message);
|
|
173738
173738
|
}
|
|
173739
173739
|
throw e;
|
|
173740
173740
|
}
|
|
@@ -174011,7 +174011,7 @@ var ts;
|
|
|
174011
174011
|
};
|
|
174012
174012
|
Session.prototype.addProtocolHandler = function (command, handler) {
|
|
174013
174013
|
if (this.handlers.has(command)) {
|
|
174014
|
-
throw new Error("Protocol handler already exists for command \""
|
|
174014
|
+
throw new Error("Protocol handler already exists for command \"".concat(command, "\""));
|
|
174015
174015
|
}
|
|
174016
174016
|
this.handlers.set(command, handler);
|
|
174017
174017
|
};
|
|
@@ -174040,8 +174040,8 @@ var ts;
|
|
|
174040
174040
|
return this.executeWithRequestId(request.seq, function () { return handler(request); });
|
|
174041
174041
|
}
|
|
174042
174042
|
else {
|
|
174043
|
-
this.logger.msg("Unrecognized JSON command:"
|
|
174044
|
-
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: "
|
|
174043
|
+
this.logger.msg("Unrecognized JSON command:".concat(server.stringifyIndented(request)), server.Msg.Err);
|
|
174044
|
+
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: ".concat(request.command));
|
|
174045
174045
|
return { responseRequired: false };
|
|
174046
174046
|
}
|
|
174047
174047
|
};
|
|
@@ -174052,7 +174052,7 @@ var ts;
|
|
|
174052
174052
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
174053
174053
|
start = this.hrtime();
|
|
174054
174054
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174055
|
-
this.logger.info("request:"
|
|
174055
|
+
this.logger.info("request:".concat(server.indent(this.toStringMessage(message))));
|
|
174056
174056
|
}
|
|
174057
174057
|
}
|
|
174058
174058
|
var request;
|
|
@@ -174068,10 +174068,10 @@ var ts;
|
|
|
174068
174068
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
174069
174069
|
var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
|
|
174070
174070
|
if (responseRequired) {
|
|
174071
|
-
this.logger.perftrc(request.seq
|
|
174071
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
174072
174072
|
}
|
|
174073
174073
|
else {
|
|
174074
|
-
this.logger.perftrc(request.seq
|
|
174074
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": async elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
174075
174075
|
}
|
|
174076
174076
|
}
|
|
174077
174077
|
// Note: Log before writing the response, else the editor can complete its activity before the server does
|
|
@@ -175007,7 +175007,7 @@ var ts;
|
|
|
175007
175007
|
}
|
|
175008
175008
|
if (!this.canWrite())
|
|
175009
175009
|
return;
|
|
175010
|
-
s = "["
|
|
175010
|
+
s = "[".concat(server.nowString(), "] ").concat(s, "\n");
|
|
175011
175011
|
if (!this.inGroup || this.firstInGroup) {
|
|
175012
175012
|
var prefix = BaseLogger.padStringRight(type + " " + this.seq.toString(), " ");
|
|
175013
175013
|
s = prefix + s;
|
|
@@ -175124,12 +175124,12 @@ var ts;
|
|
|
175124
175124
|
WorkerSession.prototype.send = function (msg) {
|
|
175125
175125
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
175126
175126
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
175127
|
-
this.logger.info("Session does not support events: ignored event: "
|
|
175127
|
+
this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
|
|
175128
175128
|
}
|
|
175129
175129
|
return;
|
|
175130
175130
|
}
|
|
175131
175131
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
175132
|
-
this.logger.info(msg.type
|
|
175132
|
+
this.logger.info("".concat(msg.type, ":").concat(server.indent(JSON.stringify(msg))));
|
|
175133
175133
|
}
|
|
175134
175134
|
this.webHost.writeMessage(msg);
|
|
175135
175135
|
};
|
|
@@ -176192,23 +176192,23 @@ var ts;
|
|
|
176192
176192
|
var status = cacheKey && statusCache_1.get(cacheKey);
|
|
176193
176193
|
if (status === undefined) {
|
|
176194
176194
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
176195
|
-
logger.info(cacheKey
|
|
176195
|
+
logger.info("".concat(cacheKey, " for path ").concat(path, " not found in cache..."));
|
|
176196
176196
|
}
|
|
176197
176197
|
try {
|
|
176198
176198
|
var args = [ts.combinePaths(__dirname, "watchGuard.js"), path];
|
|
176199
176199
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
176200
|
-
logger.info("Starting "
|
|
176200
|
+
logger.info("Starting ".concat(process.execPath, " with args:").concat(server.stringifyIndented(args)));
|
|
176201
176201
|
}
|
|
176202
176202
|
childProcess.execFileSync(process.execPath, args, { stdio: "ignore", env: { ELECTRON_RUN_AS_NODE: "1" } });
|
|
176203
176203
|
status = true;
|
|
176204
176204
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
176205
|
-
logger.info("WatchGuard for path "
|
|
176205
|
+
logger.info("WatchGuard for path ".concat(path, " returned: OK"));
|
|
176206
176206
|
}
|
|
176207
176207
|
}
|
|
176208
176208
|
catch (e) {
|
|
176209
176209
|
status = false;
|
|
176210
176210
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
176211
|
-
logger.info("WatchGuard for path "
|
|
176211
|
+
logger.info("WatchGuard for path ".concat(path, " returned: ").concat(e.message));
|
|
176212
176212
|
}
|
|
176213
176213
|
}
|
|
176214
176214
|
if (cacheKey) {
|
|
@@ -176216,7 +176216,7 @@ var ts;
|
|
|
176216
176216
|
}
|
|
176217
176217
|
}
|
|
176218
176218
|
else if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
176219
|
-
logger.info("watchDirectory for "
|
|
176219
|
+
logger.info("watchDirectory for ".concat(path, " uses cached drive information."));
|
|
176220
176220
|
}
|
|
176221
176221
|
if (status) {
|
|
176222
176222
|
// this drive is safe to use - call real 'watchDirectory'
|
|
@@ -176359,7 +176359,7 @@ var ts;
|
|
|
176359
176359
|
return originalWatchDirectory(path, callback, recursive, options);
|
|
176360
176360
|
}
|
|
176361
176361
|
catch (e) {
|
|
176362
|
-
logger.info("Exception when creating directory watcher: "
|
|
176362
|
+
logger.info("Exception when creating directory watcher: ".concat(e.message));
|
|
176363
176363
|
return ts.noopFileWatcher;
|
|
176364
176364
|
}
|
|
176365
176365
|
}
|
|
@@ -176428,7 +176428,7 @@ var ts;
|
|
|
176428
176428
|
args.push(server.Arguments.EnableTelemetry);
|
|
176429
176429
|
}
|
|
176430
176430
|
if (this.logger.loggingEnabled() && this.logger.getLogFileName()) {
|
|
176431
|
-
args.push(server.Arguments.LogFile, ts.combinePaths(ts.getDirectoryPath(ts.normalizeSlashes(this.logger.getLogFileName())), "ti-"
|
|
176431
|
+
args.push(server.Arguments.LogFile, ts.combinePaths(ts.getDirectoryPath(ts.normalizeSlashes(this.logger.getLogFileName())), "ti-".concat(process.pid, ".log")));
|
|
176432
176432
|
}
|
|
176433
176433
|
if (this.typingSafeListLocation) {
|
|
176434
176434
|
args.push(server.Arguments.TypingSafeListLocation, this.typingSafeListLocation);
|
|
@@ -176452,7 +176452,7 @@ var ts;
|
|
|
176452
176452
|
var currentPort = match[2] !== undefined
|
|
176453
176453
|
? +match[2]
|
|
176454
176454
|
: match[1].charAt(0) === "d" ? 5858 : 9229;
|
|
176455
|
-
execArgv.push("--"
|
|
176455
|
+
execArgv.push("--".concat(match[1], "=").concat(currentPort + 1));
|
|
176456
176456
|
break;
|
|
176457
176457
|
}
|
|
176458
176458
|
}
|
|
@@ -176478,13 +176478,13 @@ var ts;
|
|
|
176478
176478
|
var request = server.createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
|
176479
176479
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176480
176480
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176481
|
-
this.logger.info("Scheduling throttled operation:"
|
|
176481
|
+
this.logger.info("Scheduling throttled operation:".concat(server.stringifyIndented(request)));
|
|
176482
176482
|
}
|
|
176483
176483
|
}
|
|
176484
176484
|
var operationId = project.getProjectName();
|
|
176485
176485
|
var operation = function () {
|
|
176486
176486
|
if (_this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176487
|
-
_this.logger.info("Sending request:"
|
|
176487
|
+
_this.logger.info("Sending request:".concat(server.stringifyIndented(request)));
|
|
176488
176488
|
}
|
|
176489
176489
|
_this.send(request);
|
|
176490
176490
|
};
|
|
@@ -176494,7 +176494,7 @@ var ts;
|
|
|
176494
176494
|
}
|
|
176495
176495
|
else {
|
|
176496
176496
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176497
|
-
this.logger.info("Deferring request for: "
|
|
176497
|
+
this.logger.info("Deferring request for: ".concat(operationId));
|
|
176498
176498
|
}
|
|
176499
176499
|
this.requestQueue.push(queuedRequest);
|
|
176500
176500
|
this.requestMap.set(operationId, queuedRequest);
|
|
@@ -176502,7 +176502,7 @@ var ts;
|
|
|
176502
176502
|
};
|
|
176503
176503
|
NodeTypingsInstaller.prototype.handleMessage = function (response) {
|
|
176504
176504
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176505
|
-
this.logger.info("Received response:"
|
|
176505
|
+
this.logger.info("Received response:".concat(server.stringifyIndented(response)));
|
|
176506
176506
|
}
|
|
176507
176507
|
switch (response.kind) {
|
|
176508
176508
|
case server.EventTypesRegistry:
|
|
@@ -176580,7 +176580,7 @@ var ts;
|
|
|
176580
176580
|
break;
|
|
176581
176581
|
}
|
|
176582
176582
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176583
|
-
this.logger.info("Skipping defunct request for: "
|
|
176583
|
+
this.logger.info("Skipping defunct request for: ".concat(queuedRequest.operationId));
|
|
176584
176584
|
}
|
|
176585
176585
|
}
|
|
176586
176586
|
this.projectService.updateTypingsForProject(response);
|
|
@@ -176593,7 +176593,7 @@ var ts;
|
|
|
176593
176593
|
};
|
|
176594
176594
|
NodeTypingsInstaller.prototype.scheduleRequest = function (request) {
|
|
176595
176595
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176596
|
-
this.logger.info("Scheduling request for: "
|
|
176596
|
+
this.logger.info("Scheduling request for: ".concat(request.operationId));
|
|
176597
176597
|
}
|
|
176598
176598
|
this.activeRequestCount++;
|
|
176599
176599
|
this.host.setTimeout(request.operation, NodeTypingsInstaller.requestDelayMillis);
|
|
@@ -176641,7 +176641,7 @@ var ts;
|
|
|
176641
176641
|
if (this.canUseEvents && this.eventPort) {
|
|
176642
176642
|
if (!this.eventSocket) {
|
|
176643
176643
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
176644
|
-
this.logger.info("eventPort: event \""
|
|
176644
|
+
this.logger.info("eventPort: event \"".concat(eventName, "\" queued, but socket not yet initialized"));
|
|
176645
176645
|
}
|
|
176646
176646
|
(this.socketEventQueue || (this.socketEventQueue = [])).push({ body: body, eventName: eventName });
|
|
176647
176647
|
return;
|
|
@@ -176685,7 +176685,7 @@ var ts;
|
|
|
176685
176685
|
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
|
|
176686
176686
|
if (verboseLogging) {
|
|
176687
176687
|
var json = JSON.stringify(msg);
|
|
176688
|
-
logger.info(msg.type
|
|
176688
|
+
logger.info("".concat(msg.type, ":").concat(server.indent(json)));
|
|
176689
176689
|
}
|
|
176690
176690
|
process.send(msg);
|
|
176691
176691
|
};
|
|
@@ -176747,7 +176747,7 @@ var ts;
|
|
|
176747
176747
|
return ts.combinePaths(ts.combinePaths(cacheLocation, "typescript"), ts.versionMajorMinor);
|
|
176748
176748
|
}
|
|
176749
176749
|
default:
|
|
176750
|
-
return ts.Debug.fail("unsupported platform '"
|
|
176750
|
+
return ts.Debug.fail("unsupported platform '".concat(process.platform, "'"));
|
|
176751
176751
|
}
|
|
176752
176752
|
}
|
|
176753
176753
|
function getNonWindowsCacheLocation(platformIsDarwin) {
|
|
@@ -176757,7 +176757,7 @@ var ts;
|
|
|
176757
176757
|
var usersDir = platformIsDarwin ? "Users" : "home";
|
|
176758
176758
|
var homePath = (os.homedir && os.homedir()) ||
|
|
176759
176759
|
process.env.HOME ||
|
|
176760
|
-
((process.env.LOGNAME || process.env.USER) && "/"
|
|
176760
|
+
((process.env.LOGNAME || process.env.USER) && "/".concat(usersDir, "/").concat(process.env.LOGNAME || process.env.USER)) ||
|
|
176761
176761
|
os.tmpdir();
|
|
176762
176762
|
var cacheFolder = platformIsDarwin
|
|
176763
176763
|
? "Library/Caches"
|
|
@@ -176915,10 +176915,10 @@ var ts;
|
|
|
176915
176915
|
var args = _a.args, logger = _a.logger, cancellationToken = _a.cancellationToken, serverMode = _a.serverMode, unknownServerMode = _a.unknownServerMode, startServer = _a.startSession;
|
|
176916
176916
|
var syntaxOnly = server.hasArgument("--syntaxOnly");
|
|
176917
176917
|
logger.info("Starting TS Server");
|
|
176918
|
-
logger.info("Version: "
|
|
176919
|
-
logger.info("Arguments: "
|
|
176920
|
-
logger.info("Platform: "
|
|
176921
|
-
logger.info("ServerMode: "
|
|
176918
|
+
logger.info("Version: ".concat(ts.version));
|
|
176919
|
+
logger.info("Arguments: ".concat(args.join(" ")));
|
|
176920
|
+
logger.info("Platform: ".concat(platform, " NodeVersion: ").concat(ts.getNodeMajorVersion(), " CaseSensitive: ").concat(ts.sys.useCaseSensitiveFileNames));
|
|
176921
|
+
logger.info("ServerMode: ".concat(serverMode, " syntaxOnly: ").concat(syntaxOnly, " hasUnknownServerMode: ").concat(unknownServerMode));
|
|
176922
176922
|
ts.setStackTraceLimit();
|
|
176923
176923
|
if (ts.Debug.isDebugging) {
|
|
176924
176924
|
ts.Debug.enableDebugInfo();
|