typescript 4.5.0-dev.20211031 → 4.5.3
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/lib.es5.d.ts +1 -1
- package/lib/tsc.js +353 -330
- package/lib/tsserver.js +674 -646
- package/lib/tsserverlibrary.js +650 -622
- package/lib/typescript.js +559 -531
- package/lib/typescriptServices.js +559 -531
- package/lib/typingsInstaller.js +428 -402
- package/package.json +3 -3
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 =
|
|
103
|
+
ts.version = "4.5.3";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -141,7 +141,7 @@ var ts;
|
|
|
141
141
|
var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
|
|
142
142
|
if (constructor)
|
|
143
143
|
return constructor;
|
|
144
|
-
throw new Error("TypeScript requires an environment that provides a compatible native "
|
|
144
|
+
throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
|
|
145
145
|
}
|
|
146
146
|
})(ts || (ts = {}));
|
|
147
147
|
/* @internal */
|
|
@@ -1504,7 +1504,7 @@ var ts;
|
|
|
1504
1504
|
function cast(value, test) {
|
|
1505
1505
|
if (value !== undefined && test(value))
|
|
1506
1506
|
return value;
|
|
1507
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1507
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1508
1508
|
}
|
|
1509
1509
|
ts.cast = cast;
|
|
1510
1510
|
/** Does nothing. */
|
|
@@ -1595,7 +1595,7 @@ var ts;
|
|
|
1595
1595
|
function memoizeOne(callback) {
|
|
1596
1596
|
var map = new ts.Map();
|
|
1597
1597
|
return function (arg) {
|
|
1598
|
-
var key = typeof arg
|
|
1598
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1599
1599
|
var value = map.get(key);
|
|
1600
1600
|
if (value === undefined && !map.has(key)) {
|
|
1601
1601
|
value = callback(arg);
|
|
@@ -2045,7 +2045,7 @@ var ts;
|
|
|
2045
2045
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
2046
2046
|
function patternText(_a) {
|
|
2047
2047
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
2048
|
-
return prefix
|
|
2048
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
2049
2049
|
}
|
|
2050
2050
|
ts.patternText = patternText;
|
|
2051
2051
|
/**
|
|
@@ -2358,7 +2358,7 @@ var ts;
|
|
|
2358
2358
|
}
|
|
2359
2359
|
function fail(message, stackCrawlMark) {
|
|
2360
2360
|
debugger;
|
|
2361
|
-
var e = new Error(message ? "Debug Failure. "
|
|
2361
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
2362
2362
|
if (Error.captureStackTrace) {
|
|
2363
2363
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
2364
2364
|
}
|
|
@@ -2366,12 +2366,12 @@ var ts;
|
|
|
2366
2366
|
}
|
|
2367
2367
|
Debug.fail = fail;
|
|
2368
2368
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
2369
|
-
return fail((message || "Unexpected node."
|
|
2369
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
2370
2370
|
}
|
|
2371
2371
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
2372
2372
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
2373
2373
|
if (!expression) {
|
|
2374
|
-
message = message ? "False expression: "
|
|
2374
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
2375
2375
|
if (verboseDebugInfo) {
|
|
2376
2376
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
2377
2377
|
}
|
|
@@ -2381,26 +2381,26 @@ var ts;
|
|
|
2381
2381
|
Debug.assert = assert;
|
|
2382
2382
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
2383
2383
|
if (a !== b) {
|
|
2384
|
-
var message = msg ? msg2 ? msg
|
|
2385
|
-
fail("Expected "
|
|
2384
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
2385
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
2388
2388
|
Debug.assertEqual = assertEqual;
|
|
2389
2389
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
2390
2390
|
if (a >= b) {
|
|
2391
|
-
fail("Expected "
|
|
2391
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
2394
|
Debug.assertLessThan = assertLessThan;
|
|
2395
2395
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
2396
2396
|
if (a > b) {
|
|
2397
|
-
fail("Expected "
|
|
2397
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
2400
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
2401
2401
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
2402
2402
|
if (a < b) {
|
|
2403
|
-
fail("Expected "
|
|
2403
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
2404
2404
|
}
|
|
2405
2405
|
}
|
|
2406
2406
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2441,42 +2441,42 @@ var ts;
|
|
|
2441
2441
|
function assertNever(member, message, stackCrawlMark) {
|
|
2442
2442
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2443
2443
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2444
|
-
return fail(message
|
|
2444
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2445
2445
|
}
|
|
2446
2446
|
Debug.assertNever = assertNever;
|
|
2447
2447
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2448
2448
|
if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
|
|
2449
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2449
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
2452
2452
|
Debug.assertEachNode = assertEachNode;
|
|
2453
2453
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2454
2454
|
if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
|
|
2455
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2455
|
+
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);
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
2458
|
Debug.assertNode = assertNode;
|
|
2459
2459
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2460
2460
|
if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
|
|
2461
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2461
|
+
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);
|
|
2462
2462
|
}
|
|
2463
2463
|
}
|
|
2464
2464
|
Debug.assertNotNode = assertNotNode;
|
|
2465
2465
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2466
2466
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
|
|
2467
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2467
|
+
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);
|
|
2468
2468
|
}
|
|
2469
2469
|
}
|
|
2470
2470
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2471
2471
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2472
2472
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
|
|
2473
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2473
|
+
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);
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
2476
2476
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2477
2477
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2478
2478
|
if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
|
|
2479
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2479
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2497,7 +2497,7 @@ var ts;
|
|
|
2497
2497
|
}
|
|
2498
2498
|
Debug.getFunctionName = getFunctionName;
|
|
2499
2499
|
function formatSymbol(symbol) {
|
|
2500
|
-
return "{ name: "
|
|
2500
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2501
2501
|
}
|
|
2502
2502
|
Debug.formatSymbol = formatSymbol;
|
|
2503
2503
|
/**
|
|
@@ -2518,7 +2518,7 @@ var ts;
|
|
|
2518
2518
|
break;
|
|
2519
2519
|
}
|
|
2520
2520
|
if (enumValue !== 0 && enumValue & value) {
|
|
2521
|
-
result = ""
|
|
2521
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2522
2522
|
remainingFlags &= ~enumValue;
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
@@ -2628,7 +2628,7 @@ var ts;
|
|
|
2628
2628
|
this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
|
|
2629
2629
|
"UnknownFlow";
|
|
2630
2630
|
var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
|
|
2631
|
-
return ""
|
|
2631
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2632
2632
|
}
|
|
2633
2633
|
},
|
|
2634
2634
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
|
|
@@ -2667,7 +2667,7 @@ var ts;
|
|
|
2667
2667
|
// We don't care, this is debug code that's only enabled with a debugger attached -
|
|
2668
2668
|
// we're just taking note of it for anyone checking regex performance in the future.
|
|
2669
2669
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2670
|
-
return "NodeArray "
|
|
2670
|
+
return "NodeArray ".concat(defaultValue);
|
|
2671
2671
|
}
|
|
2672
2672
|
}
|
|
2673
2673
|
});
|
|
@@ -2722,7 +2722,7 @@ var ts;
|
|
|
2722
2722
|
var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
|
|
2723
2723
|
"Symbol";
|
|
2724
2724
|
var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
|
|
2725
|
-
return symbolHeader
|
|
2725
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2726
2726
|
}
|
|
2727
2727
|
},
|
|
2728
2728
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2732,11 +2732,11 @@ var ts;
|
|
|
2732
2732
|
__tsDebuggerDisplay: {
|
|
2733
2733
|
value: function () {
|
|
2734
2734
|
var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
|
|
2735
|
-
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType "
|
|
2736
|
-
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType "
|
|
2735
|
+
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2736
|
+
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2737
2737
|
this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
|
|
2738
2738
|
this.flags & 32 /* Enum */ ? "EnumType" :
|
|
2739
|
-
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType "
|
|
2739
|
+
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2740
2740
|
this.flags & 1048576 /* Union */ ? "UnionType" :
|
|
2741
2741
|
this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
|
|
2742
2742
|
this.flags & 4194304 /* Index */ ? "IndexType" :
|
|
@@ -2755,7 +2755,7 @@ var ts;
|
|
|
2755
2755
|
"ObjectType" :
|
|
2756
2756
|
"Type";
|
|
2757
2757
|
var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
|
|
2758
|
-
return ""
|
|
2758
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2759
2759
|
}
|
|
2760
2760
|
},
|
|
2761
2761
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2791,11 +2791,11 @@ var ts;
|
|
|
2791
2791
|
__tsDebuggerDisplay: {
|
|
2792
2792
|
value: function () {
|
|
2793
2793
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2794
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2795
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2796
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2797
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2798
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2794
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2795
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2796
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2797
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2798
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2799
2799
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2800
2800
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2801
2801
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -2827,7 +2827,7 @@ var ts;
|
|
|
2827
2827
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
2828
2828
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
2829
2829
|
formatSyntaxKind(this.kind);
|
|
2830
|
-
return ""
|
|
2830
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
2831
2831
|
}
|
|
2832
2832
|
},
|
|
2833
2833
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -2874,10 +2874,10 @@ var ts;
|
|
|
2874
2874
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
2875
2875
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
2876
2876
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
2877
|
-
deprecationMessage += "'"
|
|
2878
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
2879
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
2880
|
-
deprecationMessage += message ? " "
|
|
2877
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
2878
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
2879
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
2880
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
2881
2881
|
return deprecationMessage;
|
|
2882
2882
|
}
|
|
2883
2883
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -3008,11 +3008,11 @@ var ts;
|
|
|
3008
3008
|
}
|
|
3009
3009
|
};
|
|
3010
3010
|
Version.prototype.toString = function () {
|
|
3011
|
-
var result = this.major
|
|
3011
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
3012
3012
|
if (ts.some(this.prerelease))
|
|
3013
|
-
result += "-"
|
|
3013
|
+
result += "-".concat(this.prerelease.join("."));
|
|
3014
3014
|
if (ts.some(this.build))
|
|
3015
|
-
result += "+"
|
|
3015
|
+
result += "+".concat(this.build.join("."));
|
|
3016
3016
|
return result;
|
|
3017
3017
|
};
|
|
3018
3018
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -3279,7 +3279,7 @@ var ts;
|
|
|
3279
3279
|
return ts.map(comparators, formatComparator).join(" ");
|
|
3280
3280
|
}
|
|
3281
3281
|
function formatComparator(comparator) {
|
|
3282
|
-
return ""
|
|
3282
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
3283
3283
|
}
|
|
3284
3284
|
})(ts || (ts = {}));
|
|
3285
3285
|
/*@internal*/
|
|
@@ -3577,7 +3577,7 @@ var ts;
|
|
|
3577
3577
|
fs = require("fs");
|
|
3578
3578
|
}
|
|
3579
3579
|
catch (e) {
|
|
3580
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
3580
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
3581
3581
|
}
|
|
3582
3582
|
}
|
|
3583
3583
|
mode = tracingMode;
|
|
@@ -3589,11 +3589,11 @@ var ts;
|
|
|
3589
3589
|
if (!fs.existsSync(traceDir)) {
|
|
3590
3590
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
3591
3591
|
}
|
|
3592
|
-
var countPart = mode === "build" ? "."
|
|
3593
|
-
: mode === "server" ? "."
|
|
3592
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
3593
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
3594
3594
|
: "";
|
|
3595
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
3596
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
3595
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
3596
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
3597
3597
|
legend.push({
|
|
3598
3598
|
configFilePath: configFilePath,
|
|
3599
3599
|
tracePath: tracePath,
|
|
@@ -3683,7 +3683,7 @@ var ts;
|
|
|
3683
3683
|
}
|
|
3684
3684
|
// test if [time,endTime) straddles a sampling point
|
|
3685
3685
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3686
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3686
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3687
3687
|
}
|
|
3688
3688
|
}
|
|
3689
3689
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3692,11 +3692,11 @@ var ts;
|
|
|
3692
3692
|
if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
|
|
3693
3693
|
return;
|
|
3694
3694
|
ts.performance.mark("beginTracing");
|
|
3695
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3695
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3696
3696
|
if (extras)
|
|
3697
|
-
fs.writeSync(traceFd, ","
|
|
3697
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3698
3698
|
if (args)
|
|
3699
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3699
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3700
3700
|
fs.writeSync(traceFd, "}");
|
|
3701
3701
|
ts.performance.mark("endTracing");
|
|
3702
3702
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -4873,8 +4873,6 @@ var ts;
|
|
|
4873
4873
|
// 'Narrowable' types are types where narrowing actually narrows.
|
|
4874
4874
|
// This *should* be every type other than null, undefined, void, and never
|
|
4875
4875
|
TypeFlags[TypeFlags["Narrowable"] = 536624127] = "Narrowable";
|
|
4876
|
-
/* @internal */
|
|
4877
|
-
TypeFlags[TypeFlags["NotPrimitiveUnion"] = 468598819] = "NotPrimitiveUnion";
|
|
4878
4876
|
// The following flags are aggregated during union and intersection type construction
|
|
4879
4877
|
/* @internal */
|
|
4880
4878
|
TypeFlags[TypeFlags["IncludesMask"] = 205258751] = "IncludesMask";
|
|
@@ -4887,6 +4885,10 @@ var ts;
|
|
|
4887
4885
|
TypeFlags[TypeFlags["IncludesWildcard"] = 8388608] = "IncludesWildcard";
|
|
4888
4886
|
/* @internal */
|
|
4889
4887
|
TypeFlags[TypeFlags["IncludesEmptyObject"] = 16777216] = "IncludesEmptyObject";
|
|
4888
|
+
/* @internal */
|
|
4889
|
+
TypeFlags[TypeFlags["IncludesInstantiable"] = 33554432] = "IncludesInstantiable";
|
|
4890
|
+
/* @internal */
|
|
4891
|
+
TypeFlags[TypeFlags["NotPrimitiveUnion"] = 36323363] = "NotPrimitiveUnion";
|
|
4890
4892
|
})(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
|
|
4891
4893
|
// Types included in TypeFlags.ObjectFlagsType have an objectFlags property. Some ObjectFlags
|
|
4892
4894
|
// are specific to certain types and reuse the same bit position. Those ObjectFlags require a check
|
|
@@ -6501,7 +6503,7 @@ var ts;
|
|
|
6501
6503
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
6502
6504
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
6503
6505
|
function getLevel(envVar, level) {
|
|
6504
|
-
return system.getEnvironmentVariable(envVar
|
|
6506
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
6505
6507
|
}
|
|
6506
6508
|
function getCustomLevels(baseVariable) {
|
|
6507
6509
|
var customLevels;
|
|
@@ -6966,7 +6968,7 @@ var ts;
|
|
|
6966
6968
|
}
|
|
6967
6969
|
function onTimerToUpdateChildWatches() {
|
|
6968
6970
|
timerToUpdateChildWatches = undefined;
|
|
6969
|
-
ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
6971
|
+
ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
6970
6972
|
var start = ts.timestamp();
|
|
6971
6973
|
var invokeMap = new ts.Map();
|
|
6972
6974
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -6979,7 +6981,7 @@ var ts;
|
|
|
6979
6981
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
6980
6982
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
6981
6983
|
}
|
|
6982
|
-
ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
6984
|
+
ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
6983
6985
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
6984
6986
|
var existing = invokeMap.get(rootDirName);
|
|
6985
6987
|
if (existing) {
|
|
@@ -6995,7 +6997,7 @@ var ts;
|
|
|
6995
6997
|
}
|
|
6996
6998
|
});
|
|
6997
6999
|
var elapsed = ts.timestamp() - start;
|
|
6998
|
-
ts.sysLog("sysLog:: Elapsed:: "
|
|
7000
|
+
ts.sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
6999
7001
|
}
|
|
7000
7002
|
function removeChildWatches(parentWatcher) {
|
|
7001
7003
|
if (!parentWatcher)
|
|
@@ -7455,7 +7457,7 @@ var ts;
|
|
|
7455
7457
|
var remappedPaths = new ts.Map();
|
|
7456
7458
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
7457
7459
|
// Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
|
|
7458
|
-
var fileUrlRoot = "file://"
|
|
7460
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
7459
7461
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
7460
7462
|
var node = _a[_i];
|
|
7461
7463
|
if (node.callFrame.url) {
|
|
@@ -7464,7 +7466,7 @@ var ts;
|
|
|
7464
7466
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
|
|
7465
7467
|
}
|
|
7466
7468
|
else if (!nativePattern.test(url)) {
|
|
7467
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
7469
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
7468
7470
|
externalFileCounter++;
|
|
7469
7471
|
}
|
|
7470
7472
|
}
|
|
@@ -7480,7 +7482,7 @@ var ts;
|
|
|
7480
7482
|
if (!err) {
|
|
7481
7483
|
try {
|
|
7482
7484
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7483
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
7485
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
7484
7486
|
}
|
|
7485
7487
|
}
|
|
7486
7488
|
catch (_c) {
|
|
@@ -7582,7 +7584,7 @@ var ts;
|
|
|
7582
7584
|
* @param createWatcher
|
|
7583
7585
|
*/
|
|
7584
7586
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
7585
|
-
ts.sysLog("sysLog:: "
|
|
7587
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
7586
7588
|
// Call the callback for current directory
|
|
7587
7589
|
callback("rename", "");
|
|
7588
7590
|
// If watcher is not closed, update it
|
|
@@ -7607,7 +7609,7 @@ var ts;
|
|
|
7607
7609
|
}
|
|
7608
7610
|
}
|
|
7609
7611
|
if (hitSystemWatcherLimit) {
|
|
7610
|
-
ts.sysLog("sysLog:: "
|
|
7612
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
7611
7613
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7612
7614
|
}
|
|
7613
7615
|
try {
|
|
@@ -7623,7 +7625,7 @@ var ts;
|
|
|
7623
7625
|
// 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
|
|
7624
7626
|
// so instead of throwing error, use fs.watchFile
|
|
7625
7627
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
7626
|
-
ts.sysLog("sysLog:: "
|
|
7628
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
7627
7629
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7628
7630
|
}
|
|
7629
7631
|
}
|
|
@@ -7761,7 +7763,7 @@ var ts;
|
|
|
7761
7763
|
}
|
|
7762
7764
|
}
|
|
7763
7765
|
function readDirectory(path, extensions, excludes, includes, depth) {
|
|
7764
|
-
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath
|
|
7766
|
+
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
7765
7767
|
}
|
|
7766
7768
|
function fileSystemEntryExists(path, entryKind) {
|
|
7767
7769
|
// Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve
|
|
@@ -9925,7 +9927,7 @@ var ts;
|
|
|
9925
9927
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
9926
9928
|
}
|
|
9927
9929
|
else {
|
|
9928
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
9930
|
+
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"));
|
|
9929
9931
|
}
|
|
9930
9932
|
}
|
|
9931
9933
|
var res = lineStarts[line] + character;
|
|
@@ -12805,7 +12807,7 @@ var ts;
|
|
|
12805
12807
|
return typeof comment === "string" ? comment
|
|
12806
12808
|
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) {
|
|
12807
12809
|
// TODO: Other kinds here
|
|
12808
|
-
return c.kind === 319 /* JSDocText */ ? c.text : "{@link "
|
|
12810
|
+
return c.kind === 319 /* JSDocText */ ? c.text : "{@link ".concat(c.name ? ts.entityNameToString(c.name) + " " : "").concat(c.text, "}");
|
|
12809
12811
|
}).join("");
|
|
12810
12812
|
}
|
|
12811
12813
|
ts.getTextOfJSDocComment = getTextOfJSDocComment;
|
|
@@ -14075,8 +14077,8 @@ var ts;
|
|
|
14075
14077
|
}
|
|
14076
14078
|
function packageIdToString(_a) {
|
|
14077
14079
|
var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
|
|
14078
|
-
var fullName = subModuleName ? name
|
|
14079
|
-
return fullName
|
|
14080
|
+
var fullName = subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
14081
|
+
return "".concat(fullName, "@").concat(version);
|
|
14080
14082
|
}
|
|
14081
14083
|
ts.packageIdToString = packageIdToString;
|
|
14082
14084
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -14155,7 +14157,7 @@ var ts;
|
|
|
14155
14157
|
function nodePosToString(node) {
|
|
14156
14158
|
var file = getSourceFileOfNode(node);
|
|
14157
14159
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
14158
|
-
return file.fileName
|
|
14160
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
14159
14161
|
}
|
|
14160
14162
|
ts.nodePosToString = nodePosToString;
|
|
14161
14163
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -14294,7 +14296,7 @@ var ts;
|
|
|
14294
14296
|
ts.isPinnedComment = isPinnedComment;
|
|
14295
14297
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
14296
14298
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
14297
|
-
""
|
|
14299
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
14298
14300
|
commentDirective,
|
|
14299
14301
|
]); }));
|
|
14300
14302
|
var usedLines = new ts.Map();
|
|
@@ -14311,10 +14313,10 @@ var ts;
|
|
|
14311
14313
|
});
|
|
14312
14314
|
}
|
|
14313
14315
|
function markUsed(line) {
|
|
14314
|
-
if (!directivesByLine.has(""
|
|
14316
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
14315
14317
|
return false;
|
|
14316
14318
|
}
|
|
14317
|
-
usedLines.set(""
|
|
14319
|
+
usedLines.set("".concat(line), true);
|
|
14318
14320
|
return true;
|
|
14319
14321
|
}
|
|
14320
14322
|
}
|
|
@@ -14529,7 +14531,7 @@ var ts;
|
|
|
14529
14531
|
}
|
|
14530
14532
|
return node.text;
|
|
14531
14533
|
}
|
|
14532
|
-
return ts.Debug.fail("Literal kind '"
|
|
14534
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
14533
14535
|
}
|
|
14534
14536
|
ts.getLiteralText = getLiteralText;
|
|
14535
14537
|
function canUseOriginalText(node, flags) {
|
|
@@ -17060,11 +17062,11 @@ var ts;
|
|
|
17060
17062
|
}
|
|
17061
17063
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
17062
17064
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
17063
|
-
return "__@"
|
|
17065
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
17064
17066
|
}
|
|
17065
17067
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
17066
17068
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
17067
|
-
return "__#"
|
|
17069
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
17068
17070
|
}
|
|
17069
17071
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
17070
17072
|
function isKnownSymbol(symbol) {
|
|
@@ -19757,7 +19759,7 @@ var ts;
|
|
|
19757
19759
|
}
|
|
19758
19760
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
19759
19761
|
function getJSXRuntimeImport(base, options) {
|
|
19760
|
-
return base ? base
|
|
19762
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
19761
19763
|
}
|
|
19762
19764
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
19763
19765
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -19874,7 +19876,7 @@ var ts;
|
|
|
19874
19876
|
}
|
|
19875
19877
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
19876
19878
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
19877
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
19879
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
19878
19880
|
var filesMatcher = {
|
|
19879
19881
|
/**
|
|
19880
19882
|
* Matches any single directory segment unless it is the last segment and a .min.js file
|
|
@@ -19887,7 +19889,7 @@ var ts;
|
|
|
19887
19889
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
19888
19890
|
* files or directories, does not match subdirectories that start with a . character
|
|
19889
19891
|
*/
|
|
19890
|
-
doubleAsteriskRegexFragment: "(/"
|
|
19892
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
19891
19893
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
19892
19894
|
};
|
|
19893
19895
|
var directoriesMatcher = {
|
|
@@ -19896,7 +19898,7 @@ var ts;
|
|
|
19896
19898
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
19897
19899
|
* files or directories, does not match subdirectories that start with a . character
|
|
19898
19900
|
*/
|
|
19899
|
-
doubleAsteriskRegexFragment: "(/"
|
|
19901
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
19900
19902
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
19901
19903
|
};
|
|
19902
19904
|
var excludeMatcher = {
|
|
@@ -19914,10 +19916,10 @@ var ts;
|
|
|
19914
19916
|
if (!patterns || !patterns.length) {
|
|
19915
19917
|
return undefined;
|
|
19916
19918
|
}
|
|
19917
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
19919
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
19918
19920
|
// If excluding, match "foo/bar/baz...", but if including, only allow "foo".
|
|
19919
19921
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
19920
|
-
return "^("
|
|
19922
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
19921
19923
|
}
|
|
19922
19924
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
19923
19925
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -19939,7 +19941,7 @@ var ts;
|
|
|
19939
19941
|
ts.isImplicitGlob = isImplicitGlob;
|
|
19940
19942
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
19941
19943
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
19942
|
-
return pattern && "^("
|
|
19944
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
19943
19945
|
}
|
|
19944
19946
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
19945
19947
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -20017,11 +20019,11 @@ var ts;
|
|
|
20017
20019
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20018
20020
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
20019
20021
|
return {
|
|
20020
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
20022
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
20021
20023
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
20022
20024
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
20023
20025
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
20024
|
-
basePaths: getBasePaths(
|
|
20026
|
+
basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
|
|
20025
20027
|
};
|
|
20026
20028
|
}
|
|
20027
20029
|
ts.getFileMatcherPatterns = getFileMatcherPatterns;
|
|
@@ -20030,7 +20032,7 @@ var ts;
|
|
|
20030
20032
|
}
|
|
20031
20033
|
ts.getRegexFromPattern = getRegexFromPattern;
|
|
20032
20034
|
/** @param path directory of the tsconfig.json */
|
|
20033
|
-
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath
|
|
20035
|
+
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
20034
20036
|
path = ts.normalizePath(path);
|
|
20035
20037
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20036
20038
|
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
|
|
@@ -20043,20 +20045,18 @@ var ts;
|
|
|
20043
20045
|
var visited = new ts.Map();
|
|
20044
20046
|
var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
20045
20047
|
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
|
|
20046
|
-
var
|
|
20047
|
-
|
|
20048
|
-
visitDirectory(absoluteBasePath, depth);
|
|
20049
|
-
}
|
|
20048
|
+
var basePath = _a[_i];
|
|
20049
|
+
visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth);
|
|
20050
20050
|
}
|
|
20051
20051
|
return ts.flatten(results);
|
|
20052
|
-
function visitDirectory(absolutePath, depth) {
|
|
20052
|
+
function visitDirectory(path, absolutePath, depth) {
|
|
20053
20053
|
var canonicalPath = toCanonical(realpath(absolutePath));
|
|
20054
20054
|
if (visited.has(canonicalPath))
|
|
20055
20055
|
return;
|
|
20056
20056
|
visited.set(canonicalPath, true);
|
|
20057
|
-
var _a = getFileSystemEntries(
|
|
20057
|
+
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
|
|
20058
20058
|
var _loop_1 = function (current) {
|
|
20059
|
-
var name = ts.combinePaths(
|
|
20059
|
+
var name = ts.combinePaths(path, current);
|
|
20060
20060
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
20061
20061
|
if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
|
|
20062
20062
|
return "continue";
|
|
@@ -20084,10 +20084,11 @@ var ts;
|
|
|
20084
20084
|
}
|
|
20085
20085
|
for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
|
|
20086
20086
|
var current = _d[_c];
|
|
20087
|
+
var name = ts.combinePaths(path, current);
|
|
20087
20088
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
20088
20089
|
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
|
|
20089
20090
|
(!excludeRegex || !excludeRegex.test(absoluteName))) {
|
|
20090
|
-
visitDirectory(absoluteName, depth);
|
|
20091
|
+
visitDirectory(name, absoluteName, depth);
|
|
20091
20092
|
}
|
|
20092
20093
|
}
|
|
20093
20094
|
}
|
|
@@ -20095,11 +20096,10 @@ var ts;
|
|
|
20095
20096
|
ts.matchFiles = matchFiles;
|
|
20096
20097
|
/**
|
|
20097
20098
|
* Computes the unique non-wildcard base paths amongst the provided include patterns.
|
|
20098
|
-
* @returns Absolute directory paths
|
|
20099
20099
|
*/
|
|
20100
|
-
function getBasePaths(
|
|
20100
|
+
function getBasePaths(path, includes, useCaseSensitiveFileNames) {
|
|
20101
20101
|
// Storage for our results in the form of literal paths (e.g. the paths as written by the user).
|
|
20102
|
-
var basePaths = [
|
|
20102
|
+
var basePaths = [path];
|
|
20103
20103
|
if (includes) {
|
|
20104
20104
|
// Storage for literal base paths amongst the include patterns.
|
|
20105
20105
|
var includeBasePaths = [];
|
|
@@ -20107,14 +20107,14 @@ var ts;
|
|
|
20107
20107
|
var include = includes_1[_i];
|
|
20108
20108
|
// We also need to check the relative paths by converting them to absolute and normalizing
|
|
20109
20109
|
// in case they escape the base path (e.g "..\somedirectory")
|
|
20110
|
-
var
|
|
20110
|
+
var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include));
|
|
20111
20111
|
// Append the literal and canonical candidate base paths.
|
|
20112
|
-
includeBasePaths.push(getIncludeBasePath(
|
|
20112
|
+
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
20113
20113
|
}
|
|
20114
20114
|
// Sort the offsets array using either the literal or canonical path representations.
|
|
20115
20115
|
includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
|
|
20116
20116
|
var _loop_2 = function (includeBasePath) {
|
|
20117
|
-
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath,
|
|
20117
|
+
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
|
|
20118
20118
|
basePaths.push(includeBasePath);
|
|
20119
20119
|
}
|
|
20120
20120
|
};
|
|
@@ -20300,7 +20300,7 @@ var ts;
|
|
|
20300
20300
|
*/
|
|
20301
20301
|
function extensionFromPath(path) {
|
|
20302
20302
|
var ext = tryGetExtensionFromPath(path);
|
|
20303
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
20303
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
20304
20304
|
}
|
|
20305
20305
|
ts.extensionFromPath = extensionFromPath;
|
|
20306
20306
|
function isAnySupportedFileExtension(path) {
|
|
@@ -26289,7 +26289,7 @@ var ts;
|
|
|
26289
26289
|
case 326 /* JSDocAugmentsTag */: return "augments";
|
|
26290
26290
|
case 327 /* JSDocImplementsTag */: return "implements";
|
|
26291
26291
|
default:
|
|
26292
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
26292
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
26293
26293
|
}
|
|
26294
26294
|
}
|
|
26295
26295
|
var rawTextScanner;
|
|
@@ -26617,7 +26617,7 @@ var ts;
|
|
|
26617
26617
|
};
|
|
26618
26618
|
var definedTextGetter_1 = function (path) {
|
|
26619
26619
|
var result = textGetter_1(path);
|
|
26620
|
-
return result !== undefined ? result : "/* Input file "
|
|
26620
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
26621
26621
|
};
|
|
26622
26622
|
var buildInfo_1;
|
|
26623
26623
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -31155,7 +31155,7 @@ var ts;
|
|
|
31155
31155
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
31156
31156
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
31157
31157
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
31158
|
-
return keyword
|
|
31158
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
31159
31159
|
}
|
|
31160
31160
|
}
|
|
31161
31161
|
return undefined;
|
|
@@ -37919,7 +37919,7 @@ var ts;
|
|
|
37919
37919
|
if (namedArgRegExCache.has(name)) {
|
|
37920
37920
|
return namedArgRegExCache.get(name);
|
|
37921
37921
|
}
|
|
37922
|
-
var result = new RegExp("(\\s"
|
|
37922
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
37923
37923
|
namedArgRegExCache.set(name, result);
|
|
37924
37924
|
return result;
|
|
37925
37925
|
}
|
|
@@ -39381,8 +39381,8 @@ var ts;
|
|
|
39381
39381
|
}
|
|
39382
39382
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
39383
39383
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
39384
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
39385
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
39384
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
39385
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
39386
39386
|
}
|
|
39387
39387
|
/* @internal */
|
|
39388
39388
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -40176,10 +40176,10 @@ var ts;
|
|
|
40176
40176
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
40177
40177
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
40178
40178
|
if (newValue !== defaultValue) {
|
|
40179
|
-
result.push(""
|
|
40179
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
40180
40180
|
}
|
|
40181
40181
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
40182
|
-
result.push(""
|
|
40182
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
40183
40183
|
}
|
|
40184
40184
|
});
|
|
40185
40185
|
return result.join(newLine) + newLine;
|
|
@@ -40230,19 +40230,19 @@ var ts;
|
|
|
40230
40230
|
if (entries.length !== 0) {
|
|
40231
40231
|
entries.push({ value: "" });
|
|
40232
40232
|
}
|
|
40233
|
-
entries.push({ value: "/* "
|
|
40233
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
40234
40234
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
40235
40235
|
var option = options_1[_i];
|
|
40236
40236
|
var optionName = void 0;
|
|
40237
40237
|
if (compilerOptionsMap.has(option.name)) {
|
|
40238
|
-
optionName = "\""
|
|
40238
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
40239
40239
|
}
|
|
40240
40240
|
else {
|
|
40241
|
-
optionName = "// \""
|
|
40241
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
40242
40242
|
}
|
|
40243
40243
|
entries.push({
|
|
40244
40244
|
value: optionName,
|
|
40245
|
-
description: "/* "
|
|
40245
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
40246
40246
|
});
|
|
40247
40247
|
marginLength = Math.max(optionName.length, marginLength);
|
|
40248
40248
|
}
|
|
@@ -40251,25 +40251,25 @@ var ts;
|
|
|
40251
40251
|
var tab = makePadding(2);
|
|
40252
40252
|
var result = [];
|
|
40253
40253
|
result.push("{");
|
|
40254
|
-
result.push(tab
|
|
40255
|
-
result.push(""
|
|
40254
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
40255
|
+
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), " */"));
|
|
40256
40256
|
result.push("");
|
|
40257
40257
|
// Print out each row, aligning all the descriptions on the same column.
|
|
40258
40258
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
40259
40259
|
var entry = entries_2[_a];
|
|
40260
40260
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
40261
|
-
result.push(value && ""
|
|
40261
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
40262
40262
|
}
|
|
40263
40263
|
if (fileNames.length) {
|
|
40264
|
-
result.push(tab
|
|
40265
|
-
result.push(tab
|
|
40264
|
+
result.push("".concat(tab, "},"));
|
|
40265
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
40266
40266
|
for (var i = 0; i < fileNames.length; i++) {
|
|
40267
|
-
result.push(""
|
|
40267
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
40268
40268
|
}
|
|
40269
|
-
result.push(tab
|
|
40269
|
+
result.push("".concat(tab, "]"));
|
|
40270
40270
|
}
|
|
40271
40271
|
else {
|
|
40272
|
-
result.push(tab
|
|
40272
|
+
result.push("".concat(tab, "}"));
|
|
40273
40273
|
}
|
|
40274
40274
|
result.push("}");
|
|
40275
40275
|
return result.join(newLine) + newLine;
|
|
@@ -40667,7 +40667,7 @@ var ts;
|
|
|
40667
40667
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
40668
40668
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
40669
40669
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
|
|
40670
|
-
extendedConfigPath = extendedConfigPath
|
|
40670
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
40671
40671
|
if (!host.fileExists(extendedConfigPath)) {
|
|
40672
40672
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
40673
40673
|
return undefined;
|
|
@@ -40912,7 +40912,7 @@ var ts;
|
|
|
40912
40912
|
// Valid only if *.json specified
|
|
40913
40913
|
if (!jsonOnlyIncludeRegexes) {
|
|
40914
40914
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
|
|
40915
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
40915
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
40916
40916
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
40917
40917
|
}
|
|
40918
40918
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -41348,7 +41348,7 @@ var ts;
|
|
|
41348
41348
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
41349
41349
|
if (typeof bestVersionPaths !== "object") {
|
|
41350
41350
|
if (state.traceEnabled) {
|
|
41351
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
41351
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
41352
41352
|
}
|
|
41353
41353
|
return;
|
|
41354
41354
|
}
|
|
@@ -41459,7 +41459,10 @@ var ts;
|
|
|
41459
41459
|
}
|
|
41460
41460
|
}
|
|
41461
41461
|
var failedLookupLocations = [];
|
|
41462
|
-
var
|
|
41462
|
+
var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
|
|
41463
|
+
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
41464
|
+
NodeResolutionFeatures.None;
|
|
41465
|
+
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
|
|
41463
41466
|
var resolved = primaryLookup();
|
|
41464
41467
|
var primary = true;
|
|
41465
41468
|
if (!resolved) {
|
|
@@ -41726,7 +41729,7 @@ var ts;
|
|
|
41726
41729
|
};
|
|
41727
41730
|
return cache;
|
|
41728
41731
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
41729
|
-
var result = mode === undefined ? specifier : mode
|
|
41732
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
41730
41733
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
41731
41734
|
return result;
|
|
41732
41735
|
}
|
|
@@ -41757,7 +41760,7 @@ var ts;
|
|
|
41757
41760
|
}
|
|
41758
41761
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
41759
41762
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
41760
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
41763
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
41761
41764
|
}
|
|
41762
41765
|
function createPerModuleNameCache() {
|
|
41763
41766
|
var directoryPathMap = new ts.Map();
|
|
@@ -41904,10 +41907,10 @@ var ts;
|
|
|
41904
41907
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
41905
41908
|
break;
|
|
41906
41909
|
default:
|
|
41907
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
41910
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
41908
41911
|
}
|
|
41909
41912
|
if (result && result.resolvedModule)
|
|
41910
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
41913
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
41911
41914
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
41912
41915
|
if (perFolderCache) {
|
|
41913
41916
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -42110,7 +42113,7 @@ var ts;
|
|
|
42110
42113
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
42111
42114
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
42112
42115
|
if (!resolvedModule) {
|
|
42113
|
-
throw new Error("Could not resolve JS module '"
|
|
42116
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
42114
42117
|
}
|
|
42115
42118
|
return resolvedModule.resolvedFileName;
|
|
42116
42119
|
}
|
|
@@ -42134,13 +42137,15 @@ var ts;
|
|
|
42134
42137
|
// not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
|
|
42135
42138
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
42136
42139
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
42140
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
|
|
42141
|
+
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
42137
42142
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
42138
42143
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
42139
42144
|
function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42140
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42145
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42141
42146
|
}
|
|
42142
42147
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42143
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42148
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42144
42149
|
}
|
|
42145
42150
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42146
42151
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
@@ -42223,7 +42228,7 @@ var ts;
|
|
|
42223
42228
|
if (traceEnabled) {
|
|
42224
42229
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
42225
42230
|
}
|
|
42226
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
42231
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
42227
42232
|
return real;
|
|
42228
42233
|
}
|
|
42229
42234
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -42609,7 +42614,7 @@ var ts;
|
|
|
42609
42614
|
return undefined;
|
|
42610
42615
|
}
|
|
42611
42616
|
var trailingParts = parts.slice(nameParts.length);
|
|
42612
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
42617
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
42613
42618
|
}
|
|
42614
42619
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
42615
42620
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -42937,7 +42942,7 @@ var ts;
|
|
|
42937
42942
|
}
|
|
42938
42943
|
/* @internal */
|
|
42939
42944
|
function getTypesPackageName(packageName) {
|
|
42940
|
-
return "@types/"
|
|
42945
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
42941
42946
|
}
|
|
42942
42947
|
ts.getTypesPackageName = getTypesPackageName;
|
|
42943
42948
|
/* @internal */
|
|
@@ -43338,7 +43343,7 @@ var ts;
|
|
|
43338
43343
|
if (name) {
|
|
43339
43344
|
if (ts.isAmbientModule(node)) {
|
|
43340
43345
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
43341
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
43346
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
43342
43347
|
}
|
|
43343
43348
|
if (name.kind === 161 /* ComputedPropertyName */) {
|
|
43344
43349
|
var nameExpression = name.expression;
|
|
@@ -43395,7 +43400,7 @@ var ts;
|
|
|
43395
43400
|
case 163 /* Parameter */:
|
|
43396
43401
|
// Parameters with names are handled at the top of this function. Parameters
|
|
43397
43402
|
// without names can only come from JSDocFunctionTypes.
|
|
43398
|
-
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: "
|
|
43403
|
+
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"); });
|
|
43399
43404
|
var functionType = node.parent;
|
|
43400
43405
|
var index = functionType.parameters.indexOf(node);
|
|
43401
43406
|
return "arg" + index;
|
|
@@ -43507,7 +43512,7 @@ var ts;
|
|
|
43507
43512
|
var relatedInformation_1 = [];
|
|
43508
43513
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
|
|
43509
43514
|
// export type T; - may have meant export type { T }?
|
|
43510
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
43515
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
43511
43516
|
}
|
|
43512
43517
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
43513
43518
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -45580,7 +45585,7 @@ var ts;
|
|
|
45580
45585
|
}
|
|
45581
45586
|
}
|
|
45582
45587
|
function bindSourceFileAsExternalModule() {
|
|
45583
|
-
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\""
|
|
45588
|
+
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
45584
45589
|
}
|
|
45585
45590
|
function bindExportAssignment(node) {
|
|
45586
45591
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -47669,7 +47674,7 @@ var ts;
|
|
|
47669
47674
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
47670
47675
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
47671
47676
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
47672
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
47677
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
47673
47678
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
47674
47679
|
});
|
|
47675
47680
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -48103,11 +48108,12 @@ var ts;
|
|
|
48103
48108
|
*
|
|
48104
48109
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48105
48110
|
*/
|
|
48106
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48111
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
48107
48112
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48108
|
-
|
|
48113
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
48114
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
48109
48115
|
}
|
|
48110
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48116
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
48111
48117
|
var _a, _b, _c;
|
|
48112
48118
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48113
48119
|
var result;
|
|
@@ -48424,7 +48430,7 @@ var ts;
|
|
|
48424
48430
|
}
|
|
48425
48431
|
}
|
|
48426
48432
|
if (!result) {
|
|
48427
|
-
if (nameNotFoundMessage) {
|
|
48433
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48428
48434
|
if (!errorLocation ||
|
|
48429
48435
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
|
|
48430
48436
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -48434,7 +48440,7 @@ var ts;
|
|
|
48434
48440
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48435
48441
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48436
48442
|
var suggestion = void 0;
|
|
48437
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
48443
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
48438
48444
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48439
48445
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48440
48446
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48470,7 +48476,7 @@ var ts;
|
|
|
48470
48476
|
return undefined;
|
|
48471
48477
|
}
|
|
48472
48478
|
// Perform extra checks only if error reporting was requested
|
|
48473
|
-
if (nameNotFoundMessage) {
|
|
48479
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48474
48480
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
|
|
48475
48481
|
// We have a match, but the reference occurred within a property initializer and the identifier also binds
|
|
48476
48482
|
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
|
|
@@ -50308,7 +50314,7 @@ var ts;
|
|
|
50308
50314
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
50309
50315
|
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
|
50310
50316
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
50311
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
50317
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
50312
50318
|
if (cache.has(key)) {
|
|
50313
50319
|
return cache.get(key);
|
|
50314
50320
|
}
|
|
@@ -51156,7 +51162,7 @@ var ts;
|
|
|
51156
51162
|
context.symbolDepth = new ts.Map();
|
|
51157
51163
|
}
|
|
51158
51164
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
51159
|
-
var key = getTypeId(type)
|
|
51165
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
51160
51166
|
if (links) {
|
|
51161
51167
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
51162
51168
|
}
|
|
@@ -51425,7 +51431,7 @@ var ts;
|
|
|
51425
51431
|
}
|
|
51426
51432
|
}
|
|
51427
51433
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
51428
|
-
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... "
|
|
51434
|
+
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
|
|
51429
51435
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
51430
51436
|
break;
|
|
51431
51437
|
}
|
|
@@ -51540,7 +51546,7 @@ var ts;
|
|
|
51540
51546
|
else if (types.length > 2) {
|
|
51541
51547
|
return [
|
|
51542
51548
|
typeToTypeNodeHelper(types[0], context),
|
|
51543
|
-
ts.factory.createTypeReferenceNode("... "
|
|
51549
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
|
|
51544
51550
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
51545
51551
|
];
|
|
51546
51552
|
}
|
|
@@ -51554,7 +51560,7 @@ var ts;
|
|
|
51554
51560
|
var type = types_2[_i];
|
|
51555
51561
|
i++;
|
|
51556
51562
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
51557
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
51563
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
|
|
51558
51564
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
51559
51565
|
if (typeNode_1) {
|
|
51560
51566
|
result_5.push(typeNode_1);
|
|
@@ -52062,7 +52068,7 @@ var ts;
|
|
|
52062
52068
|
var text = rawtext;
|
|
52063
52069
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
52064
52070
|
i++;
|
|
52065
|
-
text = rawtext
|
|
52071
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
52066
52072
|
}
|
|
52067
52073
|
if (text !== rawtext) {
|
|
52068
52074
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -52388,7 +52394,7 @@ var ts;
|
|
|
52388
52394
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
52389
52395
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
52390
52396
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
52391
|
-
: "arg"
|
|
52397
|
+
: "arg".concat(index);
|
|
52392
52398
|
}
|
|
52393
52399
|
function rewriteModuleSpecifier(parent, lit) {
|
|
52394
52400
|
if (bundled) {
|
|
@@ -53473,7 +53479,7 @@ var ts;
|
|
|
53473
53479
|
return results_1;
|
|
53474
53480
|
}
|
|
53475
53481
|
// The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
|
|
53476
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
53482
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
53477
53483
|
};
|
|
53478
53484
|
}
|
|
53479
53485
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -53548,7 +53554,7 @@ var ts;
|
|
|
53548
53554
|
if (ref) {
|
|
53549
53555
|
return ref;
|
|
53550
53556
|
}
|
|
53551
|
-
var tempName = getUnusedName(rootName
|
|
53557
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
53552
53558
|
var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
53553
53559
|
ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
|
|
53554
53560
|
], 2 /* Const */));
|
|
@@ -53595,7 +53601,7 @@ var ts;
|
|
|
53595
53601
|
var original = input;
|
|
53596
53602
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
53597
53603
|
i++;
|
|
53598
|
-
input = original
|
|
53604
|
+
input = "".concat(original, "_").concat(i);
|
|
53599
53605
|
}
|
|
53600
53606
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
53601
53607
|
if (id) {
|
|
@@ -53703,15 +53709,15 @@ var ts;
|
|
|
53703
53709
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
53704
53710
|
var name = "" + nameType.value;
|
|
53705
53711
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
|
|
53706
|
-
return "\""
|
|
53712
|
+
return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
|
|
53707
53713
|
}
|
|
53708
53714
|
if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
53709
|
-
return "["
|
|
53715
|
+
return "[".concat(name, "]");
|
|
53710
53716
|
}
|
|
53711
53717
|
return name;
|
|
53712
53718
|
}
|
|
53713
53719
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
53714
|
-
return "["
|
|
53720
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
53715
53721
|
}
|
|
53716
53722
|
}
|
|
53717
53723
|
}
|
|
@@ -56485,7 +56491,7 @@ var ts;
|
|
|
56485
56491
|
!leftName ? rightName :
|
|
56486
56492
|
!rightName ? leftName :
|
|
56487
56493
|
undefined;
|
|
56488
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
56494
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
56489
56495
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
56490
56496
|
params[i] = paramSymbol;
|
|
56491
56497
|
}
|
|
@@ -58404,7 +58410,7 @@ var ts;
|
|
|
58404
58410
|
return result;
|
|
58405
58411
|
}
|
|
58406
58412
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
58407
|
-
return aliasSymbol ? "@"
|
|
58413
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
58408
58414
|
}
|
|
58409
58415
|
// This function is used to propagate certain flags when creating new object type references and union types.
|
|
58410
58416
|
// It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
|
|
@@ -58590,7 +58596,7 @@ var ts;
|
|
|
58590
58596
|
return undefined;
|
|
58591
58597
|
}
|
|
58592
58598
|
function getSymbolPath(symbol) {
|
|
58593
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
58599
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
58594
58600
|
}
|
|
58595
58601
|
function getUnresolvedSymbolForEntityName(name) {
|
|
58596
58602
|
var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
|
|
@@ -58601,7 +58607,7 @@ var ts;
|
|
|
58601
58607
|
var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
|
|
58602
58608
|
name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
58603
58609
|
undefined;
|
|
58604
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
58610
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
58605
58611
|
var result = unresolvedSymbols.get(path);
|
|
58606
58612
|
if (!result) {
|
|
58607
58613
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
@@ -58674,7 +58680,7 @@ var ts;
|
|
|
58674
58680
|
if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
|
|
58675
58681
|
return baseType;
|
|
58676
58682
|
}
|
|
58677
|
-
var id = getTypeId(baseType)
|
|
58683
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
58678
58684
|
var cached = substitutionTypes.get(id);
|
|
58679
58685
|
if (cached) {
|
|
58680
58686
|
return cached;
|
|
@@ -58875,7 +58881,7 @@ var ts;
|
|
|
58875
58881
|
}
|
|
58876
58882
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
58877
58883
|
// Don't track references for global symbols anyway, so value if `isReference` is arbitrary
|
|
58878
|
-
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
|
|
58884
|
+
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
|
|
58879
58885
|
}
|
|
58880
58886
|
function getGlobalType(name, arity, reportErrors) {
|
|
58881
58887
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -59335,6 +59341,8 @@ var ts;
|
|
|
59335
59341
|
// We ignore 'never' types in unions
|
|
59336
59342
|
if (!(flags & 131072 /* Never */)) {
|
|
59337
59343
|
includes |= flags & 205258751 /* IncludesMask */;
|
|
59344
|
+
if (flags & 465829888 /* Instantiable */)
|
|
59345
|
+
includes |= 33554432 /* IncludesInstantiable */;
|
|
59338
59346
|
if (type === wildcardType)
|
|
59339
59347
|
includes |= 8388608 /* IncludesWildcard */;
|
|
59340
59348
|
if (!strictNullChecks && flags & 98304 /* Nullable */) {
|
|
@@ -59548,7 +59556,7 @@ var ts;
|
|
|
59548
59556
|
origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
|
|
59549
59557
|
}
|
|
59550
59558
|
}
|
|
59551
|
-
var objectFlags = (includes &
|
|
59559
|
+
var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
|
|
59552
59560
|
(includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
|
|
59553
59561
|
return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
|
|
59554
59562
|
}
|
|
@@ -59596,9 +59604,9 @@ var ts;
|
|
|
59596
59604
|
return types[0];
|
|
59597
59605
|
}
|
|
59598
59606
|
var typeKey = !origin ? getTypeListId(types) :
|
|
59599
|
-
origin.flags & 1048576 /* Union */ ? "|"
|
|
59600
|
-
origin.flags & 2097152 /* Intersection */ ? "&"
|
|
59601
|
-
"#"
|
|
59607
|
+
origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
|
|
59608
|
+
origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
|
|
59609
|
+
"#".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
|
|
59602
59610
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
59603
59611
|
var type = unionTypes.get(id);
|
|
59604
59612
|
if (!type) {
|
|
@@ -60120,7 +60128,7 @@ var ts;
|
|
|
60120
60128
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
|
|
60121
60129
|
return stringType;
|
|
60122
60130
|
}
|
|
60123
|
-
var id = getTypeListId(newTypes)
|
|
60131
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
60124
60132
|
var type = templateLiteralTypes.get(id);
|
|
60125
60133
|
if (!type) {
|
|
60126
60134
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -60180,7 +60188,7 @@ var ts;
|
|
|
60180
60188
|
return str;
|
|
60181
60189
|
}
|
|
60182
60190
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
60183
|
-
var id = getSymbolId(symbol)
|
|
60191
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
60184
60192
|
var result = stringMappingTypes.get(id);
|
|
60185
60193
|
if (!result) {
|
|
60186
60194
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -61200,7 +61208,7 @@ var ts;
|
|
|
61200
61208
|
function createUniqueESSymbolType(symbol) {
|
|
61201
61209
|
var type = createType(8192 /* UniqueESSymbol */);
|
|
61202
61210
|
type.symbol = symbol;
|
|
61203
|
-
type.escapedName = "__@"
|
|
61211
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
61204
61212
|
return type;
|
|
61205
61213
|
}
|
|
61206
61214
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -62743,7 +62751,7 @@ var ts;
|
|
|
62743
62751
|
return true;
|
|
62744
62752
|
}
|
|
62745
62753
|
if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {
|
|
62746
|
-
var related = relation.get(getRelationKey(source, target, 0 /* None */, relation));
|
|
62754
|
+
var related = relation.get(getRelationKey(source, target, 0 /* None */, relation, /*ignoreConstraints*/ false));
|
|
62747
62755
|
if (related !== undefined) {
|
|
62748
62756
|
return !!(related & 1 /* Succeeded */);
|
|
62749
62757
|
}
|
|
@@ -62889,24 +62897,24 @@ var ts;
|
|
|
62889
62897
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
62890
62898
|
// Parenthesize a `new` if there is one
|
|
62891
62899
|
if (path.indexOf("new ") === 0) {
|
|
62892
|
-
path = "("
|
|
62900
|
+
path = "(".concat(path, ")");
|
|
62893
62901
|
}
|
|
62894
62902
|
var str = "" + args[0];
|
|
62895
62903
|
// If leading, just print back the arg (irrespective of if it's a valid identifier)
|
|
62896
62904
|
if (path.length === 0) {
|
|
62897
|
-
path = ""
|
|
62905
|
+
path = "".concat(str);
|
|
62898
62906
|
}
|
|
62899
62907
|
// Otherwise write a dotted name if possible
|
|
62900
62908
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
62901
|
-
path = path
|
|
62909
|
+
path = "".concat(path, ".").concat(str);
|
|
62902
62910
|
}
|
|
62903
62911
|
// Failing that, check if the name is already a computed name
|
|
62904
62912
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
62905
|
-
path = ""
|
|
62913
|
+
path = "".concat(path).concat(str);
|
|
62906
62914
|
}
|
|
62907
62915
|
// And finally write out a computed name as a last resort
|
|
62908
62916
|
else {
|
|
62909
|
-
path = path
|
|
62917
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
62910
62918
|
}
|
|
62911
62919
|
break;
|
|
62912
62920
|
}
|
|
@@ -62935,7 +62943,7 @@ var ts;
|
|
|
62935
62943
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
62936
62944
|
? ""
|
|
62937
62945
|
: "...";
|
|
62938
|
-
path = ""
|
|
62946
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
62939
62947
|
}
|
|
62940
62948
|
break;
|
|
62941
62949
|
}
|
|
@@ -62948,7 +62956,7 @@ var ts;
|
|
|
62948
62956
|
break;
|
|
62949
62957
|
}
|
|
62950
62958
|
default:
|
|
62951
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
62959
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
62952
62960
|
}
|
|
62953
62961
|
}
|
|
62954
62962
|
if (path) {
|
|
@@ -63592,7 +63600,8 @@ var ts;
|
|
|
63592
63600
|
if (overflow) {
|
|
63593
63601
|
return 0 /* False */;
|
|
63594
63602
|
}
|
|
63595
|
-
var
|
|
63603
|
+
var keyIntersectionState = intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0);
|
|
63604
|
+
var id = getRelationKey(source, target, keyIntersectionState, relation, /*ingnoreConstraints*/ false);
|
|
63596
63605
|
var entry = relation.get(id);
|
|
63597
63606
|
if (entry !== undefined) {
|
|
63598
63607
|
if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) {
|
|
@@ -63619,16 +63628,13 @@ var ts;
|
|
|
63619
63628
|
targetStack = [];
|
|
63620
63629
|
}
|
|
63621
63630
|
else {
|
|
63622
|
-
//
|
|
63623
|
-
//
|
|
63624
|
-
//
|
|
63625
|
-
var broadestEquivalentId = id.
|
|
63626
|
-
var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
|
|
63627
|
-
return "=" + index;
|
|
63628
|
-
}); }).join(",");
|
|
63631
|
+
// A key that starts with "*" is an indication that we have type references that reference constrained
|
|
63632
|
+
// type parameters. For such keys we also check against the key we would have gotten if all type parameters
|
|
63633
|
+
// were unconstrained.
|
|
63634
|
+
var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, /*ignoreConstraints*/ true) : undefined;
|
|
63629
63635
|
for (var i = 0; i < maybeCount; i++) {
|
|
63630
63636
|
// If source and target are already being compared, consider them related with assumptions
|
|
63631
|
-
if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
|
|
63637
|
+
if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
|
|
63632
63638
|
return 3 /* Maybe */;
|
|
63633
63639
|
}
|
|
63634
63640
|
}
|
|
@@ -63923,7 +63929,7 @@ var ts;
|
|
|
63923
63929
|
originalErrorInfo = undefined;
|
|
63924
63930
|
}
|
|
63925
63931
|
}
|
|
63926
|
-
else if (isGenericMappedType(target)) {
|
|
63932
|
+
else if (isGenericMappedType(target) && relation !== identityRelation) {
|
|
63927
63933
|
// Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
|
|
63928
63934
|
var keysRemapped = !!target.declaration.nameType;
|
|
63929
63935
|
var templateType = getTemplateTypeFromMappedType(target);
|
|
@@ -65135,48 +65141,56 @@ var ts;
|
|
|
65135
65141
|
function isTypeReferenceWithGenericArguments(type) {
|
|
65136
65142
|
return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t); });
|
|
65137
65143
|
}
|
|
65138
|
-
|
|
65139
|
-
|
|
65140
|
-
|
|
65141
|
-
|
|
65142
|
-
|
|
65143
|
-
|
|
65144
|
-
|
|
65145
|
-
|
|
65146
|
-
|
|
65147
|
-
if (
|
|
65148
|
-
|
|
65149
|
-
|
|
65150
|
-
|
|
65151
|
-
|
|
65144
|
+
function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {
|
|
65145
|
+
var typeParameters = [];
|
|
65146
|
+
var constraintMarker = "";
|
|
65147
|
+
var sourceId = getTypeReferenceId(source, 0);
|
|
65148
|
+
var targetId = getTypeReferenceId(target, 0);
|
|
65149
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
65150
|
+
// getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
|
|
65151
|
+
// where A.id=111 and number.id=12
|
|
65152
|
+
function getTypeReferenceId(type, depth) {
|
|
65153
|
+
if (depth === void 0) { depth = 0; }
|
|
65154
|
+
var result = "" + type.target.id;
|
|
65155
|
+
for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
|
|
65156
|
+
var t = _a[_i];
|
|
65157
|
+
if (t.flags & 262144 /* TypeParameter */) {
|
|
65158
|
+
if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {
|
|
65159
|
+
var index = typeParameters.indexOf(t);
|
|
65160
|
+
if (index < 0) {
|
|
65161
|
+
index = typeParameters.length;
|
|
65162
|
+
typeParameters.push(t);
|
|
65163
|
+
}
|
|
65164
|
+
result += "=" + index;
|
|
65165
|
+
continue;
|
|
65166
|
+
}
|
|
65167
|
+
// We mark type references that reference constrained type parameters such that we know to obtain
|
|
65168
|
+
// and look for a "broadest equivalent key" in the cache.
|
|
65169
|
+
constraintMarker = "*";
|
|
65170
|
+
}
|
|
65171
|
+
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
65172
|
+
result += "<" + getTypeReferenceId(t, depth + 1) + ">";
|
|
65173
|
+
continue;
|
|
65152
65174
|
}
|
|
65153
|
-
result += "=" + index;
|
|
65154
|
-
}
|
|
65155
|
-
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
65156
|
-
result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
|
|
65157
|
-
}
|
|
65158
|
-
else {
|
|
65159
65175
|
result += "-" + t.id;
|
|
65160
65176
|
}
|
|
65177
|
+
return result;
|
|
65161
65178
|
}
|
|
65162
|
-
return result;
|
|
65163
65179
|
}
|
|
65164
65180
|
/**
|
|
65165
65181
|
* To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters.
|
|
65166
65182
|
* For other cases, the types ids are used.
|
|
65167
65183
|
*/
|
|
65168
|
-
function getRelationKey(source, target, intersectionState, relation) {
|
|
65184
|
+
function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
|
|
65169
65185
|
if (relation === identityRelation && source.id > target.id) {
|
|
65170
65186
|
var temp = source;
|
|
65171
65187
|
source = target;
|
|
65172
65188
|
target = temp;
|
|
65173
65189
|
}
|
|
65174
65190
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
65175
|
-
|
|
65176
|
-
|
|
65177
|
-
|
|
65178
|
-
}
|
|
65179
|
-
return source.id + "," + target.id + postFix;
|
|
65191
|
+
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
65192
|
+
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
65193
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
65180
65194
|
}
|
|
65181
65195
|
// Invoke the callback for each underlying property symbol of the given symbol and return the first
|
|
65182
65196
|
// value that isn't undefined.
|
|
@@ -65224,28 +65238,35 @@ var ts;
|
|
|
65224
65238
|
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
|
|
65225
65239
|
}
|
|
65226
65240
|
// Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
|
|
65227
|
-
// for
|
|
65241
|
+
// for maxDepth or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
|
|
65228
65242
|
// though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
|
|
65229
|
-
// expanding. Effectively, we will generate a false positive when two types are structurally equal to at least
|
|
65243
|
+
// expanding. Effectively, we will generate a false positive when two types are structurally equal to at least maxDepth
|
|
65230
65244
|
// levels, but unequal at some level beyond that.
|
|
65231
|
-
// In addition, this will also detect when an indexed access has been chained off of
|
|
65232
|
-
// the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
|
|
65233
|
-
// for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
|
|
65234
|
-
// It also detects when a recursive type reference has expanded
|
|
65245
|
+
// In addition, this will also detect when an indexed access has been chained off of maxDepth more times (which is
|
|
65246
|
+
// essentially the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
|
|
65247
|
+
// false positives for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
|
|
65248
|
+
// It also detects when a recursive type reference has expanded maxDepth or more times, e.g. if the true branch of
|
|
65235
65249
|
// `type A<T> = null extends T ? [A<NonNullable<T>>] : [T]`
|
|
65236
|
-
// has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]
|
|
65237
|
-
//
|
|
65250
|
+
// has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`. In such cases we need
|
|
65251
|
+
// to terminate the expansion, and we do so here.
|
|
65238
65252
|
function isDeeplyNestedType(type, stack, depth, maxDepth) {
|
|
65239
|
-
if (maxDepth === void 0) { maxDepth =
|
|
65253
|
+
if (maxDepth === void 0) { maxDepth = 3; }
|
|
65240
65254
|
if (depth >= maxDepth) {
|
|
65241
65255
|
var identity_1 = getRecursionIdentity(type);
|
|
65242
65256
|
var count = 0;
|
|
65257
|
+
var lastTypeId = 0;
|
|
65243
65258
|
for (var i = 0; i < depth; i++) {
|
|
65244
|
-
|
|
65245
|
-
|
|
65246
|
-
|
|
65247
|
-
|
|
65259
|
+
var t = stack[i];
|
|
65260
|
+
if (getRecursionIdentity(t) === identity_1) {
|
|
65261
|
+
// We only count occurrences with a higher type id than the previous occurrence, since higher
|
|
65262
|
+
// type ids are an indicator of newer instantiations caused by recursion.
|
|
65263
|
+
if (t.id >= lastTypeId) {
|
|
65264
|
+
count++;
|
|
65265
|
+
if (count >= maxDepth) {
|
|
65266
|
+
return true;
|
|
65267
|
+
}
|
|
65248
65268
|
}
|
|
65269
|
+
lastTypeId = t.id;
|
|
65249
65270
|
}
|
|
65250
65271
|
}
|
|
65251
65272
|
}
|
|
@@ -65984,7 +66005,8 @@ var ts;
|
|
|
65984
66005
|
(resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) ||
|
|
65985
66006
|
param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
|
|
65986
66007
|
var newName = "arg" + param.parent.parameters.indexOf(param);
|
|
65987
|
-
|
|
66008
|
+
var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
66009
|
+
errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
65988
66010
|
return;
|
|
65989
66011
|
}
|
|
65990
66012
|
diagnostic = declaration.dotDotDotToken ?
|
|
@@ -67287,11 +67309,11 @@ var ts;
|
|
|
67287
67309
|
case 79 /* Identifier */:
|
|
67288
67310
|
if (!ts.isThisInTypeQuery(node)) {
|
|
67289
67311
|
var symbol = getResolvedSymbol(node);
|
|
67290
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
67312
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
67291
67313
|
}
|
|
67292
67314
|
// falls through
|
|
67293
67315
|
case 108 /* ThisKeyword */:
|
|
67294
|
-
return "0|"
|
|
67316
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
67295
67317
|
case 229 /* NonNullExpression */:
|
|
67296
67318
|
case 211 /* ParenthesizedExpression */:
|
|
67297
67319
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -71053,7 +71075,7 @@ var ts;
|
|
|
71053
71075
|
!leftName ? rightName :
|
|
71054
71076
|
!rightName ? leftName :
|
|
71055
71077
|
undefined;
|
|
71056
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
71078
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
71057
71079
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71058
71080
|
params[i] = paramSymbol;
|
|
71059
71081
|
}
|
|
@@ -72834,7 +72856,7 @@ var ts;
|
|
|
72834
72856
|
}
|
|
72835
72857
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
72836
72858
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
72837
|
-
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
|
|
72859
|
+
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
|
|
72838
72860
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
72839
72861
|
var symbol = getSymbol(symbols, name, meaning);
|
|
72840
72862
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
@@ -78357,7 +78379,9 @@ var ts;
|
|
|
78357
78379
|
var typeReferenceNode = ts.tryCast(node.parent, ts.isTypeReferenceType);
|
|
78358
78380
|
if (!typeReferenceNode)
|
|
78359
78381
|
return undefined;
|
|
78360
|
-
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78382
|
+
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78383
|
+
if (!typeParameters)
|
|
78384
|
+
return undefined;
|
|
78361
78385
|
var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
|
|
78362
78386
|
return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
|
|
78363
78387
|
}
|
|
@@ -80964,7 +80988,7 @@ var ts;
|
|
|
80964
80988
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
80965
80989
|
var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
|
|
80966
80990
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
80967
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
80991
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
80968
80992
|
}
|
|
80969
80993
|
/**
|
|
80970
80994
|
* Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
|
|
@@ -87936,7 +87960,7 @@ var ts;
|
|
|
87936
87960
|
value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
|
|
87937
87961
|
value === 62 ? 43 /* plus */ :
|
|
87938
87962
|
value === 63 ? 47 /* slash */ :
|
|
87939
|
-
ts.Debug.fail(value
|
|
87963
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
87940
87964
|
}
|
|
87941
87965
|
function base64FormatDecode(ch) {
|
|
87942
87966
|
return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
|
|
@@ -88011,7 +88035,7 @@ var ts;
|
|
|
88011
88035
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
88012
88036
|
if (decoder.error !== undefined) {
|
|
88013
88037
|
if (host.log) {
|
|
88014
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
88038
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
88015
88039
|
}
|
|
88016
88040
|
decodedMappings = ts.emptyArray;
|
|
88017
88041
|
}
|
|
@@ -91677,7 +91701,7 @@ var ts;
|
|
|
91677
91701
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
91678
91702
|
? ts.declarationNameToString(originalNode.name)
|
|
91679
91703
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
91680
|
-
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " "
|
|
91704
|
+
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
|
|
91681
91705
|
}
|
|
91682
91706
|
return substitute;
|
|
91683
91707
|
}
|
|
@@ -93069,8 +93093,8 @@ var ts;
|
|
|
93069
93093
|
}
|
|
93070
93094
|
function createHoistedVariableForClass(name, node) {
|
|
93071
93095
|
var className = getPrivateIdentifierEnvironment().className;
|
|
93072
|
-
var prefix = className ? "_"
|
|
93073
|
-
var identifier = factory.createUniqueName(prefix
|
|
93096
|
+
var prefix = className ? "_".concat(className) : "";
|
|
93097
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
|
|
93074
93098
|
if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
|
|
93075
93099
|
addBlockScopedVariable(identifier);
|
|
93076
93100
|
}
|
|
@@ -94968,7 +94992,7 @@ var ts;
|
|
|
94968
94992
|
specifierSourceImports = ts.createMap();
|
|
94969
94993
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
94970
94994
|
}
|
|
94971
|
-
var generatedName = factory.createUniqueName("_"
|
|
94995
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
|
|
94972
94996
|
var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
|
|
94973
94997
|
generatedName.generatedImportReference = specifier;
|
|
94974
94998
|
specifierSourceImports.set(name, specifier);
|
|
@@ -96107,11 +96131,11 @@ var ts;
|
|
|
96107
96131
|
}
|
|
96108
96132
|
else {
|
|
96109
96133
|
if (node.kind === 245 /* BreakStatement */) {
|
|
96110
|
-
labelMarker = "break-"
|
|
96134
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
96111
96135
|
setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
|
|
96112
96136
|
}
|
|
96113
96137
|
else {
|
|
96114
|
-
labelMarker = "continue-"
|
|
96138
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
96115
96139
|
setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
|
|
96116
96140
|
}
|
|
96117
96141
|
}
|
|
@@ -104920,7 +104944,7 @@ var ts;
|
|
|
104920
104944
|
return getTypeAliasDeclarationVisibilityError;
|
|
104921
104945
|
}
|
|
104922
104946
|
else {
|
|
104923
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
104947
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
104924
104948
|
}
|
|
104925
104949
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
104926
104950
|
if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
|
|
@@ -105131,7 +105155,7 @@ var ts;
|
|
|
105131
105155
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
105132
105156
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
105133
105157
|
default:
|
|
105134
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
105158
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
105135
105159
|
}
|
|
105136
105160
|
}
|
|
105137
105161
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -105889,7 +105913,7 @@ var ts;
|
|
|
105889
105913
|
while (ts.length(lateMarkedStatements)) {
|
|
105890
105914
|
var i = lateMarkedStatements.shift();
|
|
105891
105915
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
105892
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
105916
|
+
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));
|
|
105893
105917
|
}
|
|
105894
105918
|
var priorNeedsDeclare = needsDeclare;
|
|
105895
105919
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -106078,7 +106102,7 @@ var ts;
|
|
|
106078
106102
|
return cleanup(input);
|
|
106079
106103
|
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));
|
|
106080
106104
|
}
|
|
106081
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
106105
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
106082
106106
|
}
|
|
106083
106107
|
}
|
|
106084
106108
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -106369,7 +106393,7 @@ var ts;
|
|
|
106369
106393
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
|
|
106370
106394
|
// We must add a temporary declaration for the extends clause expression
|
|
106371
106395
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
106372
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
106396
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
|
|
106373
106397
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
106374
106398
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
106375
106399
|
errorNode: extendsClause_1,
|
|
@@ -106410,7 +106434,7 @@ var ts;
|
|
|
106410
106434
|
}
|
|
106411
106435
|
}
|
|
106412
106436
|
// Anything left unhandled is an error, so this should be unreachable
|
|
106413
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
106437
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
106414
106438
|
function cleanup(node) {
|
|
106415
106439
|
if (isEnclosingDeclaration(input)) {
|
|
106416
106440
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -107302,13 +107326,13 @@ var ts;
|
|
|
107302
107326
|
if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
|
|
107303
107327
|
return;
|
|
107304
107328
|
if (js && configFile.options.sourceMap) {
|
|
107305
|
-
addOutput(js
|
|
107329
|
+
addOutput("".concat(js, ".map"));
|
|
107306
107330
|
}
|
|
107307
107331
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
107308
107332
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
107309
107333
|
addOutput(dts);
|
|
107310
107334
|
if (configFile.options.declarationMap) {
|
|
107311
|
-
addOutput(dts
|
|
107335
|
+
addOutput("".concat(dts, ".map"));
|
|
107312
107336
|
}
|
|
107313
107337
|
}
|
|
107314
107338
|
}
|
|
@@ -107377,7 +107401,7 @@ var ts;
|
|
|
107377
107401
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
107378
107402
|
if (ts.outFile(configFile.options)) {
|
|
107379
107403
|
var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
|
|
107380
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
107404
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107381
107405
|
}
|
|
107382
107406
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
107383
107407
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -107396,7 +107420,7 @@ var ts;
|
|
|
107396
107420
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
107397
107421
|
if (buildInfoPath)
|
|
107398
107422
|
return buildInfoPath;
|
|
107399
|
-
return ts.Debug.fail("project "
|
|
107423
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107400
107424
|
}
|
|
107401
107425
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
107402
107426
|
/*@internal*/
|
|
@@ -107622,7 +107646,7 @@ var ts;
|
|
|
107622
107646
|
if (sourceMappingURL) {
|
|
107623
107647
|
if (!writer.isAtStartOfLine())
|
|
107624
107648
|
writer.rawWrite(newLine);
|
|
107625
|
-
writer.writeComment("//# "
|
|
107649
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
|
|
107626
107650
|
}
|
|
107627
107651
|
// Write the source map
|
|
107628
107652
|
if (sourceMapFilePath) {
|
|
@@ -107671,7 +107695,7 @@ var ts;
|
|
|
107671
107695
|
// Encode the sourceMap into the sourceMap url
|
|
107672
107696
|
var sourceMapText = sourceMapGenerator.toString();
|
|
107673
107697
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
107674
|
-
return "data:application/json;base64,"
|
|
107698
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
107675
107699
|
}
|
|
107676
107700
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
107677
107701
|
if (mapOptions.mapRoot) {
|
|
@@ -107851,7 +107875,7 @@ var ts;
|
|
|
107851
107875
|
return;
|
|
107852
107876
|
break;
|
|
107853
107877
|
default:
|
|
107854
|
-
ts.Debug.fail("Unexpected path: "
|
|
107878
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
107855
107879
|
}
|
|
107856
107880
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
107857
107881
|
},
|
|
@@ -108711,7 +108735,7 @@ var ts;
|
|
|
108711
108735
|
return writeTokenNode(node, writeKeyword);
|
|
108712
108736
|
if (ts.isTokenKind(node.kind))
|
|
108713
108737
|
return writeTokenNode(node, writePunctuation);
|
|
108714
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
108738
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
108715
108739
|
}
|
|
108716
108740
|
function emitMappedTypeParameter(node) {
|
|
108717
108741
|
emit(node.name);
|
|
@@ -108881,13 +108905,13 @@ var ts;
|
|
|
108881
108905
|
}
|
|
108882
108906
|
}
|
|
108883
108907
|
function emitPlaceholder(hint, node, snippet) {
|
|
108884
|
-
nonEscapingWrite("${"
|
|
108908
|
+
nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
|
|
108885
108909
|
pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
|
|
108886
108910
|
nonEscapingWrite("}"); // `}`
|
|
108887
108911
|
// `${2:...}`
|
|
108888
108912
|
}
|
|
108889
108913
|
function emitTabStop(snippet) {
|
|
108890
|
-
nonEscapingWrite("$"
|
|
108914
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
108891
108915
|
}
|
|
108892
108916
|
//
|
|
108893
108917
|
// Identifiers
|
|
@@ -110609,17 +110633,17 @@ var ts;
|
|
|
110609
110633
|
writeLine();
|
|
110610
110634
|
}
|
|
110611
110635
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
110612
|
-
writeComment("/// <amd-module name=\""
|
|
110636
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
110613
110637
|
writeLine();
|
|
110614
110638
|
}
|
|
110615
110639
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
110616
110640
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
110617
110641
|
var dep = _b[_a];
|
|
110618
110642
|
if (dep.name) {
|
|
110619
|
-
writeComment("/// <amd-dependency name=\""
|
|
110643
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
110620
110644
|
}
|
|
110621
110645
|
else {
|
|
110622
|
-
writeComment("/// <amd-dependency path=\""
|
|
110646
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
110623
110647
|
}
|
|
110624
110648
|
writeLine();
|
|
110625
110649
|
}
|
|
@@ -110627,7 +110651,7 @@ var ts;
|
|
|
110627
110651
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
110628
110652
|
var directive = files_2[_c];
|
|
110629
110653
|
var pos = writer.getTextPos();
|
|
110630
|
-
writeComment("/// <reference path=\""
|
|
110654
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
110631
110655
|
if (bundleFileInfo)
|
|
110632
110656
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
|
|
110633
110657
|
writeLine();
|
|
@@ -110635,7 +110659,7 @@ var ts;
|
|
|
110635
110659
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
110636
110660
|
var directive = types_24[_d];
|
|
110637
110661
|
var pos = writer.getTextPos();
|
|
110638
|
-
writeComment("/// <reference types=\""
|
|
110662
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
110639
110663
|
if (bundleFileInfo)
|
|
110640
110664
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
|
|
110641
110665
|
writeLine();
|
|
@@ -110643,7 +110667,7 @@ var ts;
|
|
|
110643
110667
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
110644
110668
|
var directive = libs_1[_e];
|
|
110645
110669
|
var pos = writer.getTextPos();
|
|
110646
|
-
writeComment("/// <reference lib=\""
|
|
110670
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
110647
110671
|
if (bundleFileInfo)
|
|
110648
110672
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
|
|
110649
110673
|
writeLine();
|
|
@@ -111418,9 +111442,9 @@ var ts;
|
|
|
111418
111442
|
var textSourceNode = node.textSourceNode;
|
|
111419
111443
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
111420
111444
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
111421
|
-
return jsxAttributeEscape ? "\""
|
|
111422
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\""
|
|
111423
|
-
"\""
|
|
111445
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
111446
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
111447
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
111424
111448
|
}
|
|
111425
111449
|
else {
|
|
111426
111450
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -111897,8 +111921,8 @@ var ts;
|
|
|
111897
111921
|
}
|
|
111898
111922
|
function formatSynthesizedComment(comment) {
|
|
111899
111923
|
return comment.kind === 3 /* MultiLineCommentTrivia */
|
|
111900
|
-
? "/*"
|
|
111901
|
-
: "//"
|
|
111924
|
+
? "/*".concat(comment.text, "*/")
|
|
111925
|
+
: "//".concat(comment.text);
|
|
111902
111926
|
}
|
|
111903
111927
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
111904
111928
|
enterComment();
|
|
@@ -112406,7 +112430,7 @@ var ts;
|
|
|
112406
112430
|
var rootResult = tryReadDirectory(rootDir, rootDirPath);
|
|
112407
112431
|
var rootSymLinkResult;
|
|
112408
112432
|
if (rootResult !== undefined) {
|
|
112409
|
-
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath
|
|
112433
|
+
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
112410
112434
|
}
|
|
112411
112435
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
112412
112436
|
function getFileSystemEntries(dir) {
|
|
@@ -112619,7 +112643,7 @@ var ts;
|
|
|
112619
112643
|
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;
|
|
112620
112644
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
112621
112645
|
if (!newPath) {
|
|
112622
|
-
writeLog("Project: "
|
|
112646
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
112623
112647
|
return true;
|
|
112624
112648
|
}
|
|
112625
112649
|
fileOrDirectoryPath = newPath;
|
|
@@ -112628,11 +112652,11 @@ var ts;
|
|
|
112628
112652
|
// If the the added or created file or directory is not supported file name, ignore the file
|
|
112629
112653
|
// But when watched directory is added/removed, we need to reload the file list
|
|
112630
112654
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
112631
|
-
writeLog("Project: "
|
|
112655
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
112632
112656
|
return true;
|
|
112633
112657
|
}
|
|
112634
112658
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
112635
|
-
writeLog("Project: "
|
|
112659
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
112636
112660
|
return true;
|
|
112637
112661
|
}
|
|
112638
112662
|
if (!program)
|
|
@@ -112656,7 +112680,7 @@ var ts;
|
|
|
112656
112680
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
112657
112681
|
if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
|
|
112658
112682
|
hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
|
|
112659
|
-
writeLog("Project: "
|
|
112683
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
112660
112684
|
return true;
|
|
112661
112685
|
}
|
|
112662
112686
|
return false;
|
|
@@ -112724,36 +112748,36 @@ var ts;
|
|
|
112724
112748
|
host.useCaseSensitiveFileNames();
|
|
112725
112749
|
}
|
|
112726
112750
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
112727
|
-
log("ExcludeWatcher:: Added:: "
|
|
112751
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112728
112752
|
return {
|
|
112729
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
112753
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
112730
112754
|
};
|
|
112731
112755
|
}
|
|
112732
112756
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112733
|
-
log("FileWatcher:: Added:: "
|
|
112757
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112734
112758
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112735
112759
|
return {
|
|
112736
112760
|
close: function () {
|
|
112737
|
-
log("FileWatcher:: Close:: "
|
|
112761
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112738
112762
|
watcher.close();
|
|
112739
112763
|
}
|
|
112740
112764
|
};
|
|
112741
112765
|
}
|
|
112742
112766
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112743
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
112767
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112744
112768
|
log(watchInfo);
|
|
112745
112769
|
var start = ts.timestamp();
|
|
112746
112770
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112747
112771
|
var elapsed = ts.timestamp() - start;
|
|
112748
|
-
log("Elapsed:: "
|
|
112772
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112749
112773
|
return {
|
|
112750
112774
|
close: function () {
|
|
112751
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
112775
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112752
112776
|
log(watchInfo);
|
|
112753
112777
|
var start = ts.timestamp();
|
|
112754
112778
|
watcher.close();
|
|
112755
112779
|
var elapsed = ts.timestamp() - start;
|
|
112756
|
-
log("Elapsed:: "
|
|
112780
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112757
112781
|
}
|
|
112758
112782
|
};
|
|
112759
112783
|
}
|
|
@@ -112763,16 +112787,16 @@ var ts;
|
|
|
112763
112787
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112764
112788
|
args[_i] = arguments[_i];
|
|
112765
112789
|
}
|
|
112766
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
112790
|
+
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));
|
|
112767
112791
|
log(triggerredInfo);
|
|
112768
112792
|
var start = ts.timestamp();
|
|
112769
112793
|
cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
|
|
112770
112794
|
var elapsed = ts.timestamp() - start;
|
|
112771
|
-
log("Elapsed:: "
|
|
112795
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
112772
112796
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
112773
112797
|
}
|
|
112774
112798
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
112775
|
-
return "WatchInfo: "
|
|
112799
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
112776
112800
|
}
|
|
112777
112801
|
}
|
|
112778
112802
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -113079,12 +113103,12 @@ var ts;
|
|
|
113079
113103
|
}
|
|
113080
113104
|
ts.formatDiagnostics = formatDiagnostics;
|
|
113081
113105
|
function formatDiagnostic(diagnostic, host) {
|
|
113082
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
113106
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
113083
113107
|
if (diagnostic.file) {
|
|
113084
113108
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
|
|
113085
113109
|
var fileName = diagnostic.file.fileName;
|
|
113086
113110
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
113087
|
-
return relativeFileName
|
|
113111
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
113088
113112
|
}
|
|
113089
113113
|
return errorMessage;
|
|
113090
113114
|
}
|
|
@@ -113172,9 +113196,9 @@ var ts;
|
|
|
113172
113196
|
var output = "";
|
|
113173
113197
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
113174
113198
|
output += ":";
|
|
113175
|
-
output += color(""
|
|
113199
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113176
113200
|
output += ":";
|
|
113177
|
-
output += color(""
|
|
113201
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113178
113202
|
return output;
|
|
113179
113203
|
}
|
|
113180
113204
|
ts.formatLocation = formatLocation;
|
|
@@ -113188,7 +113212,7 @@ var ts;
|
|
|
113188
113212
|
output += " - ";
|
|
113189
113213
|
}
|
|
113190
113214
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
113191
|
-
output += formatColorAndReset(" TS"
|
|
113215
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
113192
113216
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
113193
113217
|
if (diagnostic.file) {
|
|
113194
113218
|
output += host.getNewLine();
|
|
@@ -113297,7 +113321,7 @@ var ts;
|
|
|
113297
113321
|
var result = void 0;
|
|
113298
113322
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
113299
113323
|
i++;
|
|
113300
|
-
var cacheKey = mode !== undefined ? mode
|
|
113324
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
113301
113325
|
if (cache.has(cacheKey)) {
|
|
113302
113326
|
result = cache.get(cacheKey);
|
|
113303
113327
|
}
|
|
@@ -115381,7 +115405,7 @@ var ts;
|
|
|
115381
115405
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
115382
115406
|
i++;
|
|
115383
115407
|
}
|
|
115384
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
115408
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
115385
115409
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
115386
115410
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
115387
115411
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -116202,12 +116226,12 @@ var ts;
|
|
|
116202
116226
|
}
|
|
116203
116227
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
116204
116228
|
var dirPath = host.toPath(dir);
|
|
116205
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
116229
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
116206
116230
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
116207
116231
|
// Any parent directory of declaration dir
|
|
116208
116232
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
116209
116233
|
// Any directory inside declaration dir
|
|
116210
|
-
ts.startsWith(dirPath, declDirPath
|
|
116234
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
116211
116235
|
}
|
|
116212
116236
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
116213
116237
|
var _a;
|
|
@@ -116260,7 +116284,7 @@ var ts;
|
|
|
116260
116284
|
if (isFile && result) {
|
|
116261
116285
|
// Store the real path for the file'
|
|
116262
116286
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
116263
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
116287
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
116264
116288
|
}
|
|
116265
116289
|
return result;
|
|
116266
116290
|
}) || false;
|
|
@@ -116718,7 +116742,7 @@ var ts;
|
|
|
116718
116742
|
/*forceDtsEmit*/ true);
|
|
116719
116743
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
116720
116744
|
if (firstDts_1) {
|
|
116721
|
-
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: "
|
|
116745
|
+
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; }))); });
|
|
116722
116746
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
116723
116747
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
116724
116748
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -117226,7 +117250,7 @@ var ts;
|
|
|
117226
117250
|
return;
|
|
117227
117251
|
}
|
|
117228
117252
|
else {
|
|
117229
|
-
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: "
|
|
117253
|
+
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));
|
|
117230
117254
|
}
|
|
117231
117255
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
117232
117256
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -118371,7 +118395,7 @@ var ts;
|
|
|
118371
118395
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
118372
118396
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
118373
118397
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
118374
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
118398
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
118375
118399
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
118376
118400
|
// Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
|
|
118377
118401
|
return {
|
|
@@ -119353,13 +119377,15 @@ var ts;
|
|
|
119353
119377
|
if (host.fileExists(packageJsonPath)) {
|
|
119354
119378
|
var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
|
|
119355
119379
|
// TODO: Inject `require` or `import` condition based on the intended import mode
|
|
119356
|
-
|
|
119357
|
-
|
|
119358
|
-
|
|
119359
|
-
|
|
119360
|
-
|
|
119361
|
-
|
|
119362
|
-
|
|
119380
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
119381
|
+
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
|
|
119382
|
+
if (fromExports) {
|
|
119383
|
+
var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
119384
|
+
return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
|
|
119385
|
+
}
|
|
119386
|
+
if (packageJsonContent.exports) {
|
|
119387
|
+
return { moduleFileToTry: path, blockedByExports: true };
|
|
119388
|
+
}
|
|
119363
119389
|
}
|
|
119364
119390
|
var versionPaths = packageJsonContent.typesVersions
|
|
119365
119391
|
? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
|
|
@@ -119483,7 +119509,7 @@ var ts;
|
|
|
119483
119509
|
}
|
|
119484
119510
|
function getJSExtensionForFile(fileName, options) {
|
|
119485
119511
|
var _a;
|
|
119486
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
119512
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
119487
119513
|
}
|
|
119488
119514
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
119489
119515
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -119586,8 +119612,8 @@ var ts;
|
|
|
119586
119612
|
return pretty ?
|
|
119587
119613
|
function (diagnostic, newLine, options) {
|
|
119588
119614
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
119589
|
-
var output = "["
|
|
119590
|
-
output += ""
|
|
119615
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
119616
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
119591
119617
|
system.write(output);
|
|
119592
119618
|
} :
|
|
119593
119619
|
function (diagnostic, newLine, options) {
|
|
@@ -119595,8 +119621,8 @@ var ts;
|
|
|
119595
119621
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
119596
119622
|
output += newLine;
|
|
119597
119623
|
}
|
|
119598
|
-
output += getLocaleTimeString(system)
|
|
119599
|
-
output += ""
|
|
119624
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
119625
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
119600
119626
|
system.write(output);
|
|
119601
119627
|
};
|
|
119602
119628
|
}
|
|
@@ -119624,7 +119650,7 @@ var ts;
|
|
|
119624
119650
|
if (errorCount === 0)
|
|
119625
119651
|
return "";
|
|
119626
119652
|
var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
|
|
119627
|
-
return ""
|
|
119653
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
|
|
119628
119654
|
}
|
|
119629
119655
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
119630
119656
|
function isBuilderProgram(program) {
|
|
@@ -119650,9 +119676,9 @@ var ts;
|
|
|
119650
119676
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
119651
119677
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
119652
119678
|
var file = _c[_i];
|
|
119653
|
-
write(""
|
|
119654
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
119655
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
119679
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
119680
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
119681
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
119656
119682
|
}
|
|
119657
119683
|
}
|
|
119658
119684
|
ts.explainFiles = explainFiles;
|
|
@@ -119692,7 +119718,7 @@ var ts;
|
|
|
119692
119718
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
|
|
119693
119719
|
return false;
|
|
119694
119720
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
119695
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
119721
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
119696
119722
|
});
|
|
119697
119723
|
}
|
|
119698
119724
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -119701,7 +119727,7 @@ var ts;
|
|
|
119701
119727
|
var options = program.getCompilerOptions();
|
|
119702
119728
|
if (ts.isReferencedFile(reason)) {
|
|
119703
119729
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
119704
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
119730
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
119705
119731
|
var message = void 0;
|
|
119706
119732
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
119707
119733
|
switch (reason.kind) {
|
|
@@ -119825,7 +119851,7 @@ var ts;
|
|
|
119825
119851
|
var currentDir_1 = program.getCurrentDirectory();
|
|
119826
119852
|
ts.forEach(emittedFiles, function (file) {
|
|
119827
119853
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
119828
|
-
write("TSFILE: "
|
|
119854
|
+
write("TSFILE: ".concat(filepath));
|
|
119829
119855
|
});
|
|
119830
119856
|
listFiles(program, write);
|
|
119831
119857
|
}
|
|
@@ -120153,7 +120179,7 @@ var ts;
|
|
|
120153
120179
|
}
|
|
120154
120180
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
120155
120181
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
120156
|
-
writeLog("Current directory: "
|
|
120182
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
120157
120183
|
var configFileWatcher;
|
|
120158
120184
|
if (configFileName) {
|
|
120159
120185
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -120302,10 +120328,10 @@ var ts;
|
|
|
120302
120328
|
function createNewProgram(hasInvalidatedResolution) {
|
|
120303
120329
|
// Compile the program
|
|
120304
120330
|
writeLog("CreatingProgramWith::");
|
|
120305
|
-
writeLog(" roots: "
|
|
120306
|
-
writeLog(" options: "
|
|
120331
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
120332
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
120307
120333
|
if (projectReferences)
|
|
120308
|
-
writeLog(" projectReferences: "
|
|
120334
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
120309
120335
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
120310
120336
|
hasChangedCompilerOptions = false;
|
|
120311
120337
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -120466,7 +120492,7 @@ var ts;
|
|
|
120466
120492
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
120467
120493
|
}
|
|
120468
120494
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
120469
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
120495
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
120470
120496
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
120471
120497
|
}
|
|
120472
120498
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -120526,7 +120552,7 @@ var ts;
|
|
|
120526
120552
|
synchronizeProgram();
|
|
120527
120553
|
}
|
|
120528
120554
|
function reloadConfigFile() {
|
|
120529
|
-
writeLog("Reloading config file: "
|
|
120555
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
120530
120556
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
120531
120557
|
if (cachedDirectoryStructureHost) {
|
|
120532
120558
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -120567,7 +120593,7 @@ var ts;
|
|
|
120567
120593
|
return config.parsedCommandLine;
|
|
120568
120594
|
}
|
|
120569
120595
|
}
|
|
120570
|
-
writeLog("Loading config file: "
|
|
120596
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
120571
120597
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
120572
120598
|
host.getParsedCommandLine(configFileName) :
|
|
120573
120599
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -120871,8 +120897,8 @@ var ts;
|
|
|
120871
120897
|
*/
|
|
120872
120898
|
function createBuilderStatusReporter(system, pretty) {
|
|
120873
120899
|
return function (diagnostic) {
|
|
120874
|
-
var output = pretty ? "["
|
|
120875
|
-
output += ""
|
|
120900
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
120901
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
120876
120902
|
system.write(output);
|
|
120877
120903
|
};
|
|
120878
120904
|
}
|
|
@@ -121647,7 +121673,7 @@ var ts;
|
|
|
121647
121673
|
function listEmittedFile(_a, proj, file) {
|
|
121648
121674
|
var write = _a.write;
|
|
121649
121675
|
if (write && proj.options.listEmittedFiles) {
|
|
121650
|
-
write("TSFILE: "
|
|
121676
|
+
write("TSFILE: ".concat(file));
|
|
121651
121677
|
}
|
|
121652
121678
|
}
|
|
121653
121679
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -121676,7 +121702,7 @@ var ts;
|
|
|
121676
121702
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
121677
121703
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
121678
121704
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
121679
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
121705
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
121680
121706
|
if (canEmitBuildInfo)
|
|
121681
121707
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
121682
121708
|
afterProgramDone(state, program, config);
|
|
@@ -121704,7 +121730,7 @@ var ts;
|
|
|
121704
121730
|
if (!host.fileExists(inputFile)) {
|
|
121705
121731
|
return {
|
|
121706
121732
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
121707
|
-
reason: inputFile
|
|
121733
|
+
reason: "".concat(inputFile, " does not exist")
|
|
121708
121734
|
};
|
|
121709
121735
|
}
|
|
121710
121736
|
if (!force) {
|
|
@@ -122063,7 +122089,7 @@ var ts;
|
|
|
122063
122089
|
}
|
|
122064
122090
|
}
|
|
122065
122091
|
if (filesToDelete) {
|
|
122066
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
122092
|
+
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(""));
|
|
122067
122093
|
}
|
|
122068
122094
|
return ts.ExitStatus.Success;
|
|
122069
122095
|
}
|
|
@@ -124891,7 +124917,7 @@ var ts;
|
|
|
124891
124917
|
var prefix = ts.isJSDocLink(link) ? "link"
|
|
124892
124918
|
: ts.isJSDocLinkCode(link) ? "linkcode"
|
|
124893
124919
|
: "linkplain";
|
|
124894
|
-
var parts = [linkPart("{@"
|
|
124920
|
+
var parts = [linkPart("{@".concat(prefix, " "))];
|
|
124895
124921
|
if (!link.name) {
|
|
124896
124922
|
if (link.text)
|
|
124897
124923
|
parts.push(linkTextPart(link.text));
|
|
@@ -125139,7 +125165,7 @@ var ts;
|
|
|
125139
125165
|
function getUniqueName(baseName, sourceFile) {
|
|
125140
125166
|
var nameText = baseName;
|
|
125141
125167
|
for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
|
|
125142
|
-
nameText = baseName
|
|
125168
|
+
nameText = "".concat(baseName, "_").concat(i);
|
|
125143
125169
|
}
|
|
125144
125170
|
return nameText;
|
|
125145
125171
|
}
|
|
@@ -125249,7 +125275,7 @@ var ts;
|
|
|
125249
125275
|
// Editors can pass in undefined or empty string - we want to infer the preference in those cases.
|
|
125250
125276
|
var quotePreference = getQuotePreference(sourceFile, preferences);
|
|
125251
125277
|
var quoted = JSON.stringify(text);
|
|
125252
|
-
return quotePreference === 0 /* Single */ ? "'"
|
|
125278
|
+
return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
|
|
125253
125279
|
}
|
|
125254
125280
|
ts.quote = quote;
|
|
125255
125281
|
function isEqualityOperatorKind(kind) {
|
|
@@ -125621,7 +125647,7 @@ var ts;
|
|
|
125621
125647
|
var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
|
|
125622
125648
|
// Scoped packages
|
|
125623
125649
|
if (ts.startsWith(components[0], "@")) {
|
|
125624
|
-
return components[0]
|
|
125650
|
+
return "".concat(components[0], "/").concat(components[1]);
|
|
125625
125651
|
}
|
|
125626
125652
|
return components[0];
|
|
125627
125653
|
}
|
|
@@ -125728,13 +125754,13 @@ var ts;
|
|
|
125728
125754
|
ts.getNameForExportedSymbol = getNameForExportedSymbol;
|
|
125729
125755
|
function getSymbolParentOrFail(symbol) {
|
|
125730
125756
|
var _a;
|
|
125731
|
-
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: "
|
|
125732
|
-
|
|
125757
|
+
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
|
|
125758
|
+
"Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
|
|
125733
125759
|
var kind = ts.Debug.formatSyntaxKind(d.kind);
|
|
125734
125760
|
var inJS = ts.isInJSFile(d);
|
|
125735
125761
|
var expression = d.expression;
|
|
125736
|
-
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: "
|
|
125737
|
-
}).join(", ")
|
|
125762
|
+
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
|
|
125763
|
+
}).join(", "), "."));
|
|
125738
125764
|
}
|
|
125739
125765
|
/**
|
|
125740
125766
|
* Useful to check whether a string contains another string at a specific index
|
|
@@ -125942,7 +125968,7 @@ var ts;
|
|
|
125942
125968
|
: checker.tryFindAmbientModule(info.moduleName));
|
|
125943
125969
|
var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
|
|
125944
125970
|
? checker.resolveExternalModuleSymbol(moduleSymbol)
|
|
125945
|
-
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '"
|
|
125971
|
+
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '".concat(info.symbolName, "' by key '").concat(info.symbolTableKey, "' in module ").concat(moduleSymbol.name));
|
|
125946
125972
|
symbols.set(id, [symbol, moduleSymbol]);
|
|
125947
125973
|
return {
|
|
125948
125974
|
symbol: symbol,
|
|
@@ -125955,7 +125981,7 @@ var ts;
|
|
|
125955
125981
|
}
|
|
125956
125982
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
125957
125983
|
var moduleKey = ambientModuleName || "";
|
|
125958
|
-
return importedName
|
|
125984
|
+
return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
|
|
125959
125985
|
}
|
|
125960
125986
|
function parseKey(key) {
|
|
125961
125987
|
var symbolName = key.substring(0, key.indexOf("|"));
|
|
@@ -126035,7 +126061,7 @@ var ts;
|
|
|
126035
126061
|
if (autoImportProvider) {
|
|
126036
126062
|
var start = ts.timestamp();
|
|
126037
126063
|
forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), function (module, file) { return cb(module, file, autoImportProvider, /*isFromPackageJson*/ true); });
|
|
126038
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: "
|
|
126064
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
|
|
126039
126065
|
}
|
|
126040
126066
|
}
|
|
126041
126067
|
ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
|
|
@@ -126089,7 +126115,7 @@ var ts;
|
|
|
126089
126115
|
}
|
|
126090
126116
|
});
|
|
126091
126117
|
});
|
|
126092
|
-
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in "
|
|
126118
|
+
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
|
|
126093
126119
|
return cache;
|
|
126094
126120
|
}
|
|
126095
126121
|
ts.getExportInfoMap = getExportInfoMap;
|
|
@@ -126622,7 +126648,7 @@ var ts;
|
|
|
126622
126648
|
return { spans: spans, endOfLineState: 0 /* None */ };
|
|
126623
126649
|
function pushClassification(start, end, type) {
|
|
126624
126650
|
var length = end - start;
|
|
126625
|
-
ts.Debug.assert(length > 0, "Classification had non-positive length of "
|
|
126651
|
+
ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
|
|
126626
126652
|
spans.push(start);
|
|
126627
126653
|
spans.push(length);
|
|
126628
126654
|
spans.push(type);
|
|
@@ -127490,7 +127516,7 @@ var ts;
|
|
|
127490
127516
|
case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
|
|
127491
127517
|
case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
|
|
127492
127518
|
case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
|
|
127493
|
-
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension "
|
|
127519
|
+
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
|
|
127494
127520
|
case undefined: return "" /* none */;
|
|
127495
127521
|
default:
|
|
127496
127522
|
return ts.Debug.assertNever(extension);
|
|
@@ -128219,10 +128245,10 @@ var ts;
|
|
|
128219
128245
|
var resolvedFromCacheCount = 0;
|
|
128220
128246
|
var cacheAttemptCount = 0;
|
|
128221
128247
|
var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
|
|
128222
|
-
var hitRateMessage = cacheAttemptCount ? " ("
|
|
128223
|
-
(_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix
|
|
128224
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix
|
|
128225
|
-
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix
|
|
128248
|
+
var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
|
|
128249
|
+
(_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));
|
|
128250
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
|
|
128251
|
+
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
|
|
128226
128252
|
return result;
|
|
128227
128253
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
128228
128254
|
if (isFromAmbientModule) {
|
|
@@ -128525,15 +128551,15 @@ var ts;
|
|
|
128525
128551
|
var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
|
|
128526
128552
|
if (origin && originIsThisType(origin)) {
|
|
128527
128553
|
insertText = needsConvertPropertyAccess
|
|
128528
|
-
? "this"
|
|
128529
|
-
: "this"
|
|
128554
|
+
? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
|
|
128555
|
+
: "this".concat(insertQuestionDot ? "?." : ".").concat(name);
|
|
128530
128556
|
}
|
|
128531
128557
|
// We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
|
|
128532
128558
|
// 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.
|
|
128533
128559
|
else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
|
|
128534
|
-
insertText = useBraces ? needsConvertPropertyAccess ? "["
|
|
128560
|
+
insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
|
|
128535
128561
|
if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
|
|
128536
|
-
insertText = "?."
|
|
128562
|
+
insertText = "?.".concat(insertText);
|
|
128537
128563
|
}
|
|
128538
128564
|
var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
|
|
128539
128565
|
ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
|
|
@@ -128547,7 +128573,7 @@ var ts;
|
|
|
128547
128573
|
if (isJsxInitializer) {
|
|
128548
128574
|
if (insertText === undefined)
|
|
128549
128575
|
insertText = name;
|
|
128550
|
-
insertText = "{"
|
|
128576
|
+
insertText = "{".concat(insertText, "}");
|
|
128551
128577
|
if (typeof isJsxInitializer !== "boolean") {
|
|
128552
128578
|
replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
|
|
128553
128579
|
}
|
|
@@ -128560,8 +128586,8 @@ var ts;
|
|
|
128560
128586
|
if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
|
|
128561
128587
|
awaitText = ";";
|
|
128562
128588
|
}
|
|
128563
|
-
awaitText += "(await "
|
|
128564
|
-
insertText = needsConvertPropertyAccess ? ""
|
|
128589
|
+
awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
|
|
128590
|
+
insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
|
|
128565
128591
|
replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
|
|
128566
128592
|
}
|
|
128567
128593
|
if (originIsResolvedExport(origin)) {
|
|
@@ -128592,7 +128618,7 @@ var ts;
|
|
|
128592
128618
|
&& !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
|
|
128593
128619
|
if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
|
|
128594
128620
|
// If is string like or undefined use quotes
|
|
128595
|
-
insertText = ts.escapeSnippetText(name)
|
|
128621
|
+
insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
|
|
128596
128622
|
isSnippet = true;
|
|
128597
128623
|
}
|
|
128598
128624
|
else {
|
|
@@ -128601,12 +128627,9 @@ var ts;
|
|
|
128601
128627
|
}
|
|
128602
128628
|
}
|
|
128603
128629
|
if (useBraces_1) {
|
|
128604
|
-
insertText = ts.escapeSnippetText(name)
|
|
128630
|
+
insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
|
|
128605
128631
|
isSnippet = true;
|
|
128606
128632
|
}
|
|
128607
|
-
if (isSnippet) {
|
|
128608
|
-
replacementSpan = ts.createTextSpanFromNode(location, sourceFile);
|
|
128609
|
-
}
|
|
128610
128633
|
}
|
|
128611
128634
|
if (insertText !== undefined && !preferences.includeCompletionsWithInsertText) {
|
|
128612
128635
|
return undefined;
|
|
@@ -128691,7 +128714,7 @@ var ts;
|
|
|
128691
128714
|
removeComments: true,
|
|
128692
128715
|
module: options.module,
|
|
128693
128716
|
target: options.target,
|
|
128694
|
-
omitTrailingSemicolon:
|
|
128717
|
+
omitTrailingSemicolon: false,
|
|
128695
128718
|
newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
|
|
128696
128719
|
});
|
|
128697
128720
|
var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
|
|
@@ -128747,9 +128770,9 @@ var ts;
|
|
|
128747
128770
|
}
|
|
128748
128771
|
node = ts.factory.updateModifiers(node, modifiers & (~presentModifiers));
|
|
128749
128772
|
completionNodes.push(node);
|
|
128750
|
-
}, body, isAbstract);
|
|
128773
|
+
}, body, 2 /* Property */, isAbstract);
|
|
128751
128774
|
if (completionNodes.length) {
|
|
128752
|
-
insertText = printer.printSnippetList(1 /* MultiLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
128775
|
+
insertText = printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
128753
128776
|
}
|
|
128754
128777
|
return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder };
|
|
128755
128778
|
}
|
|
@@ -128868,14 +128891,14 @@ var ts;
|
|
|
128868
128891
|
var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
|
|
128869
128892
|
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);
|
|
128870
128893
|
var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
|
|
128871
|
-
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " "
|
|
128872
|
-
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */)
|
|
128894
|
+
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
|
|
128895
|
+
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
|
|
128873
128896
|
var suffix = useSemicolons ? ";" : "";
|
|
128874
128897
|
switch (importKind) {
|
|
128875
|
-
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
128876
|
-
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
128877
|
-
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
128878
|
-
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
128898
|
+
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
|
|
128899
|
+
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
128900
|
+
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
128901
|
+
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
128879
128902
|
}
|
|
128880
128903
|
}
|
|
128881
128904
|
function quotePropertyName(sourceFile, preferences, name) {
|
|
@@ -131774,7 +131797,7 @@ var ts;
|
|
|
131774
131797
|
}
|
|
131775
131798
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
131776
131799
|
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"));
|
|
131777
|
-
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:"
|
|
131800
|
+
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));
|
|
131778
131801
|
return entry;
|
|
131779
131802
|
}
|
|
131780
131803
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
@@ -132786,7 +132809,7 @@ var ts;
|
|
|
132786
132809
|
sourceFile: def.file,
|
|
132787
132810
|
name: def.reference.fileName,
|
|
132788
132811
|
kind: "string" /* string */,
|
|
132789
|
-
displayParts: [ts.displayPart("\""
|
|
132812
|
+
displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
|
|
132790
132813
|
};
|
|
132791
132814
|
}
|
|
132792
132815
|
default:
|
|
@@ -133366,7 +133389,7 @@ var ts;
|
|
|
133366
133389
|
if (symbol.flags & 33554432 /* Transient */)
|
|
133367
133390
|
return undefined;
|
|
133368
133391
|
// Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
|
|
133369
|
-
ts.Debug.fail("Unexpected symbol at "
|
|
133392
|
+
ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
|
|
133370
133393
|
}
|
|
133371
133394
|
return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
|
|
133372
133395
|
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
|
|
@@ -134650,8 +134673,8 @@ var ts;
|
|
|
134650
134673
|
var end = pos + 6; /* "static".length */
|
|
134651
134674
|
var typeChecker = program.getTypeChecker();
|
|
134652
134675
|
var symbol = typeChecker.getSymbolAtLocation(node.parent);
|
|
134653
|
-
var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent)
|
|
134654
|
-
return { text: prefix
|
|
134676
|
+
var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
|
|
134677
|
+
return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
|
|
134655
134678
|
}
|
|
134656
134679
|
var declName = isConstNamedExpression(node) ? node.parent.name :
|
|
134657
134680
|
ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
@@ -135912,7 +135935,7 @@ var ts;
|
|
|
135912
135935
|
function getJSDocTagCompletions() {
|
|
135913
135936
|
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
|
|
135914
135937
|
return {
|
|
135915
|
-
name: "@"
|
|
135938
|
+
name: "@".concat(tagName),
|
|
135916
135939
|
kind: "keyword" /* keyword */,
|
|
135917
135940
|
kindModifiers: "",
|
|
135918
135941
|
sortText: ts.Completions.SortText.LocationPriority
|
|
@@ -136044,11 +136067,11 @@ var ts;
|
|
|
136044
136067
|
var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
|
|
136045
136068
|
var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
|
|
136046
136069
|
var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
|
|
136047
|
-
return indentationStr
|
|
136070
|
+
return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
|
|
136048
136071
|
}).join("");
|
|
136049
136072
|
}
|
|
136050
136073
|
function returnsDocComment(indentationStr, newLine) {
|
|
136051
|
-
return indentationStr
|
|
136074
|
+
return "".concat(indentationStr, " * @returns").concat(newLine);
|
|
136052
136075
|
}
|
|
136053
136076
|
function getCommentOwnerInfo(tokenAtPos, options) {
|
|
136054
136077
|
return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
|
|
@@ -136888,7 +136911,7 @@ var ts;
|
|
|
136888
136911
|
}
|
|
136889
136912
|
if (name) {
|
|
136890
136913
|
var text = ts.isIdentifier(name) ? name.text
|
|
136891
|
-
: ts.isElementAccessExpression(name) ? "["
|
|
136914
|
+
: ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
|
|
136892
136915
|
: nodeText(name);
|
|
136893
136916
|
if (text.length > 0) {
|
|
136894
136917
|
return cleanText(text);
|
|
@@ -136898,7 +136921,7 @@ var ts;
|
|
|
136898
136921
|
case 303 /* SourceFile */:
|
|
136899
136922
|
var sourceFile = node;
|
|
136900
136923
|
return ts.isExternalModule(sourceFile)
|
|
136901
|
-
? "\""
|
|
136924
|
+
? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
|
|
136902
136925
|
: "<global>";
|
|
136903
136926
|
case 270 /* ExportAssignment */:
|
|
136904
136927
|
return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
|
|
@@ -137094,10 +137117,10 @@ var ts;
|
|
|
137094
137117
|
if (name !== undefined) {
|
|
137095
137118
|
name = cleanText(name);
|
|
137096
137119
|
if (name.length > maxLength) {
|
|
137097
|
-
return name
|
|
137120
|
+
return "".concat(name, " callback");
|
|
137098
137121
|
}
|
|
137099
137122
|
var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
|
|
137100
|
-
return name
|
|
137123
|
+
return "".concat(name, "(").concat(args, ") callback");
|
|
137101
137124
|
}
|
|
137102
137125
|
}
|
|
137103
137126
|
return "<function>";
|
|
@@ -137110,7 +137133,7 @@ var ts;
|
|
|
137110
137133
|
else if (ts.isPropertyAccessExpression(expr)) {
|
|
137111
137134
|
var left = getCalledExpressionName(expr.expression);
|
|
137112
137135
|
var right = expr.name.text;
|
|
137113
|
-
return left === undefined ? right : left
|
|
137136
|
+
return left === undefined ? right : "".concat(left, ".").concat(right);
|
|
137114
137137
|
}
|
|
137115
137138
|
else {
|
|
137116
137139
|
return undefined;
|
|
@@ -139542,7 +139565,7 @@ var ts;
|
|
|
139542
139565
|
var _loop_9 = function (n) {
|
|
139543
139566
|
// If the node is not a subspan of its parent, this is a big problem.
|
|
139544
139567
|
// There have been crashes that might be caused by this violation.
|
|
139545
|
-
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: "
|
|
139568
|
+
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)); });
|
|
139546
139569
|
var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
|
|
139547
139570
|
if (argumentInfo) {
|
|
139548
139571
|
return { value: argumentInfo };
|
|
@@ -139714,7 +139737,7 @@ var ts;
|
|
|
139714
139737
|
(function (InlayHints) {
|
|
139715
139738
|
var maxHintsLength = 30;
|
|
139716
139739
|
var leadingParameterNameCommentRegexFactory = function (name) {
|
|
139717
|
-
return new RegExp("^\\s?/\\*\\*?\\s?"
|
|
139740
|
+
return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
|
|
139718
139741
|
};
|
|
139719
139742
|
function shouldShowParameterNameHints(preferences) {
|
|
139720
139743
|
return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
|
|
@@ -139778,7 +139801,7 @@ var ts;
|
|
|
139778
139801
|
}
|
|
139779
139802
|
function addParameterHints(text, position, isFirstVariadicArgument) {
|
|
139780
139803
|
result.push({
|
|
139781
|
-
text: ""
|
|
139804
|
+
text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
|
|
139782
139805
|
position: position,
|
|
139783
139806
|
kind: "Parameter" /* Parameter */,
|
|
139784
139807
|
whitespaceAfter: true,
|
|
@@ -139786,7 +139809,7 @@ var ts;
|
|
|
139786
139809
|
}
|
|
139787
139810
|
function addTypeHints(text, position) {
|
|
139788
139811
|
result.push({
|
|
139789
|
-
text: ": "
|
|
139812
|
+
text: ": ".concat(truncation(text, maxHintsLength)),
|
|
139790
139813
|
position: position,
|
|
139791
139814
|
kind: "Type" /* Type */,
|
|
139792
139815
|
whitespaceBefore: true,
|
|
@@ -139794,7 +139817,7 @@ var ts;
|
|
|
139794
139817
|
}
|
|
139795
139818
|
function addEnumMemberValueHints(text, position) {
|
|
139796
139819
|
result.push({
|
|
139797
|
-
text: "= "
|
|
139820
|
+
text: "= ".concat(truncation(text, maxHintsLength)),
|
|
139798
139821
|
position: position,
|
|
139799
139822
|
kind: "Enum" /* Enum */,
|
|
139800
139823
|
whitespaceBefore: true,
|
|
@@ -140329,7 +140352,7 @@ var ts;
|
|
|
140329
140352
|
}
|
|
140330
140353
|
}
|
|
140331
140354
|
function getKeyFromNode(exp) {
|
|
140332
|
-
return exp.pos.toString()
|
|
140355
|
+
return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
|
|
140333
140356
|
}
|
|
140334
140357
|
function canBeConvertedToClass(node, checker) {
|
|
140335
140358
|
var _a, _b, _c, _d;
|
|
@@ -144447,7 +144470,7 @@ var ts;
|
|
|
144447
144470
|
var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
144448
144471
|
var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
144449
144472
|
var indent = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
144450
|
-
var text = (insertAtLineStart ? "" : this.newLineCharacter
|
|
144473
|
+
var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
|
|
144451
144474
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
144452
144475
|
};
|
|
144453
144476
|
ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
|
|
@@ -144647,7 +144670,7 @@ var ts;
|
|
|
144647
144670
|
};
|
|
144648
144671
|
ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
|
|
144649
144672
|
var options = this.getInsertNodeAfterOptionsWorker(after);
|
|
144650
|
-
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n"
|
|
144673
|
+
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
|
|
144651
144674
|
};
|
|
144652
144675
|
ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
|
|
144653
144676
|
switch (node.kind) {
|
|
@@ -144681,7 +144704,7 @@ var ts;
|
|
|
144681
144704
|
}
|
|
144682
144705
|
else {
|
|
144683
144706
|
// `x => {}` -> `function f(x) {}`
|
|
144684
|
-
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function "
|
|
144707
|
+
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
|
|
144685
144708
|
// Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
|
|
144686
144709
|
this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
|
|
144687
144710
|
}
|
|
@@ -144738,7 +144761,7 @@ var ts;
|
|
|
144738
144761
|
var nextNode = containingList[index + 1];
|
|
144739
144762
|
var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
144740
144763
|
// write separator and leading trivia of the next element as suffix
|
|
144741
|
-
var suffix = ""
|
|
144764
|
+
var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
|
|
144742
144765
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
|
|
144743
144766
|
}
|
|
144744
144767
|
}
|
|
@@ -144783,7 +144806,7 @@ var ts;
|
|
|
144783
144806
|
this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
|
|
144784
144807
|
}
|
|
144785
144808
|
else {
|
|
144786
|
-
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator)
|
|
144809
|
+
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
|
|
144787
144810
|
}
|
|
144788
144811
|
}
|
|
144789
144812
|
};
|
|
@@ -144885,7 +144908,7 @@ var ts;
|
|
|
144885
144908
|
var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
|
|
144886
144909
|
var _loop_12 = function (i) {
|
|
144887
144910
|
ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
|
|
144888
|
-
return JSON.stringify(normalized[i].range)
|
|
144911
|
+
return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
|
|
144889
144912
|
});
|
|
144890
144913
|
};
|
|
144891
144914
|
// verify that change intervals do not overlap, except possibly at end points.
|
|
@@ -144982,7 +145005,7 @@ var ts;
|
|
|
144982
145005
|
function applyChanges(text, changes) {
|
|
144983
145006
|
for (var i = changes.length - 1; i >= 0; i--) {
|
|
144984
145007
|
var _a = changes[i], span = _a.span, newText = _a.newText;
|
|
144985
|
-
text = ""
|
|
145008
|
+
text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
|
|
144986
145009
|
}
|
|
144987
145010
|
return text;
|
|
144988
145011
|
}
|
|
@@ -146113,9 +146136,6 @@ var ts;
|
|
|
146113
146136
|
});
|
|
146114
146137
|
function makeChange(changeTracker, sourceFile, pos) {
|
|
146115
146138
|
var token = ts.getTokenAtPosition(sourceFile, pos);
|
|
146116
|
-
if (!ts.isIdentifier(token)) {
|
|
146117
|
-
return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.Debug.formatSyntaxKind(token.kind));
|
|
146118
|
-
}
|
|
146119
146139
|
var param = token.parent;
|
|
146120
146140
|
if (!ts.isParameter(param)) {
|
|
146121
146141
|
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.Debug.formatSyntaxKind(token.kind));
|
|
@@ -146123,9 +146143,10 @@ var ts;
|
|
|
146123
146143
|
var i = param.parent.parameters.indexOf(param);
|
|
146124
146144
|
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
|
|
146125
146145
|
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
|
|
146146
|
+
var typeNode = ts.factory.createTypeReferenceNode(param.name, /*typeArguments*/ undefined);
|
|
146126
146147
|
var replacement = ts.factory.createParameterDeclaration(
|
|
146127
|
-
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.factory.
|
|
146128
|
-
changeTracker.replaceNode(sourceFile,
|
|
146148
|
+
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, param.dotDotDotToken ? ts.factory.createArrayTypeNode(typeNode) : typeNode, param.initializer);
|
|
146149
|
+
changeTracker.replaceNode(sourceFile, param, replacement);
|
|
146129
146150
|
}
|
|
146130
146151
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
146131
146152
|
})(ts || (ts = {}));
|
|
@@ -147456,7 +147477,7 @@ var ts;
|
|
|
147456
147477
|
if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
|
|
147457
147478
|
|| checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
|
|
147458
147479
|
// Unconditionally add an underscore in case `text` is a keyword.
|
|
147459
|
-
res.set(text, makeUniqueName("_"
|
|
147480
|
+
res.set(text, makeUniqueName("_".concat(text), identifiers));
|
|
147460
147481
|
}
|
|
147461
147482
|
});
|
|
147462
147483
|
return res;
|
|
@@ -147556,7 +147577,7 @@ var ts;
|
|
|
147556
147577
|
// `const a = require("b").c` --> `import { c as a } from "./b";
|
|
147557
147578
|
return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
|
|
147558
147579
|
default:
|
|
147559
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form "
|
|
147580
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
|
|
147560
147581
|
}
|
|
147561
147582
|
}
|
|
147562
147583
|
function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
|
|
@@ -147607,7 +147628,7 @@ var ts;
|
|
|
147607
147628
|
case 168 /* MethodDeclaration */:
|
|
147608
147629
|
return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
|
|
147609
147630
|
default:
|
|
147610
|
-
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind "
|
|
147631
|
+
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
|
|
147611
147632
|
}
|
|
147612
147633
|
});
|
|
147613
147634
|
return statements && [statements, false];
|
|
@@ -147741,7 +147762,7 @@ var ts;
|
|
|
147741
147762
|
case 79 /* Identifier */:
|
|
147742
147763
|
return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
|
|
147743
147764
|
default:
|
|
147744
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind "
|
|
147765
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
|
|
147745
147766
|
}
|
|
147746
147767
|
}
|
|
147747
147768
|
/**
|
|
@@ -147798,7 +147819,7 @@ var ts;
|
|
|
147798
147819
|
// Identifiers helpers
|
|
147799
147820
|
function makeUniqueName(name, identifiers) {
|
|
147800
147821
|
while (identifiers.original.has(name) || identifiers.additional.has(name)) {
|
|
147801
|
-
name = "_"
|
|
147822
|
+
name = "_".concat(name);
|
|
147802
147823
|
}
|
|
147803
147824
|
identifiers.additional.add(name);
|
|
147804
147825
|
return name;
|
|
@@ -147878,7 +147899,7 @@ var ts;
|
|
|
147878
147899
|
if (!qualifiedName)
|
|
147879
147900
|
return undefined;
|
|
147880
147901
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
|
|
147881
|
-
var newText = qualifiedName.left.text
|
|
147902
|
+
var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
|
|
147882
147903
|
return [codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, ts.Diagnostics.Rewrite_all_as_indexed_access_types)];
|
|
147883
147904
|
},
|
|
147884
147905
|
fixIds: [fixId],
|
|
@@ -148275,7 +148296,7 @@ var ts;
|
|
|
148275
148296
|
break;
|
|
148276
148297
|
}
|
|
148277
148298
|
default:
|
|
148278
|
-
ts.Debug.assertNever(fix, "fix wasn't never - got kind "
|
|
148299
|
+
ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
|
|
148279
148300
|
}
|
|
148280
148301
|
function reduceAddAsTypeOnlyValues(prevValue, newValue) {
|
|
148281
148302
|
// `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
|
|
@@ -148319,7 +148340,7 @@ var ts;
|
|
|
148319
148340
|
return newEntry;
|
|
148320
148341
|
}
|
|
148321
148342
|
function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
|
|
148322
|
-
return (topLevelTypeOnly ? 1 : 0
|
|
148343
|
+
return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
|
|
148323
148344
|
}
|
|
148324
148345
|
}
|
|
148325
148346
|
function writeFixes(changeTracker) {
|
|
@@ -148772,7 +148793,7 @@ var ts;
|
|
|
148772
148793
|
case ts.ModuleKind.NodeNext:
|
|
148773
148794
|
return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
|
|
148774
148795
|
default:
|
|
148775
|
-
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind "
|
|
148796
|
+
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
|
|
148776
148797
|
}
|
|
148777
148798
|
}
|
|
148778
148799
|
function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
|
|
@@ -148879,7 +148900,7 @@ var ts;
|
|
|
148879
148900
|
switch (fix.kind) {
|
|
148880
148901
|
case 0 /* UseNamespace */:
|
|
148881
148902
|
addNamespaceQualifier(changes, sourceFile, fix);
|
|
148882
|
-
return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix
|
|
148903
|
+
return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
|
|
148883
148904
|
case 1 /* JsdocTypeImport */:
|
|
148884
148905
|
addImportType(changes, sourceFile, fix, quotePreference);
|
|
148885
148906
|
return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
|
|
@@ -148903,7 +148924,7 @@ var ts;
|
|
|
148903
148924
|
return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
|
|
148904
148925
|
}
|
|
148905
148926
|
default:
|
|
148906
|
-
return ts.Debug.assertNever(fix, "Unexpected fix kind "
|
|
148927
|
+
return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
|
|
148907
148928
|
}
|
|
148908
148929
|
}
|
|
148909
148930
|
function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) {
|
|
@@ -148999,7 +149020,7 @@ var ts;
|
|
|
148999
149020
|
}
|
|
149000
149021
|
function getImportTypePrefix(moduleSpecifier, quotePreference) {
|
|
149001
149022
|
var quote = ts.getQuoteFromPreference(quotePreference);
|
|
149002
|
-
return "import("
|
|
149023
|
+
return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
|
|
149003
149024
|
}
|
|
149004
149025
|
function needsTypeOnly(_a) {
|
|
149005
149026
|
var addAsTypeOnly = _a.addAsTypeOnly;
|
|
@@ -149092,7 +149113,7 @@ var ts;
|
|
|
149092
149113
|
lastCharWasValid = isValid;
|
|
149093
149114
|
}
|
|
149094
149115
|
// Need `|| "_"` to ensure result isn't empty.
|
|
149095
|
-
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_"
|
|
149116
|
+
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
|
|
149096
149117
|
}
|
|
149097
149118
|
codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
|
|
149098
149119
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -150292,7 +150313,7 @@ var ts;
|
|
|
150292
150313
|
break;
|
|
150293
150314
|
}
|
|
150294
150315
|
default:
|
|
150295
|
-
ts.Debug.fail("Bad fixId: "
|
|
150316
|
+
ts.Debug.fail("Bad fixId: ".concat(context.fixId));
|
|
150296
150317
|
}
|
|
150297
150318
|
});
|
|
150298
150319
|
},
|
|
@@ -150740,7 +150761,7 @@ var ts;
|
|
|
150740
150761
|
if (!isValidCharacter(character)) {
|
|
150741
150762
|
return;
|
|
150742
150763
|
}
|
|
150743
|
-
var replacement = useHtmlEntity ? htmlEntity[character] : "{"
|
|
150764
|
+
var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
|
|
150744
150765
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
150745
150766
|
}
|
|
150746
150767
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -150931,11 +150952,11 @@ var ts;
|
|
|
150931
150952
|
token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
|
|
150932
150953
|
}
|
|
150933
150954
|
if (ts.isIdentifier(token) && canPrefix(token)) {
|
|
150934
|
-
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_"
|
|
150955
|
+
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
|
|
150935
150956
|
if (ts.isParameter(token.parent)) {
|
|
150936
150957
|
ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
|
|
150937
150958
|
if (ts.isIdentifier(tag.name)) {
|
|
150938
|
-
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_"
|
|
150959
|
+
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
|
|
150939
150960
|
}
|
|
150940
150961
|
});
|
|
150941
150962
|
}
|
|
@@ -151271,7 +151292,7 @@ var ts;
|
|
|
151271
151292
|
}); }
|
|
151272
151293
|
});
|
|
151273
151294
|
function doChange(changes, sourceFile, name) {
|
|
151274
|
-
changes.replaceNodeWithText(sourceFile, name, name.text
|
|
151295
|
+
changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
|
|
151275
151296
|
}
|
|
151276
151297
|
function getCallName(sourceFile, start) {
|
|
151277
151298
|
var token = ts.getTokenAtPosition(sourceFile, start);
|
|
@@ -152420,7 +152441,7 @@ var ts;
|
|
|
152420
152441
|
var parameters = [];
|
|
152421
152442
|
var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
|
|
152422
152443
|
var _loop_16 = function (i) {
|
|
152423
|
-
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg"
|
|
152444
|
+
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
|
|
152424
152445
|
symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
|
|
152425
152446
|
if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
|
|
152426
152447
|
symbol.flags |= 16777216 /* Optional */;
|
|
@@ -152523,7 +152544,7 @@ var ts;
|
|
|
152523
152544
|
codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
|
|
152524
152545
|
ts.createTextChange(sourceFile.checkJsDirective
|
|
152525
152546
|
? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
|
|
152526
|
-
: ts.createTextSpan(0, 0), "// @ts-nocheck"
|
|
152547
|
+
: ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
|
|
152527
152548
|
])], ts.Diagnostics.Disable_checking_for_this_file),
|
|
152528
152549
|
];
|
|
152529
152550
|
if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
|
|
@@ -152579,11 +152600,18 @@ var ts;
|
|
|
152579
152600
|
};
|
|
152580
152601
|
}
|
|
152581
152602
|
codefix.getNoopSymbolTrackerWithResolver = getNoopSymbolTrackerWithResolver;
|
|
152603
|
+
var PreserveOptionalFlags;
|
|
152604
|
+
(function (PreserveOptionalFlags) {
|
|
152605
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Method"] = 1] = "Method";
|
|
152606
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Property"] = 2] = "Property";
|
|
152607
|
+
PreserveOptionalFlags[PreserveOptionalFlags["All"] = 3] = "All";
|
|
152608
|
+
})(PreserveOptionalFlags = codefix.PreserveOptionalFlags || (codefix.PreserveOptionalFlags = {}));
|
|
152582
152609
|
/**
|
|
152583
152610
|
* `addClassElement` will not be called if we can't figure out a representation for `symbol` in `enclosingDeclaration`.
|
|
152584
152611
|
* @param body If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub.
|
|
152585
152612
|
*/
|
|
152586
|
-
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, isAmbient) {
|
|
152613
|
+
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional, isAmbient) {
|
|
152614
|
+
if (preserveOptional === void 0) { preserveOptional = 3 /* All */; }
|
|
152587
152615
|
if (isAmbient === void 0) { isAmbient = false; }
|
|
152588
152616
|
var declarations = symbol.getDeclarations();
|
|
152589
152617
|
if (!(declarations && declarations.length)) {
|
|
@@ -152612,7 +152640,7 @@ var ts;
|
|
|
152612
152640
|
}
|
|
152613
152641
|
}
|
|
152614
152642
|
addClassElement(ts.factory.createPropertyDeclaration(
|
|
152615
|
-
/*decorators*/ undefined, modifiers, name, optional ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
152643
|
+
/*decorators*/ undefined, modifiers, name, optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
152616
152644
|
/*initializer*/ undefined));
|
|
152617
152645
|
break;
|
|
152618
152646
|
case 171 /* GetAccessor */:
|
|
@@ -152676,13 +152704,13 @@ var ts;
|
|
|
152676
152704
|
}
|
|
152677
152705
|
else {
|
|
152678
152706
|
ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count");
|
|
152679
|
-
addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional, modifiers, quotePreference, body));
|
|
152707
|
+
addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body));
|
|
152680
152708
|
}
|
|
152681
152709
|
}
|
|
152682
152710
|
break;
|
|
152683
152711
|
}
|
|
152684
152712
|
function outputMethod(quotePreference, signature, modifiers, name, body) {
|
|
152685
|
-
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder);
|
|
152713
|
+
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder);
|
|
152686
152714
|
if (method)
|
|
152687
152715
|
addClassElement(method);
|
|
152688
152716
|
}
|
|
@@ -152782,7 +152810,7 @@ var ts;
|
|
|
152782
152810
|
var typeParameters = isJs || typeArguments === undefined
|
|
152783
152811
|
? undefined
|
|
152784
152812
|
: ts.map(typeArguments, function (_, i) {
|
|
152785
|
-
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T"
|
|
152813
|
+
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
|
|
152786
152814
|
});
|
|
152787
152815
|
var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
|
|
152788
152816
|
var type = isJs || contextualType === undefined
|
|
@@ -152817,7 +152845,7 @@ var ts;
|
|
|
152817
152845
|
/*decorators*/ undefined,
|
|
152818
152846
|
/*modifiers*/ undefined,
|
|
152819
152847
|
/*dotDotDotToken*/ undefined,
|
|
152820
|
-
/*name*/ names && names[i] || "arg"
|
|
152848
|
+
/*name*/ names && names[i] || "arg".concat(i),
|
|
152821
152849
|
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
|
|
152822
152850
|
/*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
|
|
152823
152851
|
/*initializer*/ undefined);
|
|
@@ -153068,7 +153096,7 @@ var ts;
|
|
|
153068
153096
|
}
|
|
153069
153097
|
var name = declaration.name.text;
|
|
153070
153098
|
var startWithUnderscore = ts.startsWithUnderscore(name);
|
|
153071
|
-
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_"
|
|
153099
|
+
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
|
|
153072
153100
|
var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
|
|
153073
153101
|
return {
|
|
153074
153102
|
isStatic: ts.hasStaticModifier(declaration),
|
|
@@ -154092,7 +154120,7 @@ var ts;
|
|
|
154092
154120
|
changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
|
|
154093
154121
|
break;
|
|
154094
154122
|
default:
|
|
154095
|
-
ts.Debug.fail("Unexpected exportNode kind "
|
|
154123
|
+
ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
|
|
154096
154124
|
}
|
|
154097
154125
|
}
|
|
154098
154126
|
}
|
|
@@ -154180,7 +154208,7 @@ var ts;
|
|
|
154180
154208
|
break;
|
|
154181
154209
|
}
|
|
154182
154210
|
default:
|
|
154183
|
-
ts.Debug.assertNever(parent, "Unexpected parent kind "
|
|
154211
|
+
ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
|
|
154184
154212
|
}
|
|
154185
154213
|
}
|
|
154186
154214
|
function makeImportSpecifier(propertyName, name) {
|
|
@@ -154744,7 +154772,7 @@ var ts;
|
|
|
154744
154772
|
var newComment = ts.displayPartsToString(parameterDocComment);
|
|
154745
154773
|
if (newComment.length) {
|
|
154746
154774
|
ts.setSyntheticLeadingComments(result, [{
|
|
154747
|
-
text: "*\n"
|
|
154775
|
+
text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
|
|
154748
154776
|
kind: 3 /* MultiLineCommentTrivia */,
|
|
154749
154777
|
pos: -1,
|
|
154750
154778
|
end: -1,
|
|
@@ -154889,7 +154917,7 @@ var ts;
|
|
|
154889
154917
|
usedFunctionNames.set(description, true);
|
|
154890
154918
|
functionActions.push({
|
|
154891
154919
|
description: description,
|
|
154892
|
-
name: "function_scope_"
|
|
154920
|
+
name: "function_scope_".concat(i),
|
|
154893
154921
|
kind: extractFunctionAction.kind
|
|
154894
154922
|
});
|
|
154895
154923
|
}
|
|
@@ -154897,7 +154925,7 @@ var ts;
|
|
|
154897
154925
|
else if (!innermostErrorFunctionAction) {
|
|
154898
154926
|
innermostErrorFunctionAction = {
|
|
154899
154927
|
description: description,
|
|
154900
|
-
name: "function_scope_"
|
|
154928
|
+
name: "function_scope_".concat(i),
|
|
154901
154929
|
notApplicableReason: getStringError(functionExtraction.errors),
|
|
154902
154930
|
kind: extractFunctionAction.kind
|
|
154903
154931
|
};
|
|
@@ -154913,7 +154941,7 @@ var ts;
|
|
|
154913
154941
|
usedConstantNames.set(description_1, true);
|
|
154914
154942
|
constantActions.push({
|
|
154915
154943
|
description: description_1,
|
|
154916
|
-
name: "constant_scope_"
|
|
154944
|
+
name: "constant_scope_".concat(i),
|
|
154917
154945
|
kind: extractConstantAction.kind
|
|
154918
154946
|
});
|
|
154919
154947
|
}
|
|
@@ -154921,7 +154949,7 @@ var ts;
|
|
|
154921
154949
|
else if (!innermostErrorConstantAction) {
|
|
154922
154950
|
innermostErrorConstantAction = {
|
|
154923
154951
|
description: description,
|
|
154924
|
-
name: "constant_scope_"
|
|
154952
|
+
name: "constant_scope_".concat(i),
|
|
154925
154953
|
notApplicableReason: getStringError(constantExtraction.errors),
|
|
154926
154954
|
kind: extractConstantAction.kind
|
|
154927
154955
|
};
|
|
@@ -155505,28 +155533,28 @@ var ts;
|
|
|
155505
155533
|
case 212 /* FunctionExpression */:
|
|
155506
155534
|
case 255 /* FunctionDeclaration */:
|
|
155507
155535
|
return scope.name
|
|
155508
|
-
? "function '"
|
|
155536
|
+
? "function '".concat(scope.name.text, "'")
|
|
155509
155537
|
: ts.ANONYMOUS;
|
|
155510
155538
|
case 213 /* ArrowFunction */:
|
|
155511
155539
|
return "arrow function";
|
|
155512
155540
|
case 168 /* MethodDeclaration */:
|
|
155513
|
-
return "method '"
|
|
155541
|
+
return "method '".concat(scope.name.getText(), "'");
|
|
155514
155542
|
case 171 /* GetAccessor */:
|
|
155515
|
-
return "'get "
|
|
155543
|
+
return "'get ".concat(scope.name.getText(), "'");
|
|
155516
155544
|
case 172 /* SetAccessor */:
|
|
155517
|
-
return "'set "
|
|
155545
|
+
return "'set ".concat(scope.name.getText(), "'");
|
|
155518
155546
|
default:
|
|
155519
|
-
throw ts.Debug.assertNever(scope, "Unexpected scope kind "
|
|
155547
|
+
throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
|
|
155520
155548
|
}
|
|
155521
155549
|
}
|
|
155522
155550
|
function getDescriptionForClassLikeDeclaration(scope) {
|
|
155523
155551
|
return scope.kind === 256 /* ClassDeclaration */
|
|
155524
|
-
? scope.name ? "class '"
|
|
155525
|
-
: scope.name ? "class expression '"
|
|
155552
|
+
? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
|
|
155553
|
+
: scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
|
|
155526
155554
|
}
|
|
155527
155555
|
function getDescriptionForModuleLikeDeclaration(scope) {
|
|
155528
155556
|
return scope.kind === 261 /* ModuleBlock */
|
|
155529
|
-
? "namespace '"
|
|
155557
|
+
? "namespace '".concat(scope.parent.name.getText(), "'")
|
|
155530
155558
|
: scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
|
|
155531
155559
|
}
|
|
155532
155560
|
var SpecialScope;
|
|
@@ -156993,7 +157021,7 @@ var ts;
|
|
|
156993
157021
|
case 253 /* VariableDeclaration */:
|
|
156994
157022
|
return ts.tryCast(node.name, ts.isIdentifier);
|
|
156995
157023
|
default:
|
|
156996
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157024
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
156997
157025
|
}
|
|
156998
157026
|
}
|
|
156999
157027
|
function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
|
|
@@ -157030,7 +157058,7 @@ var ts;
|
|
|
157030
157058
|
case 253 /* VariableDeclaration */:
|
|
157031
157059
|
return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
|
|
157032
157060
|
default:
|
|
157033
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157061
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
157034
157062
|
}
|
|
157035
157063
|
}
|
|
157036
157064
|
function moduleSpecifierFromImport(i) {
|
|
@@ -157117,7 +157145,7 @@ var ts;
|
|
|
157117
157145
|
deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
|
|
157118
157146
|
break;
|
|
157119
157147
|
default:
|
|
157120
|
-
ts.Debug.assertNever(importDecl, "Unexpected import decl kind "
|
|
157148
|
+
ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
|
|
157121
157149
|
}
|
|
157122
157150
|
}
|
|
157123
157151
|
function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
|
|
@@ -157217,7 +157245,7 @@ var ts;
|
|
|
157217
157245
|
var name = ts.combinePaths(inDirectory, newModuleName + extension);
|
|
157218
157246
|
if (!host.fileExists(name))
|
|
157219
157247
|
return newModuleName; // TODO: GH#18217
|
|
157220
|
-
newModuleName = moduleName
|
|
157248
|
+
newModuleName = "".concat(moduleName, ".").concat(i);
|
|
157221
157249
|
}
|
|
157222
157250
|
}
|
|
157223
157251
|
function getNewModuleName(movedSymbols) {
|
|
@@ -157324,7 +157352,7 @@ var ts;
|
|
|
157324
157352
|
return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
|
|
157325
157353
|
}
|
|
157326
157354
|
default:
|
|
157327
|
-
return ts.Debug.assertNever(i, "Unexpected import kind "
|
|
157355
|
+
return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
|
|
157328
157356
|
}
|
|
157329
157357
|
}
|
|
157330
157358
|
function filterNamedBindings(namedBindings, keep) {
|
|
@@ -157439,7 +157467,7 @@ var ts;
|
|
|
157439
157467
|
case 200 /* ObjectBindingPattern */:
|
|
157440
157468
|
return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
|
|
157441
157469
|
default:
|
|
157442
|
-
return ts.Debug.assertNever(name, "Unexpected name kind "
|
|
157470
|
+
return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
|
|
157443
157471
|
}
|
|
157444
157472
|
}
|
|
157445
157473
|
function nameOfTopLevelDeclaration(d) {
|
|
@@ -157500,7 +157528,7 @@ var ts;
|
|
|
157500
157528
|
case 237 /* ExpressionStatement */:
|
|
157501
157529
|
return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
157502
157530
|
default:
|
|
157503
|
-
return ts.Debug.assertNever(d, "Unexpected declaration kind "
|
|
157531
|
+
return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
|
|
157504
157532
|
}
|
|
157505
157533
|
}
|
|
157506
157534
|
function addCommonjsExport(decl) {
|
|
@@ -157522,7 +157550,7 @@ var ts;
|
|
|
157522
157550
|
case 237 /* ExpressionStatement */:
|
|
157523
157551
|
return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
157524
157552
|
default:
|
|
157525
|
-
return ts.Debug.assertNever(decl, "Unexpected decl kind "
|
|
157553
|
+
return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
|
|
157526
157554
|
}
|
|
157527
157555
|
}
|
|
157528
157556
|
/** Creates `exports.x = x;` */
|
|
@@ -158160,7 +158188,7 @@ var ts;
|
|
|
158160
158188
|
return [functionDeclaration.name, functionDeclaration.parent.name];
|
|
158161
158189
|
return [functionDeclaration.parent.name];
|
|
158162
158190
|
default:
|
|
158163
|
-
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind "
|
|
158191
|
+
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
|
|
158164
158192
|
}
|
|
158165
158193
|
}
|
|
158166
158194
|
})(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
|
|
@@ -158864,7 +158892,7 @@ var ts;
|
|
|
158864
158892
|
var textPos = ts.scanner.getTextPos();
|
|
158865
158893
|
if (textPos <= end) {
|
|
158866
158894
|
if (token === 79 /* Identifier */) {
|
|
158867
|
-
ts.Debug.fail("Did not expect "
|
|
158895
|
+
ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
|
|
158868
158896
|
}
|
|
158869
158897
|
nodes.push(createNode(token, pos, textPos, parent));
|
|
158870
158898
|
}
|
|
@@ -159746,7 +159774,7 @@ var ts;
|
|
|
159746
159774
|
function getValidSourceFile(fileName) {
|
|
159747
159775
|
var sourceFile = program.getSourceFile(fileName);
|
|
159748
159776
|
if (!sourceFile) {
|
|
159749
|
-
var error = new Error("Could not find source file: '"
|
|
159777
|
+
var error = new Error("Could not find source file: '".concat(fileName, "'."));
|
|
159750
159778
|
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
|
159751
159779
|
// See https://github.com/microsoft/TypeScript/issues/30180.
|
|
159752
159780
|
error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
|
|
@@ -160421,7 +160449,7 @@ var ts;
|
|
|
160421
160449
|
var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
|
|
160422
160450
|
: ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
|
|
160423
160451
|
if (element && isUnclosedTag(element)) {
|
|
160424
|
-
return { newText: "</"
|
|
160452
|
+
return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
|
|
160425
160453
|
}
|
|
160426
160454
|
var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
|
|
160427
160455
|
: ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
|
|
@@ -160527,7 +160555,7 @@ var ts;
|
|
|
160527
160555
|
pos = commentRange.end + 1;
|
|
160528
160556
|
}
|
|
160529
160557
|
else { // If it's not in a comment range, then we need to comment the uncommented portions.
|
|
160530
|
-
var newPos = text.substring(pos, textRange.end).search("("
|
|
160558
|
+
var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
|
|
160531
160559
|
isCommenting = insertComment !== undefined
|
|
160532
160560
|
? insertComment
|
|
160533
160561
|
: isCommenting || !ts.isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); // If isCommenting is already true we don't need to check whitespace again.
|
|
@@ -160922,14 +160950,14 @@ var ts;
|
|
|
160922
160950
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
160923
160951
|
invalidOperationsInPartialSemanticMode.forEach(function (key) {
|
|
160924
160952
|
return ls[key] = function () {
|
|
160925
|
-
throw new Error("LanguageService Operation: "
|
|
160953
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
160926
160954
|
};
|
|
160927
160955
|
});
|
|
160928
160956
|
break;
|
|
160929
160957
|
case ts.LanguageServiceMode.Syntactic:
|
|
160930
160958
|
invalidOperationsInSyntacticMode.forEach(function (key) {
|
|
160931
160959
|
return ls[key] = function () {
|
|
160932
|
-
throw new Error("LanguageService Operation: "
|
|
160960
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
|
|
160933
160961
|
};
|
|
160934
160962
|
});
|
|
160935
160963
|
break;
|
|
@@ -161911,13 +161939,13 @@ var ts;
|
|
|
161911
161939
|
var result = action();
|
|
161912
161940
|
if (logPerformance) {
|
|
161913
161941
|
var end = ts.timestamp();
|
|
161914
|
-
logger.log(actionDescription
|
|
161942
|
+
logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
|
|
161915
161943
|
if (ts.isString(result)) {
|
|
161916
161944
|
var str = result;
|
|
161917
161945
|
if (str.length > 128) {
|
|
161918
161946
|
str = str.substring(0, 128) + "...";
|
|
161919
161947
|
}
|
|
161920
|
-
logger.log(" result.length="
|
|
161948
|
+
logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
|
|
161921
161949
|
}
|
|
161922
161950
|
}
|
|
161923
161951
|
return result;
|
|
@@ -161999,7 +162027,7 @@ var ts;
|
|
|
161999
162027
|
* Update the list of scripts known to the compiler
|
|
162000
162028
|
*/
|
|
162001
162029
|
LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
|
|
162002
|
-
this.forwardJSONCall("refresh("
|
|
162030
|
+
this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
|
|
162003
162031
|
);
|
|
162004
162032
|
};
|
|
162005
162033
|
LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
|
|
@@ -162015,43 +162043,43 @@ var ts;
|
|
|
162015
162043
|
};
|
|
162016
162044
|
LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
|
|
162017
162045
|
var _this = this;
|
|
162018
|
-
return this.forwardJSONCall("getSyntacticClassifications('"
|
|
162046
|
+
return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162019
162047
|
};
|
|
162020
162048
|
LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
|
|
162021
162049
|
var _this = this;
|
|
162022
|
-
return this.forwardJSONCall("getSemanticClassifications('"
|
|
162050
|
+
return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162023
162051
|
};
|
|
162024
162052
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
162025
162053
|
var _this = this;
|
|
162026
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('"
|
|
162054
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162027
162055
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162028
162056
|
// on the managed side versus a full JSON array.
|
|
162029
162057
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162030
162058
|
};
|
|
162031
162059
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
162032
162060
|
var _this = this;
|
|
162033
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('"
|
|
162061
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162034
162062
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162035
162063
|
// on the managed side versus a full JSON array.
|
|
162036
162064
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162037
162065
|
};
|
|
162038
162066
|
LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
|
|
162039
162067
|
var _this = this;
|
|
162040
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('"
|
|
162068
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
|
|
162041
162069
|
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
|
|
162042
162070
|
return _this.realizeDiagnostics(diagnostics);
|
|
162043
162071
|
});
|
|
162044
162072
|
};
|
|
162045
162073
|
LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
|
|
162046
162074
|
var _this = this;
|
|
162047
|
-
return this.forwardJSONCall("getSemanticDiagnostics('"
|
|
162075
|
+
return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
|
|
162048
162076
|
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
|
|
162049
162077
|
return _this.realizeDiagnostics(diagnostics);
|
|
162050
162078
|
});
|
|
162051
162079
|
};
|
|
162052
162080
|
LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
|
|
162053
162081
|
var _this = this;
|
|
162054
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('"
|
|
162082
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
|
|
162055
162083
|
};
|
|
162056
162084
|
LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
|
|
162057
162085
|
var _this = this;
|
|
@@ -162067,7 +162095,7 @@ var ts;
|
|
|
162067
162095
|
*/
|
|
162068
162096
|
LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
|
|
162069
162097
|
var _this = this;
|
|
162070
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('"
|
|
162098
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
|
|
162071
162099
|
};
|
|
162072
162100
|
/// NAMEORDOTTEDNAMESPAN
|
|
162073
162101
|
/**
|
|
@@ -162076,7 +162104,7 @@ var ts;
|
|
|
162076
162104
|
*/
|
|
162077
162105
|
LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
|
|
162078
162106
|
var _this = this;
|
|
162079
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('"
|
|
162107
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
|
|
162080
162108
|
};
|
|
162081
162109
|
/**
|
|
162082
162110
|
* STATEMENTSPAN
|
|
@@ -162084,12 +162112,12 @@ var ts;
|
|
|
162084
162112
|
*/
|
|
162085
162113
|
LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
|
|
162086
162114
|
var _this = this;
|
|
162087
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('"
|
|
162115
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
|
|
162088
162116
|
};
|
|
162089
162117
|
/// SIGNATUREHELP
|
|
162090
162118
|
LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
|
|
162091
162119
|
var _this = this;
|
|
162092
|
-
return this.forwardJSONCall("getSignatureHelpItems('"
|
|
162120
|
+
return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
|
|
162093
162121
|
};
|
|
162094
162122
|
/// GOTO DEFINITION
|
|
162095
162123
|
/**
|
|
@@ -162098,7 +162126,7 @@ var ts;
|
|
|
162098
162126
|
*/
|
|
162099
162127
|
LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
|
|
162100
162128
|
var _this = this;
|
|
162101
|
-
return this.forwardJSONCall("getDefinitionAtPosition('"
|
|
162129
|
+
return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
|
|
162102
162130
|
};
|
|
162103
162131
|
/**
|
|
162104
162132
|
* Computes the definition location and file for the symbol
|
|
@@ -162106,7 +162134,7 @@ var ts;
|
|
|
162106
162134
|
*/
|
|
162107
162135
|
LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
|
|
162108
162136
|
var _this = this;
|
|
162109
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('"
|
|
162137
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
|
|
162110
162138
|
};
|
|
162111
162139
|
/// GOTO Type
|
|
162112
162140
|
/**
|
|
@@ -162115,7 +162143,7 @@ var ts;
|
|
|
162115
162143
|
*/
|
|
162116
162144
|
LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
|
|
162117
162145
|
var _this = this;
|
|
162118
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('"
|
|
162146
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
|
|
162119
162147
|
};
|
|
162120
162148
|
/// GOTO Implementation
|
|
162121
162149
|
/**
|
|
@@ -162124,37 +162152,37 @@ var ts;
|
|
|
162124
162152
|
*/
|
|
162125
162153
|
LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
|
|
162126
162154
|
var _this = this;
|
|
162127
|
-
return this.forwardJSONCall("getImplementationAtPosition('"
|
|
162155
|
+
return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
|
|
162128
162156
|
};
|
|
162129
162157
|
LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
|
|
162130
162158
|
var _this = this;
|
|
162131
|
-
return this.forwardJSONCall("getRenameInfo('"
|
|
162159
|
+
return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
|
|
162132
162160
|
};
|
|
162133
162161
|
LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
|
|
162134
162162
|
var _this = this;
|
|
162135
|
-
return this.forwardJSONCall("getSmartSelectionRange('"
|
|
162163
|
+
return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
|
|
162136
162164
|
};
|
|
162137
162165
|
LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
162138
162166
|
var _this = this;
|
|
162139
|
-
return this.forwardJSONCall("findRenameLocations('"
|
|
162167
|
+
return this.forwardJSONCall("findRenameLocations('".concat(fileName, "', ").concat(position, ", ").concat(findInStrings, ", ").concat(findInComments, ", ").concat(providePrefixAndSuffixTextForRename, ")"), function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
|
|
162140
162168
|
};
|
|
162141
162169
|
/// GET BRACE MATCHING
|
|
162142
162170
|
LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
|
|
162143
162171
|
var _this = this;
|
|
162144
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('"
|
|
162172
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
|
|
162145
162173
|
};
|
|
162146
162174
|
LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
|
|
162147
162175
|
var _this = this;
|
|
162148
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('"
|
|
162176
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
|
|
162149
162177
|
};
|
|
162150
162178
|
LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
|
|
162151
162179
|
var _this = this;
|
|
162152
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('"
|
|
162180
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
|
|
162153
162181
|
};
|
|
162154
162182
|
/// GET SMART INDENT
|
|
162155
162183
|
LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
|
|
162156
162184
|
var _this = this;
|
|
162157
|
-
return this.forwardJSONCall("getIndentationAtPosition('"
|
|
162185
|
+
return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162158
162186
|
var localOptions = JSON.parse(options);
|
|
162159
162187
|
return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
|
162160
162188
|
});
|
|
@@ -162162,23 +162190,23 @@ var ts;
|
|
|
162162
162190
|
/// GET REFERENCES
|
|
162163
162191
|
LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
|
|
162164
162192
|
var _this = this;
|
|
162165
|
-
return this.forwardJSONCall("getReferencesAtPosition('"
|
|
162193
|
+
return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
|
|
162166
162194
|
};
|
|
162167
162195
|
LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
|
|
162168
162196
|
var _this = this;
|
|
162169
|
-
return this.forwardJSONCall("findReferences('"
|
|
162197
|
+
return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
|
|
162170
162198
|
};
|
|
162171
162199
|
LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
|
|
162172
162200
|
var _this = this;
|
|
162173
|
-
return this.forwardJSONCall("getFileReferences('"
|
|
162201
|
+
return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
|
|
162174
162202
|
};
|
|
162175
162203
|
LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
|
|
162176
162204
|
var _this = this;
|
|
162177
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('"
|
|
162205
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
|
|
162178
162206
|
};
|
|
162179
162207
|
LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
|
|
162180
162208
|
var _this = this;
|
|
162181
|
-
return this.forwardJSONCall("getDocumentHighlights('"
|
|
162209
|
+
return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162182
162210
|
var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
|
162183
162211
|
// workaround for VS document highlighting issue - keep only items from the initial file
|
|
162184
162212
|
var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
|
|
@@ -162193,108 +162221,108 @@ var ts;
|
|
|
162193
162221
|
*/
|
|
162194
162222
|
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences) {
|
|
162195
162223
|
var _this = this;
|
|
162196
|
-
return this.forwardJSONCall("getCompletionsAtPosition('"
|
|
162224
|
+
return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences); });
|
|
162197
162225
|
};
|
|
162198
162226
|
/** Get a string based representation of a completion list entry details */
|
|
162199
162227
|
LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
|
|
162200
162228
|
var _this = this;
|
|
162201
|
-
return this.forwardJSONCall("getCompletionEntryDetails('"
|
|
162229
|
+
return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
|
|
162202
162230
|
var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
|
|
162203
162231
|
return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
|
|
162204
162232
|
});
|
|
162205
162233
|
};
|
|
162206
162234
|
LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
|
|
162207
162235
|
var _this = this;
|
|
162208
|
-
return this.forwardJSONCall("getFormattingEditsForRange('"
|
|
162236
|
+
return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
|
|
162209
162237
|
var localOptions = JSON.parse(options);
|
|
162210
162238
|
return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
|
162211
162239
|
});
|
|
162212
162240
|
};
|
|
162213
162241
|
LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
|
|
162214
162242
|
var _this = this;
|
|
162215
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('"
|
|
162243
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
|
|
162216
162244
|
var localOptions = JSON.parse(options);
|
|
162217
162245
|
return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
|
162218
162246
|
});
|
|
162219
162247
|
};
|
|
162220
162248
|
LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
|
|
162221
162249
|
var _this = this;
|
|
162222
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"
|
|
162250
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
|
|
162223
162251
|
var localOptions = JSON.parse(options);
|
|
162224
162252
|
return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
|
162225
162253
|
});
|
|
162226
162254
|
};
|
|
162227
162255
|
LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
|
|
162228
162256
|
var _this = this;
|
|
162229
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('"
|
|
162257
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
|
|
162230
162258
|
};
|
|
162231
162259
|
/// NAVIGATE TO
|
|
162232
162260
|
/** Return a list of symbols that are interesting to navigate to */
|
|
162233
162261
|
LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
|
|
162234
162262
|
var _this = this;
|
|
162235
|
-
return this.forwardJSONCall("getNavigateToItems('"
|
|
162263
|
+
return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
|
|
162236
162264
|
};
|
|
162237
162265
|
LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
|
|
162238
162266
|
var _this = this;
|
|
162239
|
-
return this.forwardJSONCall("getNavigationBarItems('"
|
|
162267
|
+
return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
|
|
162240
162268
|
};
|
|
162241
162269
|
LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
|
|
162242
162270
|
var _this = this;
|
|
162243
|
-
return this.forwardJSONCall("getNavigationTree('"
|
|
162271
|
+
return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
|
|
162244
162272
|
};
|
|
162245
162273
|
LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
|
|
162246
162274
|
var _this = this;
|
|
162247
|
-
return this.forwardJSONCall("getOutliningSpans('"
|
|
162275
|
+
return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
|
|
162248
162276
|
};
|
|
162249
162277
|
LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
|
|
162250
162278
|
var _this = this;
|
|
162251
|
-
return this.forwardJSONCall("getTodoComments('"
|
|
162279
|
+
return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
|
|
162252
162280
|
};
|
|
162253
162281
|
/// CALL HIERARCHY
|
|
162254
162282
|
LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
|
|
162255
162283
|
var _this = this;
|
|
162256
|
-
return this.forwardJSONCall("prepareCallHierarchy('"
|
|
162284
|
+
return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
|
|
162257
162285
|
};
|
|
162258
162286
|
LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
|
|
162259
162287
|
var _this = this;
|
|
162260
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"
|
|
162288
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
|
|
162261
162289
|
};
|
|
162262
162290
|
LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
|
|
162263
162291
|
var _this = this;
|
|
162264
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"
|
|
162292
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
|
|
162265
162293
|
};
|
|
162266
162294
|
LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
|
|
162267
162295
|
var _this = this;
|
|
162268
|
-
return this.forwardJSONCall("provideInlayHints('"
|
|
162296
|
+
return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
|
|
162269
162297
|
};
|
|
162270
162298
|
/// Emit
|
|
162271
162299
|
LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
|
|
162272
162300
|
var _this = this;
|
|
162273
|
-
return this.forwardJSONCall("getEmitOutput('"
|
|
162301
|
+
return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
|
|
162274
162302
|
var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
162275
162303
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
162276
162304
|
});
|
|
162277
162305
|
};
|
|
162278
162306
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
162279
162307
|
var _this = this;
|
|
162280
|
-
return forwardCall(this.logger, "getEmitOutput('"
|
|
162308
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
162281
162309
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
162282
162310
|
};
|
|
162283
162311
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|
|
162284
162312
|
var _this = this;
|
|
162285
|
-
return this.forwardJSONCall("toggleLineComment('"
|
|
162313
|
+
return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
|
|
162286
162314
|
};
|
|
162287
162315
|
LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
|
|
162288
162316
|
var _this = this;
|
|
162289
|
-
return this.forwardJSONCall("toggleMultilineComment('"
|
|
162317
|
+
return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
|
|
162290
162318
|
};
|
|
162291
162319
|
LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
|
|
162292
162320
|
var _this = this;
|
|
162293
|
-
return this.forwardJSONCall("commentSelection('"
|
|
162321
|
+
return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
|
|
162294
162322
|
};
|
|
162295
162323
|
LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
|
|
162296
162324
|
var _this = this;
|
|
162297
|
-
return this.forwardJSONCall("uncommentSelection('"
|
|
162325
|
+
return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
|
|
162298
162326
|
};
|
|
162299
162327
|
return LanguageServiceShimObject;
|
|
162300
162328
|
}(ShimBase));
|
|
@@ -162344,7 +162372,7 @@ var ts;
|
|
|
162344
162372
|
};
|
|
162345
162373
|
CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
|
|
162346
162374
|
var _this = this;
|
|
162347
|
-
return this.forwardJSONCall("resolveModuleName('"
|
|
162375
|
+
return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
|
|
162348
162376
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162349
162377
|
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162350
162378
|
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
|
|
@@ -162359,7 +162387,7 @@ var ts;
|
|
|
162359
162387
|
};
|
|
162360
162388
|
CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
|
|
162361
162389
|
var _this = this;
|
|
162362
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective("
|
|
162390
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
|
|
162363
162391
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162364
162392
|
var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162365
162393
|
return {
|
|
@@ -162371,7 +162399,7 @@ var ts;
|
|
|
162371
162399
|
};
|
|
162372
162400
|
CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162373
162401
|
var _this = this;
|
|
162374
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('"
|
|
162402
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
|
|
162375
162403
|
// for now treat files as JavaScript
|
|
162376
162404
|
var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
|
162377
162405
|
return {
|
|
@@ -162386,7 +162414,7 @@ var ts;
|
|
|
162386
162414
|
};
|
|
162387
162415
|
CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
|
|
162388
162416
|
var _this = this;
|
|
162389
|
-
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"
|
|
162417
|
+
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
|
|
162390
162418
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162391
162419
|
return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
|
|
162392
162420
|
});
|
|
@@ -162408,7 +162436,7 @@ var ts;
|
|
|
162408
162436
|
};
|
|
162409
162437
|
CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162410
162438
|
var _this = this;
|
|
162411
|
-
return this.forwardJSONCall("getTSConfigFileInfo('"
|
|
162439
|
+
return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
|
|
162412
162440
|
var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
|
|
162413
162441
|
var normalizedFileName = ts.normalizeSlashes(fileName);
|
|
162414
162442
|
var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
|
|
@@ -162608,7 +162636,7 @@ var ts;
|
|
|
162608
162636
|
function nowString() {
|
|
162609
162637
|
// E.g. "12:34:56.789"
|
|
162610
162638
|
var d = new Date();
|
|
162611
|
-
return ts.padLeft(d.getHours().toString(), 2, "0")
|
|
162639
|
+
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"));
|
|
162612
162640
|
}
|
|
162613
162641
|
server.nowString = nowString;
|
|
162614
162642
|
})(server = ts.server || (ts.server = {}));
|
|
@@ -162619,7 +162647,7 @@ var ts;
|
|
|
162619
162647
|
var JsTyping;
|
|
162620
162648
|
(function (JsTyping) {
|
|
162621
162649
|
function isTypingUpToDate(cachedTyping, availableTypingVersions) {
|
|
162622
|
-
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts"
|
|
162650
|
+
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
|
|
162623
162651
|
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
|
162624
162652
|
}
|
|
162625
162653
|
JsTyping.isTypingUpToDate = isTypingUpToDate;
|
|
@@ -162672,7 +162700,7 @@ var ts;
|
|
|
162672
162700
|
"worker_threads",
|
|
162673
162701
|
"zlib"
|
|
162674
162702
|
];
|
|
162675
|
-
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:"
|
|
162703
|
+
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
|
|
162676
162704
|
JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
|
|
162677
162705
|
JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
|
|
162678
162706
|
function nonRelativeModuleNameForTypingCache(moduleName) {
|
|
@@ -162751,7 +162779,7 @@ var ts;
|
|
|
162751
162779
|
var excludeTypingName = exclude_1[_i];
|
|
162752
162780
|
var didDelete = inferredTypings.delete(excludeTypingName);
|
|
162753
162781
|
if (didDelete && log)
|
|
162754
|
-
log("Typing for "
|
|
162782
|
+
log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
|
|
162755
162783
|
}
|
|
162756
162784
|
var newTypingNames = [];
|
|
162757
162785
|
var cachedTypingPaths = [];
|
|
@@ -162765,7 +162793,7 @@ var ts;
|
|
|
162765
162793
|
});
|
|
162766
162794
|
var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
|
|
162767
162795
|
if (log)
|
|
162768
|
-
log("Result: "
|
|
162796
|
+
log("Result: ".concat(JSON.stringify(result)));
|
|
162769
162797
|
return result;
|
|
162770
162798
|
function addInferredTyping(typingName) {
|
|
162771
162799
|
if (!inferredTypings.has(typingName)) {
|
|
@@ -162774,7 +162802,7 @@ var ts;
|
|
|
162774
162802
|
}
|
|
162775
162803
|
function addInferredTypings(typingNames, message) {
|
|
162776
162804
|
if (log)
|
|
162777
|
-
log(message
|
|
162805
|
+
log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
|
|
162778
162806
|
ts.forEach(typingNames, addInferredTyping);
|
|
162779
162807
|
}
|
|
162780
162808
|
/**
|
|
@@ -162787,7 +162815,7 @@ var ts;
|
|
|
162787
162815
|
filesToWatch.push(jsonPath);
|
|
162788
162816
|
var jsonConfig = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); }).config;
|
|
162789
162817
|
var jsonTypingNames = ts.flatMap([jsonConfig.dependencies, jsonConfig.devDependencies, jsonConfig.optionalDependencies, jsonConfig.peerDependencies], ts.getOwnKeys);
|
|
162790
|
-
addInferredTypings(jsonTypingNames, "Typing names in '"
|
|
162818
|
+
addInferredTypings(jsonTypingNames, "Typing names in '".concat(jsonPath, "' dependencies"));
|
|
162791
162819
|
}
|
|
162792
162820
|
/**
|
|
162793
162821
|
* Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
|
|
@@ -162826,7 +162854,7 @@ var ts;
|
|
|
162826
162854
|
// depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar`
|
|
162827
162855
|
var fileNames = host.readDirectory(packagesFolderPath, [".json" /* Json */], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
|
|
162828
162856
|
if (log)
|
|
162829
|
-
log("Searching for typing names in "
|
|
162857
|
+
log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(fileNames)));
|
|
162830
162858
|
var packageNames = [];
|
|
162831
162859
|
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
|
|
162832
162860
|
var fileName = fileNames_1[_i];
|
|
@@ -162853,7 +162881,7 @@ var ts;
|
|
|
162853
162881
|
if (ownTypes) {
|
|
162854
162882
|
var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
|
|
162855
162883
|
if (log)
|
|
162856
|
-
log(" Package '"
|
|
162884
|
+
log(" Package '".concat(packageJson.name, "' provides its own types."));
|
|
162857
162885
|
inferredTypings.set(packageJson.name, absolutePath);
|
|
162858
162886
|
}
|
|
162859
162887
|
else {
|
|
@@ -162925,15 +162953,15 @@ var ts;
|
|
|
162925
162953
|
var kind = isScopeName ? "Scope" : "Package";
|
|
162926
162954
|
switch (result) {
|
|
162927
162955
|
case 1 /* EmptyName */:
|
|
162928
|
-
return "'"
|
|
162956
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
|
|
162929
162957
|
case 2 /* NameTooLong */:
|
|
162930
|
-
return "'"
|
|
162958
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
|
|
162931
162959
|
case 3 /* NameStartsWithDot */:
|
|
162932
|
-
return "'"
|
|
162960
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
|
|
162933
162961
|
case 4 /* NameStartsWithUnderscore */:
|
|
162934
|
-
return "'"
|
|
162962
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
|
|
162935
162963
|
case 5 /* NameContainsNonURISafeCharacters */:
|
|
162936
|
-
return "'"
|
|
162964
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
|
|
162937
162965
|
case 0 /* Ok */:
|
|
162938
162966
|
return ts.Debug.fail(); // Shouldn't have called this.
|
|
162939
162967
|
default:
|
|
@@ -162986,7 +163014,7 @@ var ts;
|
|
|
162986
163014
|
}
|
|
162987
163015
|
Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
|
|
162988
163016
|
function ThrowProjectDoesNotContainDocument(fileName, project) {
|
|
162989
|
-
throw new Error("Project '"
|
|
163017
|
+
throw new Error("Project '".concat(project.getProjectName(), "' does not contain document '").concat(fileName, "'"));
|
|
162990
163018
|
}
|
|
162991
163019
|
Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
|
|
162992
163020
|
})(Errors = server.Errors || (server.Errors = {}));
|
|
@@ -163027,12 +163055,12 @@ var ts;
|
|
|
163027
163055
|
}
|
|
163028
163056
|
server.isInferredProjectName = isInferredProjectName;
|
|
163029
163057
|
function makeInferredProjectName(counter) {
|
|
163030
|
-
return "/dev/null/inferredProject"
|
|
163058
|
+
return "/dev/null/inferredProject".concat(counter, "*");
|
|
163031
163059
|
}
|
|
163032
163060
|
server.makeInferredProjectName = makeInferredProjectName;
|
|
163033
163061
|
/*@internal*/
|
|
163034
163062
|
function makeAutoImportProviderProjectName(counter) {
|
|
163035
|
-
return "/dev/null/autoImportProviderProject"
|
|
163063
|
+
return "/dev/null/autoImportProviderProject".concat(counter, "*");
|
|
163036
163064
|
}
|
|
163037
163065
|
server.makeAutoImportProviderProjectName = makeAutoImportProviderProjectName;
|
|
163038
163066
|
function createSortedArray() {
|
|
@@ -163067,7 +163095,7 @@ var ts;
|
|
|
163067
163095
|
// schedule new operation, pass arguments
|
|
163068
163096
|
this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
|
|
163069
163097
|
if (this.logger) {
|
|
163070
|
-
this.logger.info("Scheduled: "
|
|
163098
|
+
this.logger.info("Scheduled: ".concat(operationId).concat(pendingTimeout ? ", Cancelled earlier one" : ""));
|
|
163071
163099
|
}
|
|
163072
163100
|
};
|
|
163073
163101
|
ThrottledOperations.prototype.cancel = function (operationId) {
|
|
@@ -163081,7 +163109,7 @@ var ts;
|
|
|
163081
163109
|
ts.perfLogger.logStartScheduledOperation(operationId);
|
|
163082
163110
|
self.pendingTimeouts.delete(operationId);
|
|
163083
163111
|
if (self.logger) {
|
|
163084
|
-
self.logger.info("Running: "
|
|
163112
|
+
self.logger.info("Running: ".concat(operationId));
|
|
163085
163113
|
}
|
|
163086
163114
|
cb();
|
|
163087
163115
|
ts.perfLogger.logStopScheduledOperation();
|
|
@@ -163110,7 +163138,7 @@ var ts;
|
|
|
163110
163138
|
self.host.gc(); // TODO: GH#18217
|
|
163111
163139
|
if (log) {
|
|
163112
163140
|
var after = self.host.getMemoryUsage(); // TODO: GH#18217
|
|
163113
|
-
self.logger.perftrc("GC::before "
|
|
163141
|
+
self.logger.perftrc("GC::before ".concat(before, ", after ").concat(after));
|
|
163114
163142
|
}
|
|
163115
163143
|
ts.perfLogger.logStopScheduledOperation();
|
|
163116
163144
|
};
|
|
@@ -163462,8 +163490,8 @@ var ts;
|
|
|
163462
163490
|
}
|
|
163463
163491
|
TextStorage.prototype.getVersion = function () {
|
|
163464
163492
|
return this.svc
|
|
163465
|
-
? "SVC-"
|
|
163466
|
-
: "Text-"
|
|
163493
|
+
? "SVC-".concat(this.version.svc, "-").concat(this.svc.getSnapshotVersion())
|
|
163494
|
+
: "Text-".concat(this.version.text);
|
|
163467
163495
|
};
|
|
163468
163496
|
TextStorage.prototype.hasScriptVersionCache_TestOnly = function () {
|
|
163469
163497
|
return this.svc !== undefined;
|
|
@@ -163606,7 +163634,7 @@ var ts;
|
|
|
163606
163634
|
if (fileSize > server.maxFileSize) {
|
|
163607
163635
|
ts.Debug.assert(!!this.info.containingProjects.length);
|
|
163608
163636
|
var service = this.info.containingProjects[0].projectService;
|
|
163609
|
-
service.logger.info("Skipped loading contents of large file "
|
|
163637
|
+
service.logger.info("Skipped loading contents of large file ".concat(fileName, " for info ").concat(this.info.fileName, ": fileSize: ").concat(fileSize));
|
|
163610
163638
|
this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize);
|
|
163611
163639
|
return { text: "", fileSize: fileSize };
|
|
163612
163640
|
}
|
|
@@ -163982,14 +164010,14 @@ var ts;
|
|
|
163982
164010
|
return project;
|
|
163983
164011
|
}
|
|
163984
164012
|
function failIfInvalidPosition(position) {
|
|
163985
|
-
ts.Debug.assert(typeof position === "number", "Expected position "
|
|
164013
|
+
ts.Debug.assert(typeof position === "number", "Expected position ".concat(position, " to be a number."));
|
|
163986
164014
|
ts.Debug.assert(position >= 0, "Expected position to be non-negative.");
|
|
163987
164015
|
}
|
|
163988
164016
|
function failIfInvalidLocation(location) {
|
|
163989
|
-
ts.Debug.assert(typeof location.line === "number", "Expected line "
|
|
163990
|
-
ts.Debug.assert(typeof location.offset === "number", "Expected offset "
|
|
163991
|
-
ts.Debug.assert(location.line > 0, "Expected line to be non-"
|
|
163992
|
-
ts.Debug.assert(location.offset > 0, "Expected offset to be non-"
|
|
164017
|
+
ts.Debug.assert(typeof location.line === "number", "Expected line ".concat(location.line, " to be a number."));
|
|
164018
|
+
ts.Debug.assert(typeof location.offset === "number", "Expected offset ".concat(location.offset, " to be a number."));
|
|
164019
|
+
ts.Debug.assert(location.line > 0, "Expected line to be non-".concat(location.line === 0 ? "zero" : "negative"));
|
|
164020
|
+
ts.Debug.assert(location.offset > 0, "Expected offset to be non-".concat(location.offset === 0 ? "zero" : "negative"));
|
|
163993
164021
|
}
|
|
163994
164022
|
})(server = ts.server || (ts.server = {}));
|
|
163995
164023
|
})(ts || (ts = {}));
|
|
@@ -164301,11 +164329,11 @@ var ts;
|
|
|
164301
164329
|
};
|
|
164302
164330
|
Project.resolveModule = function (moduleName, initialDir, host, log, logErrors) {
|
|
164303
164331
|
var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
|
|
164304
|
-
log("Loading "
|
|
164332
|
+
log("Loading ".concat(moduleName, " from ").concat(initialDir, " (resolved to ").concat(resolvedPath, ")"));
|
|
164305
164333
|
var result = host.require(resolvedPath, moduleName); // TODO: GH#18217
|
|
164306
164334
|
if (result.error) {
|
|
164307
164335
|
var err = result.error.stack || result.error.message || JSON.stringify(result.error);
|
|
164308
|
-
(logErrors || log)("Failed to load module '"
|
|
164336
|
+
(logErrors || log)("Failed to load module '".concat(moduleName, "' from ").concat(resolvedPath, ": ").concat(err));
|
|
164309
164337
|
return undefined;
|
|
164310
164338
|
}
|
|
164311
164339
|
return result.module;
|
|
@@ -164453,12 +164481,12 @@ var ts;
|
|
|
164453
164481
|
};
|
|
164454
164482
|
/*@internal*/
|
|
164455
164483
|
Project.prototype.clearInvalidateResolutionOfFailedLookupTimer = function () {
|
|
164456
|
-
return this.projectService.throttledOperations.cancel(this.getProjectName()
|
|
164484
|
+
return this.projectService.throttledOperations.cancel("".concat(this.getProjectName(), "FailedLookupInvalidation"));
|
|
164457
164485
|
};
|
|
164458
164486
|
/*@internal*/
|
|
164459
164487
|
Project.prototype.scheduleInvalidateResolutionsOfFailedLookupLocations = function () {
|
|
164460
164488
|
var _this = this;
|
|
164461
|
-
this.projectService.throttledOperations.schedule(this.getProjectName()
|
|
164489
|
+
this.projectService.throttledOperations.schedule("".concat(this.getProjectName(), "FailedLookupInvalidation"), /*delay*/ 1000, function () {
|
|
164462
164490
|
if (_this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {
|
|
164463
164491
|
_this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this);
|
|
164464
164492
|
}
|
|
@@ -164636,7 +164664,7 @@ var ts;
|
|
|
164636
164664
|
return plugin.module.getExternalFiles(_this);
|
|
164637
164665
|
}
|
|
164638
164666
|
catch (e) {
|
|
164639
|
-
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: "
|
|
164667
|
+
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: ".concat(e));
|
|
164640
164668
|
if (e.stack) {
|
|
164641
164669
|
_this.projectService.logger.info(e.stack);
|
|
164642
164670
|
}
|
|
@@ -164739,7 +164767,7 @@ var ts;
|
|
|
164739
164767
|
}
|
|
164740
164768
|
return ts.map(this.program.getSourceFiles(), function (sourceFile) {
|
|
164741
164769
|
var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
164742
|
-
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '"
|
|
164770
|
+
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '".concat(sourceFile.fileName, "' Path: '").concat(sourceFile.path, "' / '").concat(sourceFile.resolvedPath, "' is missing."); });
|
|
164743
164771
|
return scriptInfo;
|
|
164744
164772
|
});
|
|
164745
164773
|
};
|
|
@@ -164982,7 +165010,7 @@ var ts;
|
|
|
164982
165010
|
var _this = this;
|
|
164983
165011
|
var oldProgram = this.program;
|
|
164984
165012
|
ts.Debug.assert(!this.isClosed(), "Called update graph worker of closed project");
|
|
164985
|
-
this.writeLog("Starting updateGraphWorker: Project: "
|
|
165013
|
+
this.writeLog("Starting updateGraphWorker: Project: ".concat(this.getProjectName()));
|
|
164986
165014
|
var start = ts.timestamp();
|
|
164987
165015
|
this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution();
|
|
164988
165016
|
this.resolutionCache.startCachingPerDirectoryResolution();
|
|
@@ -165084,7 +165112,7 @@ var ts;
|
|
|
165084
165112
|
}, function (removed) { return _this.detachScriptInfoFromProject(removed); });
|
|
165085
165113
|
var elapsed = ts.timestamp() - start;
|
|
165086
165114
|
this.sendPerformanceEvent("UpdateGraph", elapsed);
|
|
165087
|
-
this.writeLog("Finishing updateGraphWorker: Project: "
|
|
165115
|
+
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"));
|
|
165088
165116
|
if (this.hasAddedorRemovedFiles) {
|
|
165089
165117
|
this.print(/*writeProjectFileNames*/ true);
|
|
165090
165118
|
}
|
|
@@ -165144,7 +165172,7 @@ var ts;
|
|
|
165144
165172
|
var path = this.toPath(sourceFile);
|
|
165145
165173
|
if (this.generatedFilesMap) {
|
|
165146
165174
|
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
|
165147
|
-
ts.Debug.fail(this.projectName
|
|
165175
|
+
ts.Debug.fail("".concat(this.projectName, " Expected to not have --out watcher for generated file with options: ").concat(JSON.stringify(this.compilerOptions)));
|
|
165148
165176
|
return;
|
|
165149
165177
|
}
|
|
165150
165178
|
if (this.generatedFilesMap.has(path))
|
|
@@ -165196,20 +165224,20 @@ var ts;
|
|
|
165196
165224
|
if (!this.program)
|
|
165197
165225
|
return "\tFiles (0) NoProgram\n";
|
|
165198
165226
|
var sourceFiles = this.program.getSourceFiles();
|
|
165199
|
-
var strBuilder = "\tFiles ("
|
|
165227
|
+
var strBuilder = "\tFiles (".concat(sourceFiles.length, ")\n");
|
|
165200
165228
|
if (writeProjectFileNames) {
|
|
165201
165229
|
for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
|
|
165202
165230
|
var file = sourceFiles_1[_i];
|
|
165203
|
-
strBuilder += "\t"
|
|
165231
|
+
strBuilder += "\t".concat(file.fileName, "\n");
|
|
165204
165232
|
}
|
|
165205
165233
|
strBuilder += "\n\n";
|
|
165206
|
-
ts.explainFiles(this.program, function (s) { return strBuilder += "\t"
|
|
165234
|
+
ts.explainFiles(this.program, function (s) { return strBuilder += "\t".concat(s, "\n"); });
|
|
165207
165235
|
}
|
|
165208
165236
|
return strBuilder;
|
|
165209
165237
|
};
|
|
165210
165238
|
/*@internal*/
|
|
165211
165239
|
Project.prototype.print = function (writeProjectFileNames) {
|
|
165212
|
-
this.writeLog("Project '"
|
|
165240
|
+
this.writeLog("Project '".concat(this.projectName, "' (").concat(ProjectKind[this.projectKind], ")"));
|
|
165213
165241
|
this.writeLog(this.filesToString(writeProjectFileNames && this.projectService.logger.hasLevel(server.LogLevel.verbose)));
|
|
165214
165242
|
this.writeLog("-----------------------------------------------");
|
|
165215
165243
|
if (this.autoImportProviderHost) {
|
|
@@ -165371,7 +165399,7 @@ var ts;
|
|
|
165371
165399
|
if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
|
|
165372
165400
|
return "continue";
|
|
165373
165401
|
// Provide global: true so plugins can detect why they can't find their config
|
|
165374
|
-
this_1.projectService.logger.info("Loading global plugin "
|
|
165402
|
+
this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
|
|
165375
165403
|
this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
|
|
165376
165404
|
};
|
|
165377
165405
|
var this_1 = this;
|
|
@@ -165384,9 +165412,9 @@ var ts;
|
|
|
165384
165412
|
};
|
|
165385
165413
|
Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) {
|
|
165386
165414
|
var _this = this;
|
|
165387
|
-
this.projectService.logger.info("Enabling plugin "
|
|
165415
|
+
this.projectService.logger.info("Enabling plugin ".concat(pluginConfigEntry.name, " from candidate paths: ").concat(searchPaths.join(",")));
|
|
165388
165416
|
if (!pluginConfigEntry.name || ts.parsePackageName(pluginConfigEntry.name).rest) {
|
|
165389
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
165417
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(pluginConfigEntry.name || JSON.stringify(pluginConfigEntry), " because only package name is allowed plugin name"));
|
|
165390
165418
|
return;
|
|
165391
165419
|
}
|
|
165392
165420
|
var log = function (message) { return _this.projectService.logger.info(message); };
|
|
@@ -165409,13 +165437,13 @@ var ts;
|
|
|
165409
165437
|
}
|
|
165410
165438
|
else {
|
|
165411
165439
|
ts.forEach(errorLogs, log);
|
|
165412
|
-
this.projectService.logger.info("Couldn't find "
|
|
165440
|
+
this.projectService.logger.info("Couldn't find ".concat(pluginConfigEntry.name));
|
|
165413
165441
|
}
|
|
165414
165442
|
};
|
|
165415
165443
|
Project.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
|
|
165416
165444
|
try {
|
|
165417
165445
|
if (typeof pluginModuleFactory !== "function") {
|
|
165418
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
165446
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(configEntry.name, " because it did not expose a proper factory function"));
|
|
165419
165447
|
return;
|
|
165420
165448
|
}
|
|
165421
165449
|
var info = {
|
|
@@ -165432,7 +165460,7 @@ var ts;
|
|
|
165432
165460
|
var k = _a[_i];
|
|
165433
165461
|
// eslint-disable-next-line no-in-operator
|
|
165434
165462
|
if (!(k in newLS)) {
|
|
165435
|
-
this.projectService.logger.info("Plugin activation warning: Missing proxied method "
|
|
165463
|
+
this.projectService.logger.info("Plugin activation warning: Missing proxied method ".concat(k, " in created LS. Patching."));
|
|
165436
165464
|
newLS[k] = this.languageService[k];
|
|
165437
165465
|
}
|
|
165438
165466
|
}
|
|
@@ -165441,7 +165469,7 @@ var ts;
|
|
|
165441
165469
|
this.plugins.push({ name: configEntry.name, module: pluginModule });
|
|
165442
165470
|
}
|
|
165443
165471
|
catch (e) {
|
|
165444
|
-
this.projectService.logger.info("Plugin activation failed: "
|
|
165472
|
+
this.projectService.logger.info("Plugin activation failed: ".concat(e));
|
|
165445
165473
|
}
|
|
165446
165474
|
};
|
|
165447
165475
|
/*@internal*/
|
|
@@ -165956,7 +165984,7 @@ var ts;
|
|
|
165956
165984
|
var searchPaths = __spreadArray([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations, true);
|
|
165957
165985
|
if (this.projectService.allowLocalPluginLoads) {
|
|
165958
165986
|
var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
|
|
165959
|
-
this.projectService.logger.info("Local plugin loading enabled; adding "
|
|
165987
|
+
this.projectService.logger.info("Local plugin loading enabled; adding ".concat(local, " to search paths"));
|
|
165960
165988
|
searchPaths.unshift(local);
|
|
165961
165989
|
}
|
|
165962
165990
|
// Enable tsconfig-specified plugins
|
|
@@ -166382,7 +166410,7 @@ var ts;
|
|
|
166382
166410
|
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); });
|
|
166383
166411
|
}
|
|
166384
166412
|
function getDetailWatchInfo(watchType, project) {
|
|
166385
|
-
return (ts.isString(project) ? "Config: "
|
|
166413
|
+
return "".concat(ts.isString(project) ? "Config: ".concat(project, " ") : project ? "Project: ".concat(project.getProjectName(), " ") : "", "WatchType: ").concat(watchType);
|
|
166386
166414
|
}
|
|
166387
166415
|
function isScriptInfoWatchedFromNodeModules(info) {
|
|
166388
166416
|
return !info.isScriptOpen() && info.mTime !== undefined;
|
|
@@ -166587,7 +166615,7 @@ var ts;
|
|
|
166587
166615
|
try {
|
|
166588
166616
|
var fileContent = this.host.readFile(this.typesMapLocation); // TODO: GH#18217
|
|
166589
166617
|
if (fileContent === undefined) {
|
|
166590
|
-
this.logger.info("Provided types map file \""
|
|
166618
|
+
this.logger.info("Provided types map file \"".concat(this.typesMapLocation, "\" doesn't exist"));
|
|
166591
166619
|
return;
|
|
166592
166620
|
}
|
|
166593
166621
|
var raw = JSON.parse(fileContent);
|
|
@@ -166605,7 +166633,7 @@ var ts;
|
|
|
166605
166633
|
}
|
|
166606
166634
|
}
|
|
166607
166635
|
catch (e) {
|
|
166608
|
-
this.logger.info("Error loading types map: "
|
|
166636
|
+
this.logger.info("Error loading types map: ".concat(e));
|
|
166609
166637
|
this.safelist = defaultTypeSafeList;
|
|
166610
166638
|
this.legacySafelist.clear();
|
|
166611
166639
|
}
|
|
@@ -166927,7 +166955,7 @@ var ts;
|
|
|
166927
166955
|
var fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
166928
166956
|
if (ts.getBaseFileName(fileOrDirectoryPath) === "package.json" && !ts.isInsideNodeModules(fileOrDirectoryPath) &&
|
|
166929
166957
|
(fsResult && fsResult.fileExists || !fsResult && _this.host.fileExists(fileOrDirectoryPath))) {
|
|
166930
|
-
_this.logger.info("Config: "
|
|
166958
|
+
_this.logger.info("Config: ".concat(configFileName, " Detected new package.json: ").concat(fileOrDirectory));
|
|
166931
166959
|
_this.onAddPackageJson(fileOrDirectoryPath);
|
|
166932
166960
|
}
|
|
166933
166961
|
var configuredProjectForConfig = _this.findConfiguredProjectByProjectName(configFileName);
|
|
@@ -167050,13 +167078,13 @@ var ts;
|
|
|
167050
167078
|
project.print(/*writeProjectFileNames*/ true);
|
|
167051
167079
|
project.close();
|
|
167052
167080
|
if (ts.Debug.shouldAssert(1 /* Normal */)) {
|
|
167053
|
-
this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return project.projectName
|
|
167081
|
+
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) ?
|
|
167054
167082
|
{
|
|
167055
167083
|
fileName: info.fileName,
|
|
167056
167084
|
projects: info.containingProjects.map(function (p) { return p.projectName; }),
|
|
167057
167085
|
hasMixedContent: info.hasMixedContent
|
|
167058
167086
|
} : undefined; })),
|
|
167059
|
-
/*replacer*/ undefined, " "); }); });
|
|
167087
|
+
/*replacer*/ undefined, " ")); }); });
|
|
167060
167088
|
}
|
|
167061
167089
|
// Remove the project from pending project updates
|
|
167062
167090
|
this.pendingProjectUpdates.delete(project.getProjectName());
|
|
@@ -167457,15 +167485,15 @@ var ts;
|
|
|
167457
167485
|
if (result !== undefined)
|
|
167458
167486
|
return result || undefined;
|
|
167459
167487
|
}
|
|
167460
|
-
this.logger.info("Search path: "
|
|
167488
|
+
this.logger.info("Search path: ".concat(ts.getDirectoryPath(info.fileName)));
|
|
167461
167489
|
var configFileName = this.forEachConfigFileLocation(info, function (canonicalConfigFilePath, configFileName) {
|
|
167462
167490
|
return _this.configFileExists(configFileName, canonicalConfigFilePath, info);
|
|
167463
167491
|
});
|
|
167464
167492
|
if (configFileName) {
|
|
167465
|
-
this.logger.info("For info: "
|
|
167493
|
+
this.logger.info("For info: ".concat(info.fileName, " :: Config file name: ").concat(configFileName));
|
|
167466
167494
|
}
|
|
167467
167495
|
else {
|
|
167468
|
-
this.logger.info("For info: "
|
|
167496
|
+
this.logger.info("For info: ".concat(info.fileName, " :: No config files found."));
|
|
167469
167497
|
}
|
|
167470
167498
|
if (isOpenScriptInfo(info)) {
|
|
167471
167499
|
this.configFileForOpenFiles.set(info.path, configFileName || false);
|
|
@@ -167484,8 +167512,8 @@ var ts;
|
|
|
167484
167512
|
this.logger.info("Open files: ");
|
|
167485
167513
|
this.openFiles.forEach(function (projectRootPath, path) {
|
|
167486
167514
|
var info = _this.getScriptInfoForPath(path);
|
|
167487
|
-
_this.logger.info("\tFileName: "
|
|
167488
|
-
_this.logger.info("\t\tProjects: "
|
|
167515
|
+
_this.logger.info("\tFileName: ".concat(info.fileName, " ProjectRootPath: ").concat(projectRootPath));
|
|
167516
|
+
_this.logger.info("\t\tProjects: ".concat(info.containingProjects.map(function (p) { return p.getProjectName(); })));
|
|
167489
167517
|
});
|
|
167490
167518
|
this.logger.endGroup();
|
|
167491
167519
|
};
|
|
@@ -167524,7 +167552,7 @@ var ts;
|
|
|
167524
167552
|
.map(function (name) { return ({ name: name, size: _this.host.getFileSize(name) }); })
|
|
167525
167553
|
.sort(function (a, b) { return b.size - a.size; })
|
|
167526
167554
|
.slice(0, 5);
|
|
167527
|
-
this.logger.info("Non TS file size exceeded limit ("
|
|
167555
|
+
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(", ")));
|
|
167528
167556
|
// Keep the size as zero since it's disabled
|
|
167529
167557
|
return fileName;
|
|
167530
167558
|
}
|
|
@@ -167593,7 +167621,7 @@ var ts;
|
|
|
167593
167621
|
};
|
|
167594
167622
|
/* @internal */
|
|
167595
167623
|
ProjectService.prototype.createConfiguredProject = function (configFileName) {
|
|
167596
|
-
this.logger.info("Creating configuration project "
|
|
167624
|
+
this.logger.info("Creating configuration project ".concat(configFileName));
|
|
167597
167625
|
var canonicalConfigFilePath = server.asNormalizedPath(this.toCanonicalFileName(configFileName));
|
|
167598
167626
|
var configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
167599
167627
|
// We could be in this scenario if project is the configured project tracked by external project
|
|
@@ -167704,12 +167732,12 @@ var ts;
|
|
|
167704
167732
|
if (parsedCommandLine.errors.length) {
|
|
167705
167733
|
configFileErrors.push.apply(configFileErrors, parsedCommandLine.errors);
|
|
167706
167734
|
}
|
|
167707
|
-
this.logger.info("Config: "
|
|
167735
|
+
this.logger.info("Config: ".concat(configFilename, " : ").concat(JSON.stringify({
|
|
167708
167736
|
rootNames: parsedCommandLine.fileNames,
|
|
167709
167737
|
options: parsedCommandLine.options,
|
|
167710
167738
|
watchOptions: parsedCommandLine.watchOptions,
|
|
167711
167739
|
projectReferences: parsedCommandLine.projectReferences
|
|
167712
|
-
}, /*replacer*/ undefined, " "));
|
|
167740
|
+
}, /*replacer*/ undefined, " ")));
|
|
167713
167741
|
var oldCommandLine = (_b = configFileExistenceInfo.config) === null || _b === void 0 ? void 0 : _b.parsedCommandLine;
|
|
167714
167742
|
if (!configFileExistenceInfo.config) {
|
|
167715
167743
|
configFileExistenceInfo.config = { parsedCommandLine: parsedCommandLine, cachedDirectoryStructureHost: cachedDirectoryStructureHost, projects: new ts.Map() };
|
|
@@ -167739,7 +167767,7 @@ var ts;
|
|
|
167739
167767
|
// Update projects
|
|
167740
167768
|
var ensureProjectsForOpenFiles = false;
|
|
167741
167769
|
(_a = _this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (canonicalPath) {
|
|
167742
|
-
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file "
|
|
167770
|
+
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file ".concat(extendedConfigFileName, " detected")) || ensureProjectsForOpenFiles;
|
|
167743
167771
|
});
|
|
167744
167772
|
if (ensureProjectsForOpenFiles)
|
|
167745
167773
|
_this.delayEnsureProjectForOpenFiles();
|
|
@@ -167895,7 +167923,7 @@ var ts;
|
|
|
167895
167923
|
// Clear the cache since we are reloading the project from disk
|
|
167896
167924
|
host.clearCache();
|
|
167897
167925
|
var configFileName = project.getConfigFilePath();
|
|
167898
|
-
this.logger.info((isInitialLoad ? "Loading" : "Reloading"
|
|
167926
|
+
this.logger.info("".concat(isInitialLoad ? "Loading" : "Reloading", " configured project ").concat(configFileName));
|
|
167899
167927
|
// Load project from the disk
|
|
167900
167928
|
this.loadConfiguredProject(project, reason);
|
|
167901
167929
|
project.updateGraph();
|
|
@@ -168034,7 +168062,7 @@ var ts;
|
|
|
168034
168062
|
var path = _a[0], scriptInfo = _a[1];
|
|
168035
168063
|
return ({ path: path, fileName: scriptInfo.fileName });
|
|
168036
168064
|
});
|
|
168037
|
-
this.logger.msg("Could not find file "
|
|
168065
|
+
this.logger.msg("Could not find file ".concat(JSON.stringify(fileName), ".\nAll files are: ").concat(JSON.stringify(names)), server.Msg.Err);
|
|
168038
168066
|
};
|
|
168039
168067
|
/**
|
|
168040
168068
|
* Returns the projects that contain script info through SymLink
|
|
@@ -168218,9 +168246,9 @@ var ts;
|
|
|
168218
168246
|
var info = this.getScriptInfoForPath(path);
|
|
168219
168247
|
if (!info) {
|
|
168220
168248
|
var isDynamic = server.isDynamicFileName(fileName);
|
|
168221
|
-
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()) })
|
|
168222
|
-
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()) })
|
|
168223
|
-
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()) })
|
|
168249
|
+
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"); });
|
|
168250
|
+
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"); });
|
|
168251
|
+
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."); });
|
|
168224
168252
|
// If the file is not opened by client and the file doesnot exist on the disk, return
|
|
168225
168253
|
if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
|
|
168226
168254
|
return;
|
|
@@ -168399,13 +168427,13 @@ var ts;
|
|
|
168399
168427
|
var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file));
|
|
168400
168428
|
if (info) {
|
|
168401
168429
|
info.setOptions(convertFormatOptions(args.formatOptions), args.preferences);
|
|
168402
|
-
this.logger.info("Host configuration update for file "
|
|
168430
|
+
this.logger.info("Host configuration update for file ".concat(args.file));
|
|
168403
168431
|
}
|
|
168404
168432
|
}
|
|
168405
168433
|
else {
|
|
168406
168434
|
if (args.hostInfo !== undefined) {
|
|
168407
168435
|
this.hostConfiguration.hostInfo = args.hostInfo;
|
|
168408
|
-
this.logger.info("Host information "
|
|
168436
|
+
this.logger.info("Host information ".concat(args.hostInfo));
|
|
168409
168437
|
}
|
|
168410
168438
|
if (args.formatOptions) {
|
|
168411
168439
|
this.hostConfiguration.formatCodeOptions = __assign(__assign({}, this.hostConfiguration.formatCodeOptions), convertFormatOptions(args.formatOptions));
|
|
@@ -168437,7 +168465,7 @@ var ts;
|
|
|
168437
168465
|
}
|
|
168438
168466
|
if (args.watchOptions) {
|
|
168439
168467
|
this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions;
|
|
168440
|
-
this.logger.info("Host watch options changed to "
|
|
168468
|
+
this.logger.info("Host watch options changed to ".concat(JSON.stringify(this.hostConfiguration.watchOptions), ", it will be take effect for next watches."));
|
|
168441
168469
|
}
|
|
168442
168470
|
}
|
|
168443
168471
|
};
|
|
@@ -168649,7 +168677,7 @@ var ts;
|
|
|
168649
168677
|
? originalLocation
|
|
168650
168678
|
: location;
|
|
168651
168679
|
}
|
|
168652
|
-
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: "
|
|
168680
|
+
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: ".concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
|
|
168653
168681
|
}
|
|
168654
168682
|
updateProjectIfDirty(configuredProject);
|
|
168655
168683
|
var projectContainsOriginalInfo = function (project) {
|
|
@@ -168661,7 +168689,7 @@ var ts;
|
|
|
168661
168689
|
configuredProject = forEachResolvedProjectReferenceProject(configuredProject, fileName, function (child) {
|
|
168662
168690
|
updateProjectIfDirty(child);
|
|
168663
168691
|
return projectContainsOriginalInfo(child) ? child : undefined;
|
|
168664
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
168692
|
+
}, 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 : ""));
|
|
168665
168693
|
if (!configuredProject)
|
|
168666
168694
|
return undefined;
|
|
168667
168695
|
if (configuredProject === project)
|
|
@@ -168715,7 +168743,7 @@ var ts;
|
|
|
168715
168743
|
if (configFileName) {
|
|
168716
168744
|
project = this.findConfiguredProjectByProjectName(configFileName);
|
|
168717
168745
|
if (!project) {
|
|
168718
|
-
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for "
|
|
168746
|
+
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for ".concat(info.fileName, " to open"));
|
|
168719
168747
|
defaultConfigProjectIsCreated = true;
|
|
168720
168748
|
}
|
|
168721
168749
|
else {
|
|
@@ -168745,7 +168773,7 @@ var ts;
|
|
|
168745
168773
|
if (!projectForConfigFileDiag && child.containsScriptInfo(info)) {
|
|
168746
168774
|
projectForConfigFileDiag = child;
|
|
168747
168775
|
}
|
|
168748
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
168776
|
+
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(project.projectName, " to find possible configured project for ").concat(info.fileName, " to open"));
|
|
168749
168777
|
}
|
|
168750
168778
|
// Send the event only if the project got created as part of this open request and info is part of the project
|
|
168751
168779
|
if (projectForConfigFileDiag) {
|
|
@@ -168807,7 +168835,7 @@ var ts;
|
|
|
168807
168835
|
return;
|
|
168808
168836
|
// find or delay load the project
|
|
168809
168837
|
var ancestor = this.findConfiguredProjectByProjectName(configFileName) ||
|
|
168810
|
-
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project "
|
|
168838
|
+
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project ".concat(project.getProjectName(), " of open file ").concat(info.fileName));
|
|
168811
168839
|
if (ancestor.isInitialLoadPending()) {
|
|
168812
168840
|
// Set a potential project reference
|
|
168813
168841
|
ancestor.setPotentialProjectReference(project.canonicalConfigFilePath);
|
|
@@ -168850,7 +168878,7 @@ var ts;
|
|
|
168850
168878
|
// Load this project,
|
|
168851
168879
|
var configFileName = server.toNormalizedPath(child.sourceFile.fileName);
|
|
168852
168880
|
var childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) ||
|
|
168853
|
-
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : "
|
|
168881
|
+
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : ".concat(project.projectName, " as it references project ").concat(referencedProject.sourceFile.fileName));
|
|
168854
168882
|
updateProjectIfDirty(childProject);
|
|
168855
168883
|
// Ensure children for this project
|
|
168856
168884
|
this.ensureProjectChildren(childProject, forProjects, seenProjects);
|
|
@@ -169151,7 +169179,7 @@ var ts;
|
|
|
169151
169179
|
for (var _b = 0, normalizedNames_1 = normalizedNames; _b < normalizedNames_1.length; _b++) {
|
|
169152
169180
|
var root = normalizedNames_1[_b];
|
|
169153
169181
|
if (rule.match.test(root)) {
|
|
169154
|
-
this_2.logger.info("Excluding files based on rule "
|
|
169182
|
+
this_2.logger.info("Excluding files based on rule ".concat(name, " matching file '").concat(root, "'"));
|
|
169155
169183
|
// If the file matches, collect its types packages and exclude rules
|
|
169156
169184
|
if (rule.types) {
|
|
169157
169185
|
for (var _c = 0, _d = rule.types; _c < _d.length; _c++) {
|
|
@@ -169176,7 +169204,7 @@ var ts;
|
|
|
169176
169204
|
if (typeof groupNumberOrString === "number") {
|
|
169177
169205
|
if (!ts.isString(groups[groupNumberOrString])) {
|
|
169178
169206
|
// Specification was wrong - exclude nothing!
|
|
169179
|
-
_this.logger.info("Incorrect RegExp specification in safelist rule "
|
|
169207
|
+
_this.logger.info("Incorrect RegExp specification in safelist rule ".concat(name, " - not enough groups"));
|
|
169180
169208
|
// * can't appear in a filename; escape it because it's feeding into a RegExp
|
|
169181
169209
|
return "\\*";
|
|
169182
169210
|
}
|
|
@@ -169224,7 +169252,7 @@ var ts;
|
|
|
169224
169252
|
var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName);
|
|
169225
169253
|
var typeName = this_3.legacySafelist.get(cleanedTypingName);
|
|
169226
169254
|
if (typeName !== undefined) {
|
|
169227
|
-
this_3.logger.info("Excluded '"
|
|
169255
|
+
this_3.logger.info("Excluded '".concat(normalizedNames[i], "' because it matched ").concat(cleanedTypingName, " from the legacy safelist"));
|
|
169228
169256
|
excludedFiles.push(normalizedNames[i]);
|
|
169229
169257
|
// *exclude* it from the project...
|
|
169230
169258
|
exclude = true;
|
|
@@ -169354,8 +169382,8 @@ var ts;
|
|
|
169354
169382
|
if (!project) {
|
|
169355
169383
|
// errors are stored in the project, do not need to update the graph
|
|
169356
169384
|
project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ?
|
|
169357
|
-
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: "
|
|
169358
|
-
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: "
|
|
169385
|
+
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName)) :
|
|
169386
|
+
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName));
|
|
169359
169387
|
}
|
|
169360
169388
|
if (project && !ts.contains(exisingConfigFiles, tsconfigFile)) {
|
|
169361
169389
|
// keep project alive even if no documents are opened - its lifetime is bound to the lifetime of containing external project
|
|
@@ -169593,7 +169621,7 @@ var ts;
|
|
|
169593
169621
|
return cache || (cache = new ts.Map());
|
|
169594
169622
|
}
|
|
169595
169623
|
function key(fromFileName, preferences) {
|
|
169596
|
-
return fromFileName
|
|
169624
|
+
return "".concat(fromFileName, ",").concat(preferences.importModuleSpecifierEnding, ",").concat(preferences.importModuleSpecifierPreference);
|
|
169597
169625
|
}
|
|
169598
169626
|
function createInfo(modulePaths, moduleSpecifiers, isAutoImportable) {
|
|
169599
169627
|
return { modulePaths: modulePaths, moduleSpecifiers: moduleSpecifiers, isAutoImportable: isAutoImportable };
|
|
@@ -169752,10 +169780,10 @@ var ts;
|
|
|
169752
169780
|
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
|
|
169753
169781
|
var json = JSON.stringify(msg);
|
|
169754
169782
|
if (verboseLogging) {
|
|
169755
|
-
logger.info(msg.type
|
|
169783
|
+
logger.info("".concat(msg.type, ":").concat(server.indent(json)));
|
|
169756
169784
|
}
|
|
169757
169785
|
var len = byteLength(json, "utf8");
|
|
169758
|
-
return "Content-Length: "
|
|
169786
|
+
return "Content-Length: ".concat(1 + len, "\r\n\r\n").concat(json).concat(newLine);
|
|
169759
169787
|
}
|
|
169760
169788
|
server.formatMessage = formatMessage;
|
|
169761
169789
|
/**
|
|
@@ -169820,7 +169848,7 @@ var ts;
|
|
|
169820
169848
|
}
|
|
169821
169849
|
else {
|
|
169822
169850
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("session" /* Session */, "stepError", { seq: this.requestId, message: e.message });
|
|
169823
|
-
this.operationHost.logError(e, "delayed processing of request "
|
|
169851
|
+
this.operationHost.logError(e, "delayed processing of request ".concat(this.requestId));
|
|
169824
169852
|
}
|
|
169825
169853
|
}
|
|
169826
169854
|
if (stop || !this.hasPendingWork()) {
|
|
@@ -170605,14 +170633,14 @@ var ts;
|
|
|
170605
170633
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
170606
170634
|
invalidPartialSemanticModeCommands.forEach(function (commandName) {
|
|
170607
170635
|
return _this.handlers.set(commandName, function (request) {
|
|
170608
|
-
throw new Error("Request: "
|
|
170636
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
170609
170637
|
});
|
|
170610
170638
|
});
|
|
170611
170639
|
break;
|
|
170612
170640
|
case ts.LanguageServiceMode.Syntactic:
|
|
170613
170641
|
invalidSyntacticModeCommands.forEach(function (commandName) {
|
|
170614
170642
|
return _this.handlers.set(commandName, function (request) {
|
|
170615
|
-
throw new Error("Request: "
|
|
170643
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.Syntactic"));
|
|
170616
170644
|
});
|
|
170617
170645
|
});
|
|
170618
170646
|
break;
|
|
@@ -170687,7 +170715,7 @@ var ts;
|
|
|
170687
170715
|
};
|
|
170688
170716
|
Session.prototype.projectsUpdatedInBackgroundEvent = function (openFiles) {
|
|
170689
170717
|
var _this = this;
|
|
170690
|
-
this.projectService.logger.info("got projects updated in background, updating diagnostics for "
|
|
170718
|
+
this.projectService.logger.info("got projects updated in background, updating diagnostics for ".concat(openFiles));
|
|
170691
170719
|
if (openFiles.length) {
|
|
170692
170720
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
170693
170721
|
// For now only queue error checking for open files. We can change this to include non open files as well
|
|
@@ -170717,17 +170745,17 @@ var ts;
|
|
|
170717
170745
|
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
|
|
170718
170746
|
if (scriptInfo) {
|
|
170719
170747
|
var text = ts.getSnapshotText(scriptInfo.getSnapshot());
|
|
170720
|
-
msg += "\n\nFile text of "
|
|
170748
|
+
msg += "\n\nFile text of ".concat(fileRequest.file, ":").concat(server.indent(text), "\n");
|
|
170721
170749
|
}
|
|
170722
170750
|
}
|
|
170723
170751
|
catch (_b) { } // eslint-disable-line no-empty
|
|
170724
170752
|
}
|
|
170725
170753
|
if (err.ProgramFiles) {
|
|
170726
|
-
msg += "\n\nProgram files: "
|
|
170754
|
+
msg += "\n\nProgram files: ".concat(JSON.stringify(err.ProgramFiles), "\n");
|
|
170727
170755
|
msg += "\n\nProjects::\n";
|
|
170728
170756
|
var counter_1 = 0;
|
|
170729
170757
|
var addProjectInfo = function (project) {
|
|
170730
|
-
msg += "\nProject '"
|
|
170758
|
+
msg += "\nProject '".concat(project.projectName, "' (").concat(server.ProjectKind[project.projectKind], ") ").concat(counter_1, "\n");
|
|
170731
170759
|
msg += project.filesToString(/*writeProjectFileNames*/ true);
|
|
170732
170760
|
msg += "\n-----------------------------------------------\n";
|
|
170733
170761
|
counter_1++;
|
|
@@ -170742,12 +170770,12 @@ var ts;
|
|
|
170742
170770
|
Session.prototype.send = function (msg) {
|
|
170743
170771
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
170744
170772
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
170745
|
-
this.logger.info("Session does not support events: ignored event: "
|
|
170773
|
+
this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
|
|
170746
170774
|
}
|
|
170747
170775
|
return;
|
|
170748
170776
|
}
|
|
170749
170777
|
var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
|
|
170750
|
-
ts.perfLogger.logEvent("Response message size: "
|
|
170778
|
+
ts.perfLogger.logEvent("Response message size: ".concat(msgText.length));
|
|
170751
170779
|
this.host.write(msgText);
|
|
170752
170780
|
};
|
|
170753
170781
|
Session.prototype.event = function (body, eventName) {
|
|
@@ -170885,7 +170913,7 @@ var ts;
|
|
|
170885
170913
|
if (!projects) {
|
|
170886
170914
|
return;
|
|
170887
170915
|
}
|
|
170888
|
-
this.logger.info("cleaning "
|
|
170916
|
+
this.logger.info("cleaning ".concat(caption));
|
|
170889
170917
|
for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
|
|
170890
170918
|
var p = projects_4[_i];
|
|
170891
170919
|
p.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache();
|
|
@@ -171299,7 +171327,7 @@ var ts;
|
|
|
171299
171327
|
var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
|
|
171300
171328
|
return {
|
|
171301
171329
|
refs: refs,
|
|
171302
|
-
symbolName: "\""
|
|
171330
|
+
symbolName: "\"".concat(args.file, "\"")
|
|
171303
171331
|
};
|
|
171304
171332
|
};
|
|
171305
171333
|
/**
|
|
@@ -171843,7 +171871,7 @@ var ts;
|
|
|
171843
171871
|
});
|
|
171844
171872
|
var badCode = args.errorCodes.find(function (c) { return !existingDiagCodes_1.includes(c); });
|
|
171845
171873
|
if (badCode !== undefined) {
|
|
171846
|
-
e.message = "BADCLIENT: Bad error code, "
|
|
171874
|
+
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);
|
|
171847
171875
|
}
|
|
171848
171876
|
throw e;
|
|
171849
171877
|
}
|
|
@@ -172120,7 +172148,7 @@ var ts;
|
|
|
172120
172148
|
};
|
|
172121
172149
|
Session.prototype.addProtocolHandler = function (command, handler) {
|
|
172122
172150
|
if (this.handlers.has(command)) {
|
|
172123
|
-
throw new Error("Protocol handler already exists for command \""
|
|
172151
|
+
throw new Error("Protocol handler already exists for command \"".concat(command, "\""));
|
|
172124
172152
|
}
|
|
172125
172153
|
this.handlers.set(command, handler);
|
|
172126
172154
|
};
|
|
@@ -172149,8 +172177,8 @@ var ts;
|
|
|
172149
172177
|
return this.executeWithRequestId(request.seq, function () { return handler(request); });
|
|
172150
172178
|
}
|
|
172151
172179
|
else {
|
|
172152
|
-
this.logger.msg("Unrecognized JSON command:"
|
|
172153
|
-
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: "
|
|
172180
|
+
this.logger.msg("Unrecognized JSON command:".concat(server.stringifyIndented(request)), server.Msg.Err);
|
|
172181
|
+
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: ".concat(request.command));
|
|
172154
172182
|
return { responseRequired: false };
|
|
172155
172183
|
}
|
|
172156
172184
|
};
|
|
@@ -172161,7 +172189,7 @@ var ts;
|
|
|
172161
172189
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
172162
172190
|
start = this.hrtime();
|
|
172163
172191
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
172164
|
-
this.logger.info("request:"
|
|
172192
|
+
this.logger.info("request:".concat(server.indent(this.toStringMessage(message))));
|
|
172165
172193
|
}
|
|
172166
172194
|
}
|
|
172167
172195
|
var request;
|
|
@@ -172177,10 +172205,10 @@ var ts;
|
|
|
172177
172205
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
172178
172206
|
var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
|
|
172179
172207
|
if (responseRequired) {
|
|
172180
|
-
this.logger.perftrc(request.seq
|
|
172208
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
172181
172209
|
}
|
|
172182
172210
|
else {
|
|
172183
|
-
this.logger.perftrc(request.seq
|
|
172211
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": async elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
172184
172212
|
}
|
|
172185
172213
|
}
|
|
172186
172214
|
// Note: Log before writing the response, else the editor can complete its activity before the server does
|
|
@@ -173116,7 +173144,7 @@ var ts;
|
|
|
173116
173144
|
}
|
|
173117
173145
|
if (!this.canWrite())
|
|
173118
173146
|
return;
|
|
173119
|
-
s = "["
|
|
173147
|
+
s = "[".concat(server.nowString(), "] ").concat(s, "\n");
|
|
173120
173148
|
if (!this.inGroup || this.firstInGroup) {
|
|
173121
173149
|
var prefix = BaseLogger.padStringRight(type + " " + this.seq.toString(), " ");
|
|
173122
173150
|
s = prefix + s;
|
|
@@ -173233,12 +173261,12 @@ var ts;
|
|
|
173233
173261
|
WorkerSession.prototype.send = function (msg) {
|
|
173234
173262
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
173235
173263
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
173236
|
-
this.logger.info("Session does not support events: ignored event: "
|
|
173264
|
+
this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
|
|
173237
173265
|
}
|
|
173238
173266
|
return;
|
|
173239
173267
|
}
|
|
173240
173268
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
173241
|
-
this.logger.info(msg.type
|
|
173269
|
+
this.logger.info("".concat(msg.type, ":").concat(server.indent(JSON.stringify(msg))));
|
|
173242
173270
|
}
|
|
173243
173271
|
this.webHost.writeMessage(msg);
|
|
173244
173272
|
};
|
|
@@ -174301,23 +174329,23 @@ var ts;
|
|
|
174301
174329
|
var status = cacheKey && statusCache_1.get(cacheKey);
|
|
174302
174330
|
if (status === undefined) {
|
|
174303
174331
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
174304
|
-
logger.info(cacheKey
|
|
174332
|
+
logger.info("".concat(cacheKey, " for path ").concat(path, " not found in cache..."));
|
|
174305
174333
|
}
|
|
174306
174334
|
try {
|
|
174307
174335
|
var args = [ts.combinePaths(__dirname, "watchGuard.js"), path];
|
|
174308
174336
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
174309
|
-
logger.info("Starting "
|
|
174337
|
+
logger.info("Starting ".concat(process.execPath, " with args:").concat(server.stringifyIndented(args)));
|
|
174310
174338
|
}
|
|
174311
174339
|
childProcess.execFileSync(process.execPath, args, { stdio: "ignore", env: { ELECTRON_RUN_AS_NODE: "1" } });
|
|
174312
174340
|
status = true;
|
|
174313
174341
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
174314
|
-
logger.info("WatchGuard for path "
|
|
174342
|
+
logger.info("WatchGuard for path ".concat(path, " returned: OK"));
|
|
174315
174343
|
}
|
|
174316
174344
|
}
|
|
174317
174345
|
catch (e) {
|
|
174318
174346
|
status = false;
|
|
174319
174347
|
if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
174320
|
-
logger.info("WatchGuard for path "
|
|
174348
|
+
logger.info("WatchGuard for path ".concat(path, " returned: ").concat(e.message));
|
|
174321
174349
|
}
|
|
174322
174350
|
}
|
|
174323
174351
|
if (cacheKey) {
|
|
@@ -174325,7 +174353,7 @@ var ts;
|
|
|
174325
174353
|
}
|
|
174326
174354
|
}
|
|
174327
174355
|
else if (logger.hasLevel(server.LogLevel.verbose)) {
|
|
174328
|
-
logger.info("watchDirectory for "
|
|
174356
|
+
logger.info("watchDirectory for ".concat(path, " uses cached drive information."));
|
|
174329
174357
|
}
|
|
174330
174358
|
if (status) {
|
|
174331
174359
|
// this drive is safe to use - call real 'watchDirectory'
|
|
@@ -174468,7 +174496,7 @@ var ts;
|
|
|
174468
174496
|
return originalWatchDirectory(path, callback, recursive, options);
|
|
174469
174497
|
}
|
|
174470
174498
|
catch (e) {
|
|
174471
|
-
logger.info("Exception when creating directory watcher: "
|
|
174499
|
+
logger.info("Exception when creating directory watcher: ".concat(e.message));
|
|
174472
174500
|
return ts.noopFileWatcher;
|
|
174473
174501
|
}
|
|
174474
174502
|
}
|
|
@@ -174537,7 +174565,7 @@ var ts;
|
|
|
174537
174565
|
args.push(server.Arguments.EnableTelemetry);
|
|
174538
174566
|
}
|
|
174539
174567
|
if (this.logger.loggingEnabled() && this.logger.getLogFileName()) {
|
|
174540
|
-
args.push(server.Arguments.LogFile, ts.combinePaths(ts.getDirectoryPath(ts.normalizeSlashes(this.logger.getLogFileName())), "ti-"
|
|
174568
|
+
args.push(server.Arguments.LogFile, ts.combinePaths(ts.getDirectoryPath(ts.normalizeSlashes(this.logger.getLogFileName())), "ti-".concat(process.pid, ".log")));
|
|
174541
174569
|
}
|
|
174542
174570
|
if (this.typingSafeListLocation) {
|
|
174543
174571
|
args.push(server.Arguments.TypingSafeListLocation, this.typingSafeListLocation);
|
|
@@ -174561,7 +174589,7 @@ var ts;
|
|
|
174561
174589
|
var currentPort = match[2] !== undefined
|
|
174562
174590
|
? +match[2]
|
|
174563
174591
|
: match[1].charAt(0) === "d" ? 5858 : 9229;
|
|
174564
|
-
execArgv.push("--"
|
|
174592
|
+
execArgv.push("--".concat(match[1], "=").concat(currentPort + 1));
|
|
174565
174593
|
break;
|
|
174566
174594
|
}
|
|
174567
174595
|
}
|
|
@@ -174587,13 +174615,13 @@ var ts;
|
|
|
174587
174615
|
var request = server.createInstallTypingsRequest(project, typeAcquisition, unresolvedImports);
|
|
174588
174616
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174589
174617
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174590
|
-
this.logger.info("Scheduling throttled operation:"
|
|
174618
|
+
this.logger.info("Scheduling throttled operation:".concat(server.stringifyIndented(request)));
|
|
174591
174619
|
}
|
|
174592
174620
|
}
|
|
174593
174621
|
var operationId = project.getProjectName();
|
|
174594
174622
|
var operation = function () {
|
|
174595
174623
|
if (_this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174596
|
-
_this.logger.info("Sending request:"
|
|
174624
|
+
_this.logger.info("Sending request:".concat(server.stringifyIndented(request)));
|
|
174597
174625
|
}
|
|
174598
174626
|
_this.send(request);
|
|
174599
174627
|
};
|
|
@@ -174603,7 +174631,7 @@ var ts;
|
|
|
174603
174631
|
}
|
|
174604
174632
|
else {
|
|
174605
174633
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174606
|
-
this.logger.info("Deferring request for: "
|
|
174634
|
+
this.logger.info("Deferring request for: ".concat(operationId));
|
|
174607
174635
|
}
|
|
174608
174636
|
this.requestQueue.push(queuedRequest);
|
|
174609
174637
|
this.requestMap.set(operationId, queuedRequest);
|
|
@@ -174611,7 +174639,7 @@ var ts;
|
|
|
174611
174639
|
};
|
|
174612
174640
|
NodeTypingsInstaller.prototype.handleMessage = function (response) {
|
|
174613
174641
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174614
|
-
this.logger.info("Received response:"
|
|
174642
|
+
this.logger.info("Received response:".concat(server.stringifyIndented(response)));
|
|
174615
174643
|
}
|
|
174616
174644
|
switch (response.kind) {
|
|
174617
174645
|
case server.EventTypesRegistry:
|
|
@@ -174689,7 +174717,7 @@ var ts;
|
|
|
174689
174717
|
break;
|
|
174690
174718
|
}
|
|
174691
174719
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174692
|
-
this.logger.info("Skipping defunct request for: "
|
|
174720
|
+
this.logger.info("Skipping defunct request for: ".concat(queuedRequest.operationId));
|
|
174693
174721
|
}
|
|
174694
174722
|
}
|
|
174695
174723
|
this.projectService.updateTypingsForProject(response);
|
|
@@ -174702,7 +174730,7 @@ var ts;
|
|
|
174702
174730
|
};
|
|
174703
174731
|
NodeTypingsInstaller.prototype.scheduleRequest = function (request) {
|
|
174704
174732
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174705
|
-
this.logger.info("Scheduling request for: "
|
|
174733
|
+
this.logger.info("Scheduling request for: ".concat(request.operationId));
|
|
174706
174734
|
}
|
|
174707
174735
|
this.activeRequestCount++;
|
|
174708
174736
|
this.host.setTimeout(request.operation, NodeTypingsInstaller.requestDelayMillis);
|
|
@@ -174750,7 +174778,7 @@ var ts;
|
|
|
174750
174778
|
if (this.canUseEvents && this.eventPort) {
|
|
174751
174779
|
if (!this.eventSocket) {
|
|
174752
174780
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
174753
|
-
this.logger.info("eventPort: event \""
|
|
174781
|
+
this.logger.info("eventPort: event \"".concat(eventName, "\" queued, but socket not yet initialized"));
|
|
174754
174782
|
}
|
|
174755
174783
|
(this.socketEventQueue || (this.socketEventQueue = [])).push({ body: body, eventName: eventName });
|
|
174756
174784
|
return;
|
|
@@ -174828,7 +174856,7 @@ var ts;
|
|
|
174828
174856
|
return ts.combinePaths(ts.combinePaths(cacheLocation, "typescript"), ts.versionMajorMinor);
|
|
174829
174857
|
}
|
|
174830
174858
|
default:
|
|
174831
|
-
return ts.Debug.fail("unsupported platform '"
|
|
174859
|
+
return ts.Debug.fail("unsupported platform '".concat(process.platform, "'"));
|
|
174832
174860
|
}
|
|
174833
174861
|
}
|
|
174834
174862
|
function getNonWindowsCacheLocation(platformIsDarwin) {
|
|
@@ -174838,7 +174866,7 @@ var ts;
|
|
|
174838
174866
|
var usersDir = platformIsDarwin ? "Users" : "home";
|
|
174839
174867
|
var homePath = (os.homedir && os.homedir()) ||
|
|
174840
174868
|
process.env.HOME ||
|
|
174841
|
-
((process.env.LOGNAME || process.env.USER) && "/"
|
|
174869
|
+
((process.env.LOGNAME || process.env.USER) && "/".concat(usersDir, "/").concat(process.env.LOGNAME || process.env.USER)) ||
|
|
174842
174870
|
os.tmpdir();
|
|
174843
174871
|
var cacheFolder = platformIsDarwin
|
|
174844
174872
|
? "Library/Caches"
|
|
@@ -174996,10 +175024,10 @@ var ts;
|
|
|
174996
175024
|
var args = _a.args, logger = _a.logger, cancellationToken = _a.cancellationToken, serverMode = _a.serverMode, unknownServerMode = _a.unknownServerMode, startServer = _a.startSession;
|
|
174997
175025
|
var syntaxOnly = server.hasArgument("--syntaxOnly");
|
|
174998
175026
|
logger.info("Starting TS Server");
|
|
174999
|
-
logger.info("Version: "
|
|
175000
|
-
logger.info("Arguments: "
|
|
175001
|
-
logger.info("Platform: "
|
|
175002
|
-
logger.info("ServerMode: "
|
|
175027
|
+
logger.info("Version: ".concat(ts.version));
|
|
175028
|
+
logger.info("Arguments: ".concat(args.join(" ")));
|
|
175029
|
+
logger.info("Platform: ".concat(platform, " NodeVersion: ").concat(ts.getNodeMajorVersion(), " CaseSensitive: ").concat(ts.sys.useCaseSensitiveFileNames));
|
|
175030
|
+
logger.info("ServerMode: ".concat(serverMode, " syntaxOnly: ").concat(syntaxOnly, " hasUnknownServerMode: ").concat(unknownServerMode));
|
|
175003
175031
|
ts.setStackTraceLimit();
|
|
175004
175032
|
if (ts.Debug.isDebugging) {
|
|
175005
175033
|
ts.Debug.enableDebugInfo();
|