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/tsserverlibrary.js
CHANGED
|
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
ar[i] = from[i];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
return to.concat(ar || from);
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
25
|
};
|
|
26
26
|
var __assign = (this && this.__assign) || function () {
|
|
27
27
|
__assign = Object.assign || function(t) {
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version =
|
|
297
|
+
ts.version = "4.5.3";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -335,7 +335,7 @@ var ts;
|
|
|
335
335
|
var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
|
|
336
336
|
if (constructor)
|
|
337
337
|
return constructor;
|
|
338
|
-
throw new Error("TypeScript requires an environment that provides a compatible native "
|
|
338
|
+
throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
|
|
339
339
|
}
|
|
340
340
|
})(ts || (ts = {}));
|
|
341
341
|
/* @internal */
|
|
@@ -1698,7 +1698,7 @@ var ts;
|
|
|
1698
1698
|
function cast(value, test) {
|
|
1699
1699
|
if (value !== undefined && test(value))
|
|
1700
1700
|
return value;
|
|
1701
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1701
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1702
1702
|
}
|
|
1703
1703
|
ts.cast = cast;
|
|
1704
1704
|
/** Does nothing. */
|
|
@@ -1789,7 +1789,7 @@ var ts;
|
|
|
1789
1789
|
function memoizeOne(callback) {
|
|
1790
1790
|
var map = new ts.Map();
|
|
1791
1791
|
return function (arg) {
|
|
1792
|
-
var key = typeof arg
|
|
1792
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1793
1793
|
var value = map.get(key);
|
|
1794
1794
|
if (value === undefined && !map.has(key)) {
|
|
1795
1795
|
value = callback(arg);
|
|
@@ -2239,7 +2239,7 @@ var ts;
|
|
|
2239
2239
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
2240
2240
|
function patternText(_a) {
|
|
2241
2241
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
2242
|
-
return prefix
|
|
2242
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
2243
2243
|
}
|
|
2244
2244
|
ts.patternText = patternText;
|
|
2245
2245
|
/**
|
|
@@ -2552,7 +2552,7 @@ var ts;
|
|
|
2552
2552
|
}
|
|
2553
2553
|
function fail(message, stackCrawlMark) {
|
|
2554
2554
|
debugger;
|
|
2555
|
-
var e = new Error(message ? "Debug Failure. "
|
|
2555
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
2556
2556
|
if (Error.captureStackTrace) {
|
|
2557
2557
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
2558
2558
|
}
|
|
@@ -2560,12 +2560,12 @@ var ts;
|
|
|
2560
2560
|
}
|
|
2561
2561
|
Debug.fail = fail;
|
|
2562
2562
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
2563
|
-
return fail((message || "Unexpected node."
|
|
2563
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
2564
2564
|
}
|
|
2565
2565
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
2566
2566
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
2567
2567
|
if (!expression) {
|
|
2568
|
-
message = message ? "False expression: "
|
|
2568
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
2569
2569
|
if (verboseDebugInfo) {
|
|
2570
2570
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
2571
2571
|
}
|
|
@@ -2575,26 +2575,26 @@ var ts;
|
|
|
2575
2575
|
Debug.assert = assert;
|
|
2576
2576
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
2577
2577
|
if (a !== b) {
|
|
2578
|
-
var message = msg ? msg2 ? msg
|
|
2579
|
-
fail("Expected "
|
|
2578
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
2579
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
2582
|
Debug.assertEqual = assertEqual;
|
|
2583
2583
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
2584
2584
|
if (a >= b) {
|
|
2585
|
-
fail("Expected "
|
|
2585
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
2586
2586
|
}
|
|
2587
2587
|
}
|
|
2588
2588
|
Debug.assertLessThan = assertLessThan;
|
|
2589
2589
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
2590
2590
|
if (a > b) {
|
|
2591
|
-
fail("Expected "
|
|
2591
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
2592
2592
|
}
|
|
2593
2593
|
}
|
|
2594
2594
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
2595
2595
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
2596
2596
|
if (a < b) {
|
|
2597
|
-
fail("Expected "
|
|
2597
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
2600
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2635,42 +2635,42 @@ var ts;
|
|
|
2635
2635
|
function assertNever(member, message, stackCrawlMark) {
|
|
2636
2636
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2637
2637
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2638
|
-
return fail(message
|
|
2638
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2639
2639
|
}
|
|
2640
2640
|
Debug.assertNever = assertNever;
|
|
2641
2641
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2642
2642
|
if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
|
|
2643
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2643
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
2646
|
Debug.assertEachNode = assertEachNode;
|
|
2647
2647
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2648
2648
|
if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
|
|
2649
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2649
|
+
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNode);
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
2652
|
Debug.assertNode = assertNode;
|
|
2653
2653
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2654
2654
|
if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
|
|
2655
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2655
|
+
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " should not have passed test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNotNode);
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
2658
|
Debug.assertNotNode = assertNotNode;
|
|
2659
2659
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2660
2660
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
|
|
2661
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2661
|
+
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertOptionalNode);
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
2664
2664
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2665
2665
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2666
2666
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
|
|
2667
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2667
|
+
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " was not a '").concat(formatSyntaxKind(kind), "' token."); }, stackCrawlMark || assertOptionalToken);
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
2670
2670
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2671
2671
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2672
2672
|
if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
|
|
2673
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2673
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2691,7 +2691,7 @@ var ts;
|
|
|
2691
2691
|
}
|
|
2692
2692
|
Debug.getFunctionName = getFunctionName;
|
|
2693
2693
|
function formatSymbol(symbol) {
|
|
2694
|
-
return "{ name: "
|
|
2694
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2695
2695
|
}
|
|
2696
2696
|
Debug.formatSymbol = formatSymbol;
|
|
2697
2697
|
/**
|
|
@@ -2712,7 +2712,7 @@ var ts;
|
|
|
2712
2712
|
break;
|
|
2713
2713
|
}
|
|
2714
2714
|
if (enumValue !== 0 && enumValue & value) {
|
|
2715
|
-
result = ""
|
|
2715
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2716
2716
|
remainingFlags &= ~enumValue;
|
|
2717
2717
|
}
|
|
2718
2718
|
}
|
|
@@ -2822,7 +2822,7 @@ var ts;
|
|
|
2822
2822
|
this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
|
|
2823
2823
|
"UnknownFlow";
|
|
2824
2824
|
var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
|
|
2825
|
-
return ""
|
|
2825
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2826
2826
|
}
|
|
2827
2827
|
},
|
|
2828
2828
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
|
|
@@ -2861,7 +2861,7 @@ var ts;
|
|
|
2861
2861
|
// We don't care, this is debug code that's only enabled with a debugger attached -
|
|
2862
2862
|
// we're just taking note of it for anyone checking regex performance in the future.
|
|
2863
2863
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2864
|
-
return "NodeArray "
|
|
2864
|
+
return "NodeArray ".concat(defaultValue);
|
|
2865
2865
|
}
|
|
2866
2866
|
}
|
|
2867
2867
|
});
|
|
@@ -2916,7 +2916,7 @@ var ts;
|
|
|
2916
2916
|
var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
|
|
2917
2917
|
"Symbol";
|
|
2918
2918
|
var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
|
|
2919
|
-
return symbolHeader
|
|
2919
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2920
2920
|
}
|
|
2921
2921
|
},
|
|
2922
2922
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2926,11 +2926,11 @@ var ts;
|
|
|
2926
2926
|
__tsDebuggerDisplay: {
|
|
2927
2927
|
value: function () {
|
|
2928
2928
|
var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
|
|
2929
|
-
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType "
|
|
2930
|
-
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType "
|
|
2929
|
+
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2930
|
+
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2931
2931
|
this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
|
|
2932
2932
|
this.flags & 32 /* Enum */ ? "EnumType" :
|
|
2933
|
-
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType "
|
|
2933
|
+
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2934
2934
|
this.flags & 1048576 /* Union */ ? "UnionType" :
|
|
2935
2935
|
this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
|
|
2936
2936
|
this.flags & 4194304 /* Index */ ? "IndexType" :
|
|
@@ -2949,7 +2949,7 @@ var ts;
|
|
|
2949
2949
|
"ObjectType" :
|
|
2950
2950
|
"Type";
|
|
2951
2951
|
var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
|
|
2952
|
-
return ""
|
|
2952
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2953
2953
|
}
|
|
2954
2954
|
},
|
|
2955
2955
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2985,11 +2985,11 @@ var ts;
|
|
|
2985
2985
|
__tsDebuggerDisplay: {
|
|
2986
2986
|
value: function () {
|
|
2987
2987
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2988
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2989
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2990
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2991
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2992
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2988
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2989
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2990
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2991
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2992
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2993
2993
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2994
2994
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2995
2995
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -3021,7 +3021,7 @@ var ts;
|
|
|
3021
3021
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
3022
3022
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
3023
3023
|
formatSyntaxKind(this.kind);
|
|
3024
|
-
return ""
|
|
3024
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
3025
3025
|
}
|
|
3026
3026
|
},
|
|
3027
3027
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -3068,10 +3068,10 @@ var ts;
|
|
|
3068
3068
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
3069
3069
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
3070
3070
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
3071
|
-
deprecationMessage += "'"
|
|
3072
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
3073
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
3074
|
-
deprecationMessage += message ? " "
|
|
3071
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
3072
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
3073
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
3074
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
3075
3075
|
return deprecationMessage;
|
|
3076
3076
|
}
|
|
3077
3077
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -3202,11 +3202,11 @@ var ts;
|
|
|
3202
3202
|
}
|
|
3203
3203
|
};
|
|
3204
3204
|
Version.prototype.toString = function () {
|
|
3205
|
-
var result = this.major
|
|
3205
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
3206
3206
|
if (ts.some(this.prerelease))
|
|
3207
|
-
result += "-"
|
|
3207
|
+
result += "-".concat(this.prerelease.join("."));
|
|
3208
3208
|
if (ts.some(this.build))
|
|
3209
|
-
result += "+"
|
|
3209
|
+
result += "+".concat(this.build.join("."));
|
|
3210
3210
|
return result;
|
|
3211
3211
|
};
|
|
3212
3212
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -3473,7 +3473,7 @@ var ts;
|
|
|
3473
3473
|
return ts.map(comparators, formatComparator).join(" ");
|
|
3474
3474
|
}
|
|
3475
3475
|
function formatComparator(comparator) {
|
|
3476
|
-
return ""
|
|
3476
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
3477
3477
|
}
|
|
3478
3478
|
})(ts || (ts = {}));
|
|
3479
3479
|
/*@internal*/
|
|
@@ -3771,7 +3771,7 @@ var ts;
|
|
|
3771
3771
|
fs = require("fs");
|
|
3772
3772
|
}
|
|
3773
3773
|
catch (e) {
|
|
3774
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
3774
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
3775
3775
|
}
|
|
3776
3776
|
}
|
|
3777
3777
|
mode = tracingMode;
|
|
@@ -3783,11 +3783,11 @@ var ts;
|
|
|
3783
3783
|
if (!fs.existsSync(traceDir)) {
|
|
3784
3784
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
3785
3785
|
}
|
|
3786
|
-
var countPart = mode === "build" ? "."
|
|
3787
|
-
: mode === "server" ? "."
|
|
3786
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
3787
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
3788
3788
|
: "";
|
|
3789
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
3790
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
3789
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
3790
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
3791
3791
|
legend.push({
|
|
3792
3792
|
configFilePath: configFilePath,
|
|
3793
3793
|
tracePath: tracePath,
|
|
@@ -3877,7 +3877,7 @@ var ts;
|
|
|
3877
3877
|
}
|
|
3878
3878
|
// test if [time,endTime) straddles a sampling point
|
|
3879
3879
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3880
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3880
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3881
3881
|
}
|
|
3882
3882
|
}
|
|
3883
3883
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3886,11 +3886,11 @@ var ts;
|
|
|
3886
3886
|
if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
|
|
3887
3887
|
return;
|
|
3888
3888
|
ts.performance.mark("beginTracing");
|
|
3889
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3889
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3890
3890
|
if (extras)
|
|
3891
|
-
fs.writeSync(traceFd, ","
|
|
3891
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3892
3892
|
if (args)
|
|
3893
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3893
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3894
3894
|
fs.writeSync(traceFd, "}");
|
|
3895
3895
|
ts.performance.mark("endTracing");
|
|
3896
3896
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -5067,8 +5067,6 @@ var ts;
|
|
|
5067
5067
|
// 'Narrowable' types are types where narrowing actually narrows.
|
|
5068
5068
|
// This *should* be every type other than null, undefined, void, and never
|
|
5069
5069
|
TypeFlags[TypeFlags["Narrowable"] = 536624127] = "Narrowable";
|
|
5070
|
-
/* @internal */
|
|
5071
|
-
TypeFlags[TypeFlags["NotPrimitiveUnion"] = 468598819] = "NotPrimitiveUnion";
|
|
5072
5070
|
// The following flags are aggregated during union and intersection type construction
|
|
5073
5071
|
/* @internal */
|
|
5074
5072
|
TypeFlags[TypeFlags["IncludesMask"] = 205258751] = "IncludesMask";
|
|
@@ -5081,6 +5079,10 @@ var ts;
|
|
|
5081
5079
|
TypeFlags[TypeFlags["IncludesWildcard"] = 8388608] = "IncludesWildcard";
|
|
5082
5080
|
/* @internal */
|
|
5083
5081
|
TypeFlags[TypeFlags["IncludesEmptyObject"] = 16777216] = "IncludesEmptyObject";
|
|
5082
|
+
/* @internal */
|
|
5083
|
+
TypeFlags[TypeFlags["IncludesInstantiable"] = 33554432] = "IncludesInstantiable";
|
|
5084
|
+
/* @internal */
|
|
5085
|
+
TypeFlags[TypeFlags["NotPrimitiveUnion"] = 36323363] = "NotPrimitiveUnion";
|
|
5084
5086
|
})(TypeFlags = ts.TypeFlags || (ts.TypeFlags = {}));
|
|
5085
5087
|
// Types included in TypeFlags.ObjectFlagsType have an objectFlags property. Some ObjectFlags
|
|
5086
5088
|
// are specific to certain types and reuse the same bit position. Those ObjectFlags require a check
|
|
@@ -6695,7 +6697,7 @@ var ts;
|
|
|
6695
6697
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
6696
6698
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
6697
6699
|
function getLevel(envVar, level) {
|
|
6698
|
-
return system.getEnvironmentVariable(envVar
|
|
6700
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
6699
6701
|
}
|
|
6700
6702
|
function getCustomLevels(baseVariable) {
|
|
6701
6703
|
var customLevels;
|
|
@@ -7160,7 +7162,7 @@ var ts;
|
|
|
7160
7162
|
}
|
|
7161
7163
|
function onTimerToUpdateChildWatches() {
|
|
7162
7164
|
timerToUpdateChildWatches = undefined;
|
|
7163
|
-
ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
7165
|
+
ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
7164
7166
|
var start = ts.timestamp();
|
|
7165
7167
|
var invokeMap = new ts.Map();
|
|
7166
7168
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -7173,7 +7175,7 @@ var ts;
|
|
|
7173
7175
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
7174
7176
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
7175
7177
|
}
|
|
7176
|
-
ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
7178
|
+
ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
7177
7179
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
7178
7180
|
var existing = invokeMap.get(rootDirName);
|
|
7179
7181
|
if (existing) {
|
|
@@ -7189,7 +7191,7 @@ var ts;
|
|
|
7189
7191
|
}
|
|
7190
7192
|
});
|
|
7191
7193
|
var elapsed = ts.timestamp() - start;
|
|
7192
|
-
ts.sysLog("sysLog:: Elapsed:: "
|
|
7194
|
+
ts.sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
7193
7195
|
}
|
|
7194
7196
|
function removeChildWatches(parentWatcher) {
|
|
7195
7197
|
if (!parentWatcher)
|
|
@@ -7649,7 +7651,7 @@ var ts;
|
|
|
7649
7651
|
var remappedPaths = new ts.Map();
|
|
7650
7652
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
7651
7653
|
// Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
|
|
7652
|
-
var fileUrlRoot = "file://"
|
|
7654
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
7653
7655
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
7654
7656
|
var node = _a[_i];
|
|
7655
7657
|
if (node.callFrame.url) {
|
|
@@ -7658,7 +7660,7 @@ var ts;
|
|
|
7658
7660
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
|
|
7659
7661
|
}
|
|
7660
7662
|
else if (!nativePattern.test(url)) {
|
|
7661
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
7663
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
7662
7664
|
externalFileCounter++;
|
|
7663
7665
|
}
|
|
7664
7666
|
}
|
|
@@ -7674,7 +7676,7 @@ var ts;
|
|
|
7674
7676
|
if (!err) {
|
|
7675
7677
|
try {
|
|
7676
7678
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
7677
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
7679
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
7678
7680
|
}
|
|
7679
7681
|
}
|
|
7680
7682
|
catch (_c) {
|
|
@@ -7776,7 +7778,7 @@ var ts;
|
|
|
7776
7778
|
* @param createWatcher
|
|
7777
7779
|
*/
|
|
7778
7780
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
7779
|
-
ts.sysLog("sysLog:: "
|
|
7781
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
7780
7782
|
// Call the callback for current directory
|
|
7781
7783
|
callback("rename", "");
|
|
7782
7784
|
// If watcher is not closed, update it
|
|
@@ -7801,7 +7803,7 @@ var ts;
|
|
|
7801
7803
|
}
|
|
7802
7804
|
}
|
|
7803
7805
|
if (hitSystemWatcherLimit) {
|
|
7804
|
-
ts.sysLog("sysLog:: "
|
|
7806
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
7805
7807
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7806
7808
|
}
|
|
7807
7809
|
try {
|
|
@@ -7817,7 +7819,7 @@ var ts;
|
|
|
7817
7819
|
// Eg. on linux the number of watches are limited and one could easily exhaust watches and the exception ENOSPC is thrown when creating watcher at that point
|
|
7818
7820
|
// so instead of throwing error, use fs.watchFile
|
|
7819
7821
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
7820
|
-
ts.sysLog("sysLog:: "
|
|
7822
|
+
ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
7821
7823
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7822
7824
|
}
|
|
7823
7825
|
}
|
|
@@ -7955,7 +7957,7 @@ var ts;
|
|
|
7955
7957
|
}
|
|
7956
7958
|
}
|
|
7957
7959
|
function readDirectory(path, extensions, excludes, includes, depth) {
|
|
7958
|
-
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath
|
|
7960
|
+
return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
7959
7961
|
}
|
|
7960
7962
|
function fileSystemEntryExists(path, entryKind) {
|
|
7961
7963
|
// Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve
|
|
@@ -10119,7 +10121,7 @@ var ts;
|
|
|
10119
10121
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
10120
10122
|
}
|
|
10121
10123
|
else {
|
|
10122
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
10124
|
+
ts.Debug.fail("Bad line number. Line: ".concat(line, ", lineStarts.length: ").concat(lineStarts.length, " , line map is correct? ").concat(debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
|
|
10123
10125
|
}
|
|
10124
10126
|
}
|
|
10125
10127
|
var res = lineStarts[line] + character;
|
|
@@ -12999,7 +13001,7 @@ var ts;
|
|
|
12999
13001
|
return typeof comment === "string" ? comment
|
|
13000
13002
|
: comment === null || comment === void 0 ? void 0 : comment.map(function (c) {
|
|
13001
13003
|
// TODO: Other kinds here
|
|
13002
|
-
return c.kind === 319 /* JSDocText */ ? c.text : "{@link "
|
|
13004
|
+
return c.kind === 319 /* JSDocText */ ? c.text : "{@link ".concat(c.name ? ts.entityNameToString(c.name) + " " : "").concat(c.text, "}");
|
|
13003
13005
|
}).join("");
|
|
13004
13006
|
}
|
|
13005
13007
|
ts.getTextOfJSDocComment = getTextOfJSDocComment;
|
|
@@ -14269,8 +14271,8 @@ var ts;
|
|
|
14269
14271
|
}
|
|
14270
14272
|
function packageIdToString(_a) {
|
|
14271
14273
|
var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
|
|
14272
|
-
var fullName = subModuleName ? name
|
|
14273
|
-
return fullName
|
|
14274
|
+
var fullName = subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
14275
|
+
return "".concat(fullName, "@").concat(version);
|
|
14274
14276
|
}
|
|
14275
14277
|
ts.packageIdToString = packageIdToString;
|
|
14276
14278
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -14349,7 +14351,7 @@ var ts;
|
|
|
14349
14351
|
function nodePosToString(node) {
|
|
14350
14352
|
var file = getSourceFileOfNode(node);
|
|
14351
14353
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
14352
|
-
return file.fileName
|
|
14354
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
14353
14355
|
}
|
|
14354
14356
|
ts.nodePosToString = nodePosToString;
|
|
14355
14357
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -14488,7 +14490,7 @@ var ts;
|
|
|
14488
14490
|
ts.isPinnedComment = isPinnedComment;
|
|
14489
14491
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
14490
14492
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
14491
|
-
""
|
|
14493
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
14492
14494
|
commentDirective,
|
|
14493
14495
|
]); }));
|
|
14494
14496
|
var usedLines = new ts.Map();
|
|
@@ -14505,10 +14507,10 @@ var ts;
|
|
|
14505
14507
|
});
|
|
14506
14508
|
}
|
|
14507
14509
|
function markUsed(line) {
|
|
14508
|
-
if (!directivesByLine.has(""
|
|
14510
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
14509
14511
|
return false;
|
|
14510
14512
|
}
|
|
14511
|
-
usedLines.set(""
|
|
14513
|
+
usedLines.set("".concat(line), true);
|
|
14512
14514
|
return true;
|
|
14513
14515
|
}
|
|
14514
14516
|
}
|
|
@@ -14723,7 +14725,7 @@ var ts;
|
|
|
14723
14725
|
}
|
|
14724
14726
|
return node.text;
|
|
14725
14727
|
}
|
|
14726
|
-
return ts.Debug.fail("Literal kind '"
|
|
14728
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
14727
14729
|
}
|
|
14728
14730
|
ts.getLiteralText = getLiteralText;
|
|
14729
14731
|
function canUseOriginalText(node, flags) {
|
|
@@ -17254,11 +17256,11 @@ var ts;
|
|
|
17254
17256
|
}
|
|
17255
17257
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
17256
17258
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
17257
|
-
return "__@"
|
|
17259
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
17258
17260
|
}
|
|
17259
17261
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
17260
17262
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
17261
|
-
return "__#"
|
|
17263
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
17262
17264
|
}
|
|
17263
17265
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
17264
17266
|
function isKnownSymbol(symbol) {
|
|
@@ -19951,7 +19953,7 @@ var ts;
|
|
|
19951
19953
|
}
|
|
19952
19954
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
19953
19955
|
function getJSXRuntimeImport(base, options) {
|
|
19954
|
-
return base ? base
|
|
19956
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
19955
19957
|
}
|
|
19956
19958
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
19957
19959
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -20068,7 +20070,7 @@ var ts;
|
|
|
20068
20070
|
}
|
|
20069
20071
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
20070
20072
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
20071
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
20073
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
20072
20074
|
var filesMatcher = {
|
|
20073
20075
|
/**
|
|
20074
20076
|
* Matches any single directory segment unless it is the last segment and a .min.js file
|
|
@@ -20081,7 +20083,7 @@ var ts;
|
|
|
20081
20083
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
20082
20084
|
* files or directories, does not match subdirectories that start with a . character
|
|
20083
20085
|
*/
|
|
20084
|
-
doubleAsteriskRegexFragment: "(/"
|
|
20086
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
20085
20087
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
20086
20088
|
};
|
|
20087
20089
|
var directoriesMatcher = {
|
|
@@ -20090,7 +20092,7 @@ var ts;
|
|
|
20090
20092
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
20091
20093
|
* files or directories, does not match subdirectories that start with a . character
|
|
20092
20094
|
*/
|
|
20093
|
-
doubleAsteriskRegexFragment: "(/"
|
|
20095
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
20094
20096
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
20095
20097
|
};
|
|
20096
20098
|
var excludeMatcher = {
|
|
@@ -20108,10 +20110,10 @@ var ts;
|
|
|
20108
20110
|
if (!patterns || !patterns.length) {
|
|
20109
20111
|
return undefined;
|
|
20110
20112
|
}
|
|
20111
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
20113
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
20112
20114
|
// If excluding, match "foo/bar/baz...", but if including, only allow "foo".
|
|
20113
20115
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
20114
|
-
return "^("
|
|
20116
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
20115
20117
|
}
|
|
20116
20118
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
20117
20119
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -20133,7 +20135,7 @@ var ts;
|
|
|
20133
20135
|
ts.isImplicitGlob = isImplicitGlob;
|
|
20134
20136
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
20135
20137
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
20136
|
-
return pattern && "^("
|
|
20138
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
20137
20139
|
}
|
|
20138
20140
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
20139
20141
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -20211,11 +20213,11 @@ var ts;
|
|
|
20211
20213
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20212
20214
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
20213
20215
|
return {
|
|
20214
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
20216
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
20215
20217
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
20216
20218
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
20217
20219
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
20218
|
-
basePaths: getBasePaths(
|
|
20220
|
+
basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
|
|
20219
20221
|
};
|
|
20220
20222
|
}
|
|
20221
20223
|
ts.getFileMatcherPatterns = getFileMatcherPatterns;
|
|
@@ -20224,7 +20226,7 @@ var ts;
|
|
|
20224
20226
|
}
|
|
20225
20227
|
ts.getRegexFromPattern = getRegexFromPattern;
|
|
20226
20228
|
/** @param path directory of the tsconfig.json */
|
|
20227
|
-
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath
|
|
20229
|
+
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
20228
20230
|
path = ts.normalizePath(path);
|
|
20229
20231
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20230
20232
|
var patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory);
|
|
@@ -20237,20 +20239,18 @@ var ts;
|
|
|
20237
20239
|
var visited = new ts.Map();
|
|
20238
20240
|
var toCanonical = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
20239
20241
|
for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) {
|
|
20240
|
-
var
|
|
20241
|
-
|
|
20242
|
-
visitDirectory(absoluteBasePath, depth);
|
|
20243
|
-
}
|
|
20242
|
+
var basePath = _a[_i];
|
|
20243
|
+
visitDirectory(basePath, ts.combinePaths(currentDirectory, basePath), depth);
|
|
20244
20244
|
}
|
|
20245
20245
|
return ts.flatten(results);
|
|
20246
|
-
function visitDirectory(absolutePath, depth) {
|
|
20246
|
+
function visitDirectory(path, absolutePath, depth) {
|
|
20247
20247
|
var canonicalPath = toCanonical(realpath(absolutePath));
|
|
20248
20248
|
if (visited.has(canonicalPath))
|
|
20249
20249
|
return;
|
|
20250
20250
|
visited.set(canonicalPath, true);
|
|
20251
|
-
var _a = getFileSystemEntries(
|
|
20251
|
+
var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories;
|
|
20252
20252
|
var _loop_1 = function (current) {
|
|
20253
|
-
var name = ts.combinePaths(
|
|
20253
|
+
var name = ts.combinePaths(path, current);
|
|
20254
20254
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
20255
20255
|
if (extensions && !ts.fileExtensionIsOneOf(name, extensions))
|
|
20256
20256
|
return "continue";
|
|
@@ -20278,10 +20278,11 @@ var ts;
|
|
|
20278
20278
|
}
|
|
20279
20279
|
for (var _c = 0, _d = ts.sort(directories, ts.compareStringsCaseSensitive); _c < _d.length; _c++) {
|
|
20280
20280
|
var current = _d[_c];
|
|
20281
|
+
var name = ts.combinePaths(path, current);
|
|
20281
20282
|
var absoluteName = ts.combinePaths(absolutePath, current);
|
|
20282
20283
|
if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) &&
|
|
20283
20284
|
(!excludeRegex || !excludeRegex.test(absoluteName))) {
|
|
20284
|
-
visitDirectory(absoluteName, depth);
|
|
20285
|
+
visitDirectory(name, absoluteName, depth);
|
|
20285
20286
|
}
|
|
20286
20287
|
}
|
|
20287
20288
|
}
|
|
@@ -20289,11 +20290,10 @@ var ts;
|
|
|
20289
20290
|
ts.matchFiles = matchFiles;
|
|
20290
20291
|
/**
|
|
20291
20292
|
* Computes the unique non-wildcard base paths amongst the provided include patterns.
|
|
20292
|
-
* @returns Absolute directory paths
|
|
20293
20293
|
*/
|
|
20294
|
-
function getBasePaths(
|
|
20294
|
+
function getBasePaths(path, includes, useCaseSensitiveFileNames) {
|
|
20295
20295
|
// Storage for our results in the form of literal paths (e.g. the paths as written by the user).
|
|
20296
|
-
var basePaths = [
|
|
20296
|
+
var basePaths = [path];
|
|
20297
20297
|
if (includes) {
|
|
20298
20298
|
// Storage for literal base paths amongst the include patterns.
|
|
20299
20299
|
var includeBasePaths = [];
|
|
@@ -20301,14 +20301,14 @@ var ts;
|
|
|
20301
20301
|
var include = includes_1[_i];
|
|
20302
20302
|
// We also need to check the relative paths by converting them to absolute and normalizing
|
|
20303
20303
|
// in case they escape the base path (e.g "..\somedirectory")
|
|
20304
|
-
var
|
|
20304
|
+
var absolute = ts.isRootedDiskPath(include) ? include : ts.normalizePath(ts.combinePaths(path, include));
|
|
20305
20305
|
// Append the literal and canonical candidate base paths.
|
|
20306
|
-
includeBasePaths.push(getIncludeBasePath(
|
|
20306
|
+
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
20307
20307
|
}
|
|
20308
20308
|
// Sort the offsets array using either the literal or canonical path representations.
|
|
20309
20309
|
includeBasePaths.sort(ts.getStringComparer(!useCaseSensitiveFileNames));
|
|
20310
20310
|
var _loop_2 = function (includeBasePath) {
|
|
20311
|
-
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath,
|
|
20311
|
+
if (ts.every(basePaths, function (basePath) { return !ts.containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames); })) {
|
|
20312
20312
|
basePaths.push(includeBasePath);
|
|
20313
20313
|
}
|
|
20314
20314
|
};
|
|
@@ -20494,7 +20494,7 @@ var ts;
|
|
|
20494
20494
|
*/
|
|
20495
20495
|
function extensionFromPath(path) {
|
|
20496
20496
|
var ext = tryGetExtensionFromPath(path);
|
|
20497
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
20497
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
20498
20498
|
}
|
|
20499
20499
|
ts.extensionFromPath = extensionFromPath;
|
|
20500
20500
|
function isAnySupportedFileExtension(path) {
|
|
@@ -26483,7 +26483,7 @@ var ts;
|
|
|
26483
26483
|
case 326 /* JSDocAugmentsTag */: return "augments";
|
|
26484
26484
|
case 327 /* JSDocImplementsTag */: return "implements";
|
|
26485
26485
|
default:
|
|
26486
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
26486
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
26487
26487
|
}
|
|
26488
26488
|
}
|
|
26489
26489
|
var rawTextScanner;
|
|
@@ -26811,7 +26811,7 @@ var ts;
|
|
|
26811
26811
|
};
|
|
26812
26812
|
var definedTextGetter_1 = function (path) {
|
|
26813
26813
|
var result = textGetter_1(path);
|
|
26814
|
-
return result !== undefined ? result : "/* Input file "
|
|
26814
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
26815
26815
|
};
|
|
26816
26816
|
var buildInfo_1;
|
|
26817
26817
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -31349,7 +31349,7 @@ var ts;
|
|
|
31349
31349
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
31350
31350
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
31351
31351
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
31352
|
-
return keyword
|
|
31352
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
31353
31353
|
}
|
|
31354
31354
|
}
|
|
31355
31355
|
return undefined;
|
|
@@ -38113,7 +38113,7 @@ var ts;
|
|
|
38113
38113
|
if (namedArgRegExCache.has(name)) {
|
|
38114
38114
|
return namedArgRegExCache.get(name);
|
|
38115
38115
|
}
|
|
38116
|
-
var result = new RegExp("(\\s"
|
|
38116
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
38117
38117
|
namedArgRegExCache.set(name, result);
|
|
38118
38118
|
return result;
|
|
38119
38119
|
}
|
|
@@ -39575,8 +39575,8 @@ var ts;
|
|
|
39575
39575
|
}
|
|
39576
39576
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
39577
39577
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
39578
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
39579
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
39578
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
39579
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
39580
39580
|
}
|
|
39581
39581
|
/* @internal */
|
|
39582
39582
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -40370,10 +40370,10 @@ var ts;
|
|
|
40370
40370
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
40371
40371
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
40372
40372
|
if (newValue !== defaultValue) {
|
|
40373
|
-
result.push(""
|
|
40373
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
40374
40374
|
}
|
|
40375
40375
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
40376
|
-
result.push(""
|
|
40376
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
40377
40377
|
}
|
|
40378
40378
|
});
|
|
40379
40379
|
return result.join(newLine) + newLine;
|
|
@@ -40424,19 +40424,19 @@ var ts;
|
|
|
40424
40424
|
if (entries.length !== 0) {
|
|
40425
40425
|
entries.push({ value: "" });
|
|
40426
40426
|
}
|
|
40427
|
-
entries.push({ value: "/* "
|
|
40427
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
40428
40428
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
40429
40429
|
var option = options_1[_i];
|
|
40430
40430
|
var optionName = void 0;
|
|
40431
40431
|
if (compilerOptionsMap.has(option.name)) {
|
|
40432
|
-
optionName = "\""
|
|
40432
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
40433
40433
|
}
|
|
40434
40434
|
else {
|
|
40435
|
-
optionName = "// \""
|
|
40435
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
40436
40436
|
}
|
|
40437
40437
|
entries.push({
|
|
40438
40438
|
value: optionName,
|
|
40439
|
-
description: "/* "
|
|
40439
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
40440
40440
|
});
|
|
40441
40441
|
marginLength = Math.max(optionName.length, marginLength);
|
|
40442
40442
|
}
|
|
@@ -40445,25 +40445,25 @@ var ts;
|
|
|
40445
40445
|
var tab = makePadding(2);
|
|
40446
40446
|
var result = [];
|
|
40447
40447
|
result.push("{");
|
|
40448
|
-
result.push(tab
|
|
40449
|
-
result.push(""
|
|
40448
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
40449
|
+
result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file), " */"));
|
|
40450
40450
|
result.push("");
|
|
40451
40451
|
// Print out each row, aligning all the descriptions on the same column.
|
|
40452
40452
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
40453
40453
|
var entry = entries_2[_a];
|
|
40454
40454
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
40455
|
-
result.push(value && ""
|
|
40455
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
40456
40456
|
}
|
|
40457
40457
|
if (fileNames.length) {
|
|
40458
|
-
result.push(tab
|
|
40459
|
-
result.push(tab
|
|
40458
|
+
result.push("".concat(tab, "},"));
|
|
40459
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
40460
40460
|
for (var i = 0; i < fileNames.length; i++) {
|
|
40461
|
-
result.push(""
|
|
40461
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
40462
40462
|
}
|
|
40463
|
-
result.push(tab
|
|
40463
|
+
result.push("".concat(tab, "]"));
|
|
40464
40464
|
}
|
|
40465
40465
|
else {
|
|
40466
|
-
result.push(tab
|
|
40466
|
+
result.push("".concat(tab, "}"));
|
|
40467
40467
|
}
|
|
40468
40468
|
result.push("}");
|
|
40469
40469
|
return result.join(newLine) + newLine;
|
|
@@ -40861,7 +40861,7 @@ var ts;
|
|
|
40861
40861
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
40862
40862
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
40863
40863
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
|
|
40864
|
-
extendedConfigPath = extendedConfigPath
|
|
40864
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
40865
40865
|
if (!host.fileExists(extendedConfigPath)) {
|
|
40866
40866
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
40867
40867
|
return undefined;
|
|
@@ -41106,7 +41106,7 @@ var ts;
|
|
|
41106
41106
|
// Valid only if *.json specified
|
|
41107
41107
|
if (!jsonOnlyIncludeRegexes) {
|
|
41108
41108
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
|
|
41109
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
41109
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
41110
41110
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
41111
41111
|
}
|
|
41112
41112
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -41542,7 +41542,7 @@ var ts;
|
|
|
41542
41542
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
41543
41543
|
if (typeof bestVersionPaths !== "object") {
|
|
41544
41544
|
if (state.traceEnabled) {
|
|
41545
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
41545
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
41546
41546
|
}
|
|
41547
41547
|
return;
|
|
41548
41548
|
}
|
|
@@ -41653,7 +41653,10 @@ var ts;
|
|
|
41653
41653
|
}
|
|
41654
41654
|
}
|
|
41655
41655
|
var failedLookupLocations = [];
|
|
41656
|
-
var
|
|
41656
|
+
var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
|
|
41657
|
+
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
41658
|
+
NodeResolutionFeatures.None;
|
|
41659
|
+
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
|
|
41657
41660
|
var resolved = primaryLookup();
|
|
41658
41661
|
var primary = true;
|
|
41659
41662
|
if (!resolved) {
|
|
@@ -41920,7 +41923,7 @@ var ts;
|
|
|
41920
41923
|
};
|
|
41921
41924
|
return cache;
|
|
41922
41925
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
41923
|
-
var result = mode === undefined ? specifier : mode
|
|
41926
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
41924
41927
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
41925
41928
|
return result;
|
|
41926
41929
|
}
|
|
@@ -41951,7 +41954,7 @@ var ts;
|
|
|
41951
41954
|
}
|
|
41952
41955
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
41953
41956
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
41954
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
41957
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
41955
41958
|
}
|
|
41956
41959
|
function createPerModuleNameCache() {
|
|
41957
41960
|
var directoryPathMap = new ts.Map();
|
|
@@ -42098,10 +42101,10 @@ var ts;
|
|
|
42098
42101
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42099
42102
|
break;
|
|
42100
42103
|
default:
|
|
42101
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
42104
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
42102
42105
|
}
|
|
42103
42106
|
if (result && result.resolvedModule)
|
|
42104
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
42107
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
42105
42108
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
42106
42109
|
if (perFolderCache) {
|
|
42107
42110
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -42304,7 +42307,7 @@ var ts;
|
|
|
42304
42307
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
42305
42308
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
42306
42309
|
if (!resolvedModule) {
|
|
42307
|
-
throw new Error("Could not resolve JS module '"
|
|
42310
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
42308
42311
|
}
|
|
42309
42312
|
return resolvedModule.resolvedFileName;
|
|
42310
42313
|
}
|
|
@@ -42328,13 +42331,15 @@ var ts;
|
|
|
42328
42331
|
// not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
|
|
42329
42332
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
42330
42333
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
42334
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
|
|
42335
|
+
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
42331
42336
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
42332
42337
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
42333
42338
|
function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42334
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42339
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42335
42340
|
}
|
|
42336
42341
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42337
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42342
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42338
42343
|
}
|
|
42339
42344
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42340
42345
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
@@ -42417,7 +42422,7 @@ var ts;
|
|
|
42417
42422
|
if (traceEnabled) {
|
|
42418
42423
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
42419
42424
|
}
|
|
42420
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
42425
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
42421
42426
|
return real;
|
|
42422
42427
|
}
|
|
42423
42428
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -42803,7 +42808,7 @@ var ts;
|
|
|
42803
42808
|
return undefined;
|
|
42804
42809
|
}
|
|
42805
42810
|
var trailingParts = parts.slice(nameParts.length);
|
|
42806
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
42811
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
42807
42812
|
}
|
|
42808
42813
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
42809
42814
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -43131,7 +43136,7 @@ var ts;
|
|
|
43131
43136
|
}
|
|
43132
43137
|
/* @internal */
|
|
43133
43138
|
function getTypesPackageName(packageName) {
|
|
43134
|
-
return "@types/"
|
|
43139
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
43135
43140
|
}
|
|
43136
43141
|
ts.getTypesPackageName = getTypesPackageName;
|
|
43137
43142
|
/* @internal */
|
|
@@ -43532,7 +43537,7 @@ var ts;
|
|
|
43532
43537
|
if (name) {
|
|
43533
43538
|
if (ts.isAmbientModule(node)) {
|
|
43534
43539
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
43535
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
43540
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
43536
43541
|
}
|
|
43537
43542
|
if (name.kind === 161 /* ComputedPropertyName */) {
|
|
43538
43543
|
var nameExpression = name.expression;
|
|
@@ -43589,7 +43594,7 @@ var ts;
|
|
|
43589
43594
|
case 163 /* Parameter */:
|
|
43590
43595
|
// Parameters with names are handled at the top of this function. Parameters
|
|
43591
43596
|
// without names can only come from JSDocFunctionTypes.
|
|
43592
|
-
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: "
|
|
43597
|
+
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: ".concat(ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind, ", expected JSDocFunctionType"); });
|
|
43593
43598
|
var functionType = node.parent;
|
|
43594
43599
|
var index = functionType.parameters.indexOf(node);
|
|
43595
43600
|
return "arg" + index;
|
|
@@ -43701,7 +43706,7 @@ var ts;
|
|
|
43701
43706
|
var relatedInformation_1 = [];
|
|
43702
43707
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
|
|
43703
43708
|
// export type T; - may have meant export type { T }?
|
|
43704
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
43709
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
43705
43710
|
}
|
|
43706
43711
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
43707
43712
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -45774,7 +45779,7 @@ var ts;
|
|
|
45774
45779
|
}
|
|
45775
45780
|
}
|
|
45776
45781
|
function bindSourceFileAsExternalModule() {
|
|
45777
|
-
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\""
|
|
45782
|
+
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
45778
45783
|
}
|
|
45779
45784
|
function bindExportAssignment(node) {
|
|
45780
45785
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -47863,7 +47868,7 @@ var ts;
|
|
|
47863
47868
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
47864
47869
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
47865
47870
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
47866
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
47871
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
47867
47872
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
47868
47873
|
});
|
|
47869
47874
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -48297,11 +48302,12 @@ var ts;
|
|
|
48297
48302
|
*
|
|
48298
48303
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48299
48304
|
*/
|
|
48300
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48305
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
48301
48306
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48302
|
-
|
|
48307
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
48308
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
48303
48309
|
}
|
|
48304
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48310
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
48305
48311
|
var _a, _b, _c;
|
|
48306
48312
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48307
48313
|
var result;
|
|
@@ -48618,7 +48624,7 @@ var ts;
|
|
|
48618
48624
|
}
|
|
48619
48625
|
}
|
|
48620
48626
|
if (!result) {
|
|
48621
|
-
if (nameNotFoundMessage) {
|
|
48627
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48622
48628
|
if (!errorLocation ||
|
|
48623
48629
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
|
|
48624
48630
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -48628,7 +48634,7 @@ var ts;
|
|
|
48628
48634
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48629
48635
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48630
48636
|
var suggestion = void 0;
|
|
48631
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
48637
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
48632
48638
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48633
48639
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48634
48640
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48664,7 +48670,7 @@ var ts;
|
|
|
48664
48670
|
return undefined;
|
|
48665
48671
|
}
|
|
48666
48672
|
// Perform extra checks only if error reporting was requested
|
|
48667
|
-
if (nameNotFoundMessage) {
|
|
48673
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48668
48674
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
|
|
48669
48675
|
// We have a match, but the reference occurred within a property initializer and the identifier also binds
|
|
48670
48676
|
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
|
|
@@ -50502,7 +50508,7 @@ var ts;
|
|
|
50502
50508
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
50503
50509
|
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
|
50504
50510
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
50505
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
50511
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
50506
50512
|
if (cache.has(key)) {
|
|
50507
50513
|
return cache.get(key);
|
|
50508
50514
|
}
|
|
@@ -51350,7 +51356,7 @@ var ts;
|
|
|
51350
51356
|
context.symbolDepth = new ts.Map();
|
|
51351
51357
|
}
|
|
51352
51358
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
51353
|
-
var key = getTypeId(type)
|
|
51359
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
51354
51360
|
if (links) {
|
|
51355
51361
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
51356
51362
|
}
|
|
@@ -51619,7 +51625,7 @@ var ts;
|
|
|
51619
51625
|
}
|
|
51620
51626
|
}
|
|
51621
51627
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
51622
|
-
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... "
|
|
51628
|
+
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
|
|
51623
51629
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
51624
51630
|
break;
|
|
51625
51631
|
}
|
|
@@ -51734,7 +51740,7 @@ var ts;
|
|
|
51734
51740
|
else if (types.length > 2) {
|
|
51735
51741
|
return [
|
|
51736
51742
|
typeToTypeNodeHelper(types[0], context),
|
|
51737
|
-
ts.factory.createTypeReferenceNode("... "
|
|
51743
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
|
|
51738
51744
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
51739
51745
|
];
|
|
51740
51746
|
}
|
|
@@ -51748,7 +51754,7 @@ var ts;
|
|
|
51748
51754
|
var type = types_2[_i];
|
|
51749
51755
|
i++;
|
|
51750
51756
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
51751
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
51757
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
|
|
51752
51758
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
51753
51759
|
if (typeNode_1) {
|
|
51754
51760
|
result_5.push(typeNode_1);
|
|
@@ -52256,7 +52262,7 @@ var ts;
|
|
|
52256
52262
|
var text = rawtext;
|
|
52257
52263
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
52258
52264
|
i++;
|
|
52259
|
-
text = rawtext
|
|
52265
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
52260
52266
|
}
|
|
52261
52267
|
if (text !== rawtext) {
|
|
52262
52268
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -52582,7 +52588,7 @@ var ts;
|
|
|
52582
52588
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
52583
52589
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
52584
52590
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
52585
|
-
: "arg"
|
|
52591
|
+
: "arg".concat(index);
|
|
52586
52592
|
}
|
|
52587
52593
|
function rewriteModuleSpecifier(parent, lit) {
|
|
52588
52594
|
if (bundled) {
|
|
@@ -53667,7 +53673,7 @@ var ts;
|
|
|
53667
53673
|
return results_1;
|
|
53668
53674
|
}
|
|
53669
53675
|
// The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
|
|
53670
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
53676
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
53671
53677
|
};
|
|
53672
53678
|
}
|
|
53673
53679
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -53742,7 +53748,7 @@ var ts;
|
|
|
53742
53748
|
if (ref) {
|
|
53743
53749
|
return ref;
|
|
53744
53750
|
}
|
|
53745
|
-
var tempName = getUnusedName(rootName
|
|
53751
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
53746
53752
|
var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
53747
53753
|
ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
|
|
53748
53754
|
], 2 /* Const */));
|
|
@@ -53789,7 +53795,7 @@ var ts;
|
|
|
53789
53795
|
var original = input;
|
|
53790
53796
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
53791
53797
|
i++;
|
|
53792
|
-
input = original
|
|
53798
|
+
input = "".concat(original, "_").concat(i);
|
|
53793
53799
|
}
|
|
53794
53800
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
53795
53801
|
if (id) {
|
|
@@ -53897,15 +53903,15 @@ var ts;
|
|
|
53897
53903
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
53898
53904
|
var name = "" + nameType.value;
|
|
53899
53905
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
|
|
53900
|
-
return "\""
|
|
53906
|
+
return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
|
|
53901
53907
|
}
|
|
53902
53908
|
if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
53903
|
-
return "["
|
|
53909
|
+
return "[".concat(name, "]");
|
|
53904
53910
|
}
|
|
53905
53911
|
return name;
|
|
53906
53912
|
}
|
|
53907
53913
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
53908
|
-
return "["
|
|
53914
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
53909
53915
|
}
|
|
53910
53916
|
}
|
|
53911
53917
|
}
|
|
@@ -56679,7 +56685,7 @@ var ts;
|
|
|
56679
56685
|
!leftName ? rightName :
|
|
56680
56686
|
!rightName ? leftName :
|
|
56681
56687
|
undefined;
|
|
56682
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
56688
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
56683
56689
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
56684
56690
|
params[i] = paramSymbol;
|
|
56685
56691
|
}
|
|
@@ -58598,7 +58604,7 @@ var ts;
|
|
|
58598
58604
|
return result;
|
|
58599
58605
|
}
|
|
58600
58606
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
58601
|
-
return aliasSymbol ? "@"
|
|
58607
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
58602
58608
|
}
|
|
58603
58609
|
// This function is used to propagate certain flags when creating new object type references and union types.
|
|
58604
58610
|
// It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
|
|
@@ -58784,7 +58790,7 @@ var ts;
|
|
|
58784
58790
|
return undefined;
|
|
58785
58791
|
}
|
|
58786
58792
|
function getSymbolPath(symbol) {
|
|
58787
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
58793
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
58788
58794
|
}
|
|
58789
58795
|
function getUnresolvedSymbolForEntityName(name) {
|
|
58790
58796
|
var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
|
|
@@ -58795,7 +58801,7 @@ var ts;
|
|
|
58795
58801
|
var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
|
|
58796
58802
|
name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
58797
58803
|
undefined;
|
|
58798
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
58804
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
58799
58805
|
var result = unresolvedSymbols.get(path);
|
|
58800
58806
|
if (!result) {
|
|
58801
58807
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
@@ -58868,7 +58874,7 @@ var ts;
|
|
|
58868
58874
|
if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
|
|
58869
58875
|
return baseType;
|
|
58870
58876
|
}
|
|
58871
|
-
var id = getTypeId(baseType)
|
|
58877
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
58872
58878
|
var cached = substitutionTypes.get(id);
|
|
58873
58879
|
if (cached) {
|
|
58874
58880
|
return cached;
|
|
@@ -59069,7 +59075,7 @@ var ts;
|
|
|
59069
59075
|
}
|
|
59070
59076
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
59071
59077
|
// Don't track references for global symbols anyway, so value if `isReference` is arbitrary
|
|
59072
|
-
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
|
|
59078
|
+
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
|
|
59073
59079
|
}
|
|
59074
59080
|
function getGlobalType(name, arity, reportErrors) {
|
|
59075
59081
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -59529,6 +59535,8 @@ var ts;
|
|
|
59529
59535
|
// We ignore 'never' types in unions
|
|
59530
59536
|
if (!(flags & 131072 /* Never */)) {
|
|
59531
59537
|
includes |= flags & 205258751 /* IncludesMask */;
|
|
59538
|
+
if (flags & 465829888 /* Instantiable */)
|
|
59539
|
+
includes |= 33554432 /* IncludesInstantiable */;
|
|
59532
59540
|
if (type === wildcardType)
|
|
59533
59541
|
includes |= 8388608 /* IncludesWildcard */;
|
|
59534
59542
|
if (!strictNullChecks && flags & 98304 /* Nullable */) {
|
|
@@ -59742,7 +59750,7 @@ var ts;
|
|
|
59742
59750
|
origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
|
|
59743
59751
|
}
|
|
59744
59752
|
}
|
|
59745
|
-
var objectFlags = (includes &
|
|
59753
|
+
var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
|
|
59746
59754
|
(includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
|
|
59747
59755
|
return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
|
|
59748
59756
|
}
|
|
@@ -59790,9 +59798,9 @@ var ts;
|
|
|
59790
59798
|
return types[0];
|
|
59791
59799
|
}
|
|
59792
59800
|
var typeKey = !origin ? getTypeListId(types) :
|
|
59793
|
-
origin.flags & 1048576 /* Union */ ? "|"
|
|
59794
|
-
origin.flags & 2097152 /* Intersection */ ? "&"
|
|
59795
|
-
"#"
|
|
59801
|
+
origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
|
|
59802
|
+
origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
|
|
59803
|
+
"#".concat(origin.type.id, "|").concat(getTypeListId(types)); // origin type id alone is insufficient, as `keyof x` may resolve to multiple WIP values while `x` is still resolving
|
|
59796
59804
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
59797
59805
|
var type = unionTypes.get(id);
|
|
59798
59806
|
if (!type) {
|
|
@@ -60314,7 +60322,7 @@ var ts;
|
|
|
60314
60322
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
|
|
60315
60323
|
return stringType;
|
|
60316
60324
|
}
|
|
60317
|
-
var id = getTypeListId(newTypes)
|
|
60325
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
60318
60326
|
var type = templateLiteralTypes.get(id);
|
|
60319
60327
|
if (!type) {
|
|
60320
60328
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -60374,7 +60382,7 @@ var ts;
|
|
|
60374
60382
|
return str;
|
|
60375
60383
|
}
|
|
60376
60384
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
60377
|
-
var id = getSymbolId(symbol)
|
|
60385
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
60378
60386
|
var result = stringMappingTypes.get(id);
|
|
60379
60387
|
if (!result) {
|
|
60380
60388
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -61394,7 +61402,7 @@ var ts;
|
|
|
61394
61402
|
function createUniqueESSymbolType(symbol) {
|
|
61395
61403
|
var type = createType(8192 /* UniqueESSymbol */);
|
|
61396
61404
|
type.symbol = symbol;
|
|
61397
|
-
type.escapedName = "__@"
|
|
61405
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
61398
61406
|
return type;
|
|
61399
61407
|
}
|
|
61400
61408
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -62937,7 +62945,7 @@ var ts;
|
|
|
62937
62945
|
return true;
|
|
62938
62946
|
}
|
|
62939
62947
|
if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) {
|
|
62940
|
-
var related = relation.get(getRelationKey(source, target, 0 /* None */, relation));
|
|
62948
|
+
var related = relation.get(getRelationKey(source, target, 0 /* None */, relation, /*ignoreConstraints*/ false));
|
|
62941
62949
|
if (related !== undefined) {
|
|
62942
62950
|
return !!(related & 1 /* Succeeded */);
|
|
62943
62951
|
}
|
|
@@ -63083,24 +63091,24 @@ var ts;
|
|
|
63083
63091
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
63084
63092
|
// Parenthesize a `new` if there is one
|
|
63085
63093
|
if (path.indexOf("new ") === 0) {
|
|
63086
|
-
path = "("
|
|
63094
|
+
path = "(".concat(path, ")");
|
|
63087
63095
|
}
|
|
63088
63096
|
var str = "" + args[0];
|
|
63089
63097
|
// If leading, just print back the arg (irrespective of if it's a valid identifier)
|
|
63090
63098
|
if (path.length === 0) {
|
|
63091
|
-
path = ""
|
|
63099
|
+
path = "".concat(str);
|
|
63092
63100
|
}
|
|
63093
63101
|
// Otherwise write a dotted name if possible
|
|
63094
63102
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
63095
|
-
path = path
|
|
63103
|
+
path = "".concat(path, ".").concat(str);
|
|
63096
63104
|
}
|
|
63097
63105
|
// Failing that, check if the name is already a computed name
|
|
63098
63106
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
63099
|
-
path = ""
|
|
63107
|
+
path = "".concat(path).concat(str);
|
|
63100
63108
|
}
|
|
63101
63109
|
// And finally write out a computed name as a last resort
|
|
63102
63110
|
else {
|
|
63103
|
-
path = path
|
|
63111
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
63104
63112
|
}
|
|
63105
63113
|
break;
|
|
63106
63114
|
}
|
|
@@ -63129,7 +63137,7 @@ var ts;
|
|
|
63129
63137
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
63130
63138
|
? ""
|
|
63131
63139
|
: "...";
|
|
63132
|
-
path = ""
|
|
63140
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
63133
63141
|
}
|
|
63134
63142
|
break;
|
|
63135
63143
|
}
|
|
@@ -63142,7 +63150,7 @@ var ts;
|
|
|
63142
63150
|
break;
|
|
63143
63151
|
}
|
|
63144
63152
|
default:
|
|
63145
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
63153
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
63146
63154
|
}
|
|
63147
63155
|
}
|
|
63148
63156
|
if (path) {
|
|
@@ -63786,7 +63794,8 @@ var ts;
|
|
|
63786
63794
|
if (overflow) {
|
|
63787
63795
|
return 0 /* False */;
|
|
63788
63796
|
}
|
|
63789
|
-
var
|
|
63797
|
+
var keyIntersectionState = intersectionState | (inPropertyCheck ? 16 /* InPropertyCheck */ : 0);
|
|
63798
|
+
var id = getRelationKey(source, target, keyIntersectionState, relation, /*ingnoreConstraints*/ false);
|
|
63790
63799
|
var entry = relation.get(id);
|
|
63791
63800
|
if (entry !== undefined) {
|
|
63792
63801
|
if (reportErrors && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) {
|
|
@@ -63813,16 +63822,13 @@ var ts;
|
|
|
63813
63822
|
targetStack = [];
|
|
63814
63823
|
}
|
|
63815
63824
|
else {
|
|
63816
|
-
//
|
|
63817
|
-
//
|
|
63818
|
-
//
|
|
63819
|
-
var broadestEquivalentId = id.
|
|
63820
|
-
var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
|
|
63821
|
-
return "=" + index;
|
|
63822
|
-
}); }).join(",");
|
|
63825
|
+
// A key that starts with "*" is an indication that we have type references that reference constrained
|
|
63826
|
+
// type parameters. For such keys we also check against the key we would have gotten if all type parameters
|
|
63827
|
+
// were unconstrained.
|
|
63828
|
+
var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, /*ignoreConstraints*/ true) : undefined;
|
|
63823
63829
|
for (var i = 0; i < maybeCount; i++) {
|
|
63824
63830
|
// If source and target are already being compared, consider them related with assumptions
|
|
63825
|
-
if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
|
|
63831
|
+
if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
|
|
63826
63832
|
return 3 /* Maybe */;
|
|
63827
63833
|
}
|
|
63828
63834
|
}
|
|
@@ -64117,7 +64123,7 @@ var ts;
|
|
|
64117
64123
|
originalErrorInfo = undefined;
|
|
64118
64124
|
}
|
|
64119
64125
|
}
|
|
64120
|
-
else if (isGenericMappedType(target)) {
|
|
64126
|
+
else if (isGenericMappedType(target) && relation !== identityRelation) {
|
|
64121
64127
|
// Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
|
|
64122
64128
|
var keysRemapped = !!target.declaration.nameType;
|
|
64123
64129
|
var templateType = getTemplateTypeFromMappedType(target);
|
|
@@ -65329,48 +65335,56 @@ var ts;
|
|
|
65329
65335
|
function isTypeReferenceWithGenericArguments(type) {
|
|
65330
65336
|
return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t); });
|
|
65331
65337
|
}
|
|
65332
|
-
|
|
65333
|
-
|
|
65334
|
-
|
|
65335
|
-
|
|
65336
|
-
|
|
65337
|
-
|
|
65338
|
-
|
|
65339
|
-
|
|
65340
|
-
|
|
65341
|
-
if (
|
|
65342
|
-
|
|
65343
|
-
|
|
65344
|
-
|
|
65345
|
-
|
|
65338
|
+
function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {
|
|
65339
|
+
var typeParameters = [];
|
|
65340
|
+
var constraintMarker = "";
|
|
65341
|
+
var sourceId = getTypeReferenceId(source, 0);
|
|
65342
|
+
var targetId = getTypeReferenceId(target, 0);
|
|
65343
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
65344
|
+
// getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
|
|
65345
|
+
// where A.id=111 and number.id=12
|
|
65346
|
+
function getTypeReferenceId(type, depth) {
|
|
65347
|
+
if (depth === void 0) { depth = 0; }
|
|
65348
|
+
var result = "" + type.target.id;
|
|
65349
|
+
for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
|
|
65350
|
+
var t = _a[_i];
|
|
65351
|
+
if (t.flags & 262144 /* TypeParameter */) {
|
|
65352
|
+
if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {
|
|
65353
|
+
var index = typeParameters.indexOf(t);
|
|
65354
|
+
if (index < 0) {
|
|
65355
|
+
index = typeParameters.length;
|
|
65356
|
+
typeParameters.push(t);
|
|
65357
|
+
}
|
|
65358
|
+
result += "=" + index;
|
|
65359
|
+
continue;
|
|
65360
|
+
}
|
|
65361
|
+
// We mark type references that reference constrained type parameters such that we know to obtain
|
|
65362
|
+
// and look for a "broadest equivalent key" in the cache.
|
|
65363
|
+
constraintMarker = "*";
|
|
65364
|
+
}
|
|
65365
|
+
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
65366
|
+
result += "<" + getTypeReferenceId(t, depth + 1) + ">";
|
|
65367
|
+
continue;
|
|
65346
65368
|
}
|
|
65347
|
-
result += "=" + index;
|
|
65348
|
-
}
|
|
65349
|
-
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
65350
|
-
result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
|
|
65351
|
-
}
|
|
65352
|
-
else {
|
|
65353
65369
|
result += "-" + t.id;
|
|
65354
65370
|
}
|
|
65371
|
+
return result;
|
|
65355
65372
|
}
|
|
65356
|
-
return result;
|
|
65357
65373
|
}
|
|
65358
65374
|
/**
|
|
65359
65375
|
* To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters.
|
|
65360
65376
|
* For other cases, the types ids are used.
|
|
65361
65377
|
*/
|
|
65362
|
-
function getRelationKey(source, target, intersectionState, relation) {
|
|
65378
|
+
function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
|
|
65363
65379
|
if (relation === identityRelation && source.id > target.id) {
|
|
65364
65380
|
var temp = source;
|
|
65365
65381
|
source = target;
|
|
65366
65382
|
target = temp;
|
|
65367
65383
|
}
|
|
65368
65384
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
65369
|
-
|
|
65370
|
-
|
|
65371
|
-
|
|
65372
|
-
}
|
|
65373
|
-
return source.id + "," + target.id + postFix;
|
|
65385
|
+
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
65386
|
+
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
65387
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
65374
65388
|
}
|
|
65375
65389
|
// Invoke the callback for each underlying property symbol of the given symbol and return the first
|
|
65376
65390
|
// value that isn't undefined.
|
|
@@ -65418,28 +65432,35 @@ var ts;
|
|
|
65418
65432
|
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
|
|
65419
65433
|
}
|
|
65420
65434
|
// Return true if the given type is deeply nested. We consider this to be the case when structural type comparisons
|
|
65421
|
-
// for
|
|
65435
|
+
// for maxDepth or more occurrences or instantiations of the type have been recorded on the given stack. It is possible,
|
|
65422
65436
|
// though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely
|
|
65423
|
-
// expanding. Effectively, we will generate a false positive when two types are structurally equal to at least
|
|
65437
|
+
// expanding. Effectively, we will generate a false positive when two types are structurally equal to at least maxDepth
|
|
65424
65438
|
// levels, but unequal at some level beyond that.
|
|
65425
|
-
// In addition, this will also detect when an indexed access has been chained off of
|
|
65426
|
-
// the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
|
|
65427
|
-
// for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
|
|
65428
|
-
// It also detects when a recursive type reference has expanded
|
|
65439
|
+
// In addition, this will also detect when an indexed access has been chained off of maxDepth more times (which is
|
|
65440
|
+
// essentially the dual of the structural comparison), and likewise mark the type as deeply nested, potentially adding
|
|
65441
|
+
// false positives for finite but deeply expanding indexed accesses (eg, for `Q[P1][P2][P3][P4][P5]`).
|
|
65442
|
+
// It also detects when a recursive type reference has expanded maxDepth or more times, e.g. if the true branch of
|
|
65429
65443
|
// `type A<T> = null extends T ? [A<NonNullable<T>>] : [T]`
|
|
65430
|
-
// has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]
|
|
65431
|
-
//
|
|
65444
|
+
// has expanded into `[A<NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<T>>>>>>]`. In such cases we need
|
|
65445
|
+
// to terminate the expansion, and we do so here.
|
|
65432
65446
|
function isDeeplyNestedType(type, stack, depth, maxDepth) {
|
|
65433
|
-
if (maxDepth === void 0) { maxDepth =
|
|
65447
|
+
if (maxDepth === void 0) { maxDepth = 3; }
|
|
65434
65448
|
if (depth >= maxDepth) {
|
|
65435
65449
|
var identity_1 = getRecursionIdentity(type);
|
|
65436
65450
|
var count = 0;
|
|
65451
|
+
var lastTypeId = 0;
|
|
65437
65452
|
for (var i = 0; i < depth; i++) {
|
|
65438
|
-
|
|
65439
|
-
|
|
65440
|
-
|
|
65441
|
-
|
|
65453
|
+
var t = stack[i];
|
|
65454
|
+
if (getRecursionIdentity(t) === identity_1) {
|
|
65455
|
+
// We only count occurrences with a higher type id than the previous occurrence, since higher
|
|
65456
|
+
// type ids are an indicator of newer instantiations caused by recursion.
|
|
65457
|
+
if (t.id >= lastTypeId) {
|
|
65458
|
+
count++;
|
|
65459
|
+
if (count >= maxDepth) {
|
|
65460
|
+
return true;
|
|
65461
|
+
}
|
|
65442
65462
|
}
|
|
65463
|
+
lastTypeId = t.id;
|
|
65443
65464
|
}
|
|
65444
65465
|
}
|
|
65445
65466
|
}
|
|
@@ -66178,7 +66199,8 @@ var ts;
|
|
|
66178
66199
|
(resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) ||
|
|
66179
66200
|
param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
|
|
66180
66201
|
var newName = "arg" + param.parent.parameters.indexOf(param);
|
|
66181
|
-
|
|
66202
|
+
var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
66203
|
+
errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
66182
66204
|
return;
|
|
66183
66205
|
}
|
|
66184
66206
|
diagnostic = declaration.dotDotDotToken ?
|
|
@@ -67481,11 +67503,11 @@ var ts;
|
|
|
67481
67503
|
case 79 /* Identifier */:
|
|
67482
67504
|
if (!ts.isThisInTypeQuery(node)) {
|
|
67483
67505
|
var symbol = getResolvedSymbol(node);
|
|
67484
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
67506
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
67485
67507
|
}
|
|
67486
67508
|
// falls through
|
|
67487
67509
|
case 108 /* ThisKeyword */:
|
|
67488
|
-
return "0|"
|
|
67510
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
67489
67511
|
case 229 /* NonNullExpression */:
|
|
67490
67512
|
case 211 /* ParenthesizedExpression */:
|
|
67491
67513
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -71247,7 +71269,7 @@ var ts;
|
|
|
71247
71269
|
!leftName ? rightName :
|
|
71248
71270
|
!rightName ? leftName :
|
|
71249
71271
|
undefined;
|
|
71250
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
71272
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
71251
71273
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71252
71274
|
params[i] = paramSymbol;
|
|
71253
71275
|
}
|
|
@@ -73028,7 +73050,7 @@ var ts;
|
|
|
73028
73050
|
}
|
|
73029
73051
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
73030
73052
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
73031
|
-
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
|
|
73053
|
+
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
|
|
73032
73054
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
73033
73055
|
var symbol = getSymbol(symbols, name, meaning);
|
|
73034
73056
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
@@ -78551,7 +78573,9 @@ var ts;
|
|
|
78551
78573
|
var typeReferenceNode = ts.tryCast(node.parent, ts.isTypeReferenceType);
|
|
78552
78574
|
if (!typeReferenceNode)
|
|
78553
78575
|
return undefined;
|
|
78554
|
-
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78576
|
+
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78577
|
+
if (!typeParameters)
|
|
78578
|
+
return undefined;
|
|
78555
78579
|
var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
|
|
78556
78580
|
return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
|
|
78557
78581
|
}
|
|
@@ -81158,7 +81182,7 @@ var ts;
|
|
|
81158
81182
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
81159
81183
|
var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
|
|
81160
81184
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
81161
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
81185
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
81162
81186
|
}
|
|
81163
81187
|
/**
|
|
81164
81188
|
* Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
|
|
@@ -88130,7 +88154,7 @@ var ts;
|
|
|
88130
88154
|
value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
|
|
88131
88155
|
value === 62 ? 43 /* plus */ :
|
|
88132
88156
|
value === 63 ? 47 /* slash */ :
|
|
88133
|
-
ts.Debug.fail(value
|
|
88157
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
88134
88158
|
}
|
|
88135
88159
|
function base64FormatDecode(ch) {
|
|
88136
88160
|
return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
|
|
@@ -88205,7 +88229,7 @@ var ts;
|
|
|
88205
88229
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
88206
88230
|
if (decoder.error !== undefined) {
|
|
88207
88231
|
if (host.log) {
|
|
88208
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
88232
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
88209
88233
|
}
|
|
88210
88234
|
decodedMappings = ts.emptyArray;
|
|
88211
88235
|
}
|
|
@@ -91871,7 +91895,7 @@ var ts;
|
|
|
91871
91895
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
91872
91896
|
? ts.declarationNameToString(originalNode.name)
|
|
91873
91897
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
91874
|
-
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " "
|
|
91898
|
+
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
|
|
91875
91899
|
}
|
|
91876
91900
|
return substitute;
|
|
91877
91901
|
}
|
|
@@ -93263,8 +93287,8 @@ var ts;
|
|
|
93263
93287
|
}
|
|
93264
93288
|
function createHoistedVariableForClass(name, node) {
|
|
93265
93289
|
var className = getPrivateIdentifierEnvironment().className;
|
|
93266
|
-
var prefix = className ? "_"
|
|
93267
|
-
var identifier = factory.createUniqueName(prefix
|
|
93290
|
+
var prefix = className ? "_".concat(className) : "";
|
|
93291
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
|
|
93268
93292
|
if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
|
|
93269
93293
|
addBlockScopedVariable(identifier);
|
|
93270
93294
|
}
|
|
@@ -95162,7 +95186,7 @@ var ts;
|
|
|
95162
95186
|
specifierSourceImports = ts.createMap();
|
|
95163
95187
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
95164
95188
|
}
|
|
95165
|
-
var generatedName = factory.createUniqueName("_"
|
|
95189
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
|
|
95166
95190
|
var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
|
|
95167
95191
|
generatedName.generatedImportReference = specifier;
|
|
95168
95192
|
specifierSourceImports.set(name, specifier);
|
|
@@ -96301,11 +96325,11 @@ var ts;
|
|
|
96301
96325
|
}
|
|
96302
96326
|
else {
|
|
96303
96327
|
if (node.kind === 245 /* BreakStatement */) {
|
|
96304
|
-
labelMarker = "break-"
|
|
96328
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
96305
96329
|
setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
|
|
96306
96330
|
}
|
|
96307
96331
|
else {
|
|
96308
|
-
labelMarker = "continue-"
|
|
96332
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
96309
96333
|
setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
|
|
96310
96334
|
}
|
|
96311
96335
|
}
|
|
@@ -105114,7 +105138,7 @@ var ts;
|
|
|
105114
105138
|
return getTypeAliasDeclarationVisibilityError;
|
|
105115
105139
|
}
|
|
105116
105140
|
else {
|
|
105117
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
105141
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
105118
105142
|
}
|
|
105119
105143
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
105120
105144
|
if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
|
|
@@ -105325,7 +105349,7 @@ var ts;
|
|
|
105325
105349
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
105326
105350
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
105327
105351
|
default:
|
|
105328
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
105352
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
105329
105353
|
}
|
|
105330
105354
|
}
|
|
105331
105355
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -106083,7 +106107,7 @@ var ts;
|
|
|
106083
106107
|
while (ts.length(lateMarkedStatements)) {
|
|
106084
106108
|
var i = lateMarkedStatements.shift();
|
|
106085
106109
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
106086
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
106110
|
+
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: ".concat(ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
|
|
106087
106111
|
}
|
|
106088
106112
|
var priorNeedsDeclare = needsDeclare;
|
|
106089
106113
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -106272,7 +106296,7 @@ var ts;
|
|
|
106272
106296
|
return cleanup(input);
|
|
106273
106297
|
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
106274
106298
|
}
|
|
106275
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
106299
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
106276
106300
|
}
|
|
106277
106301
|
}
|
|
106278
106302
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -106563,7 +106587,7 @@ var ts;
|
|
|
106563
106587
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
|
|
106564
106588
|
// We must add a temporary declaration for the extends clause expression
|
|
106565
106589
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
106566
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
106590
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
|
|
106567
106591
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
106568
106592
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
106569
106593
|
errorNode: extendsClause_1,
|
|
@@ -106604,7 +106628,7 @@ var ts;
|
|
|
106604
106628
|
}
|
|
106605
106629
|
}
|
|
106606
106630
|
// Anything left unhandled is an error, so this should be unreachable
|
|
106607
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
106631
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
106608
106632
|
function cleanup(node) {
|
|
106609
106633
|
if (isEnclosingDeclaration(input)) {
|
|
106610
106634
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -107496,13 +107520,13 @@ var ts;
|
|
|
107496
107520
|
if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
|
|
107497
107521
|
return;
|
|
107498
107522
|
if (js && configFile.options.sourceMap) {
|
|
107499
|
-
addOutput(js
|
|
107523
|
+
addOutput("".concat(js, ".map"));
|
|
107500
107524
|
}
|
|
107501
107525
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
107502
107526
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
107503
107527
|
addOutput(dts);
|
|
107504
107528
|
if (configFile.options.declarationMap) {
|
|
107505
|
-
addOutput(dts
|
|
107529
|
+
addOutput("".concat(dts, ".map"));
|
|
107506
107530
|
}
|
|
107507
107531
|
}
|
|
107508
107532
|
}
|
|
@@ -107571,7 +107595,7 @@ var ts;
|
|
|
107571
107595
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
107572
107596
|
if (ts.outFile(configFile.options)) {
|
|
107573
107597
|
var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
|
|
107574
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
107598
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107575
107599
|
}
|
|
107576
107600
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
107577
107601
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -107590,7 +107614,7 @@ var ts;
|
|
|
107590
107614
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
107591
107615
|
if (buildInfoPath)
|
|
107592
107616
|
return buildInfoPath;
|
|
107593
|
-
return ts.Debug.fail("project "
|
|
107617
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107594
107618
|
}
|
|
107595
107619
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
107596
107620
|
/*@internal*/
|
|
@@ -107816,7 +107840,7 @@ var ts;
|
|
|
107816
107840
|
if (sourceMappingURL) {
|
|
107817
107841
|
if (!writer.isAtStartOfLine())
|
|
107818
107842
|
writer.rawWrite(newLine);
|
|
107819
|
-
writer.writeComment("//# "
|
|
107843
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
|
|
107820
107844
|
}
|
|
107821
107845
|
// Write the source map
|
|
107822
107846
|
if (sourceMapFilePath) {
|
|
@@ -107865,7 +107889,7 @@ var ts;
|
|
|
107865
107889
|
// Encode the sourceMap into the sourceMap url
|
|
107866
107890
|
var sourceMapText = sourceMapGenerator.toString();
|
|
107867
107891
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
107868
|
-
return "data:application/json;base64,"
|
|
107892
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
107869
107893
|
}
|
|
107870
107894
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
107871
107895
|
if (mapOptions.mapRoot) {
|
|
@@ -108045,7 +108069,7 @@ var ts;
|
|
|
108045
108069
|
return;
|
|
108046
108070
|
break;
|
|
108047
108071
|
default:
|
|
108048
|
-
ts.Debug.fail("Unexpected path: "
|
|
108072
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
108049
108073
|
}
|
|
108050
108074
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
108051
108075
|
},
|
|
@@ -108905,7 +108929,7 @@ var ts;
|
|
|
108905
108929
|
return writeTokenNode(node, writeKeyword);
|
|
108906
108930
|
if (ts.isTokenKind(node.kind))
|
|
108907
108931
|
return writeTokenNode(node, writePunctuation);
|
|
108908
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
108932
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
108909
108933
|
}
|
|
108910
108934
|
function emitMappedTypeParameter(node) {
|
|
108911
108935
|
emit(node.name);
|
|
@@ -109075,13 +109099,13 @@ var ts;
|
|
|
109075
109099
|
}
|
|
109076
109100
|
}
|
|
109077
109101
|
function emitPlaceholder(hint, node, snippet) {
|
|
109078
|
-
nonEscapingWrite("${"
|
|
109102
|
+
nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
|
|
109079
109103
|
pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
|
|
109080
109104
|
nonEscapingWrite("}"); // `}`
|
|
109081
109105
|
// `${2:...}`
|
|
109082
109106
|
}
|
|
109083
109107
|
function emitTabStop(snippet) {
|
|
109084
|
-
nonEscapingWrite("$"
|
|
109108
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
109085
109109
|
}
|
|
109086
109110
|
//
|
|
109087
109111
|
// Identifiers
|
|
@@ -110803,17 +110827,17 @@ var ts;
|
|
|
110803
110827
|
writeLine();
|
|
110804
110828
|
}
|
|
110805
110829
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
110806
|
-
writeComment("/// <amd-module name=\""
|
|
110830
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
110807
110831
|
writeLine();
|
|
110808
110832
|
}
|
|
110809
110833
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
110810
110834
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
110811
110835
|
var dep = _b[_a];
|
|
110812
110836
|
if (dep.name) {
|
|
110813
|
-
writeComment("/// <amd-dependency name=\""
|
|
110837
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
110814
110838
|
}
|
|
110815
110839
|
else {
|
|
110816
|
-
writeComment("/// <amd-dependency path=\""
|
|
110840
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
110817
110841
|
}
|
|
110818
110842
|
writeLine();
|
|
110819
110843
|
}
|
|
@@ -110821,7 +110845,7 @@ var ts;
|
|
|
110821
110845
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
110822
110846
|
var directive = files_2[_c];
|
|
110823
110847
|
var pos = writer.getTextPos();
|
|
110824
|
-
writeComment("/// <reference path=\""
|
|
110848
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
110825
110849
|
if (bundleFileInfo)
|
|
110826
110850
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
|
|
110827
110851
|
writeLine();
|
|
@@ -110829,7 +110853,7 @@ var ts;
|
|
|
110829
110853
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
110830
110854
|
var directive = types_24[_d];
|
|
110831
110855
|
var pos = writer.getTextPos();
|
|
110832
|
-
writeComment("/// <reference types=\""
|
|
110856
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
110833
110857
|
if (bundleFileInfo)
|
|
110834
110858
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
|
|
110835
110859
|
writeLine();
|
|
@@ -110837,7 +110861,7 @@ var ts;
|
|
|
110837
110861
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
110838
110862
|
var directive = libs_1[_e];
|
|
110839
110863
|
var pos = writer.getTextPos();
|
|
110840
|
-
writeComment("/// <reference lib=\""
|
|
110864
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
110841
110865
|
if (bundleFileInfo)
|
|
110842
110866
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
|
|
110843
110867
|
writeLine();
|
|
@@ -111612,9 +111636,9 @@ var ts;
|
|
|
111612
111636
|
var textSourceNode = node.textSourceNode;
|
|
111613
111637
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
111614
111638
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
111615
|
-
return jsxAttributeEscape ? "\""
|
|
111616
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\""
|
|
111617
|
-
"\""
|
|
111639
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
111640
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
111641
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
111618
111642
|
}
|
|
111619
111643
|
else {
|
|
111620
111644
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -112091,8 +112115,8 @@ var ts;
|
|
|
112091
112115
|
}
|
|
112092
112116
|
function formatSynthesizedComment(comment) {
|
|
112093
112117
|
return comment.kind === 3 /* MultiLineCommentTrivia */
|
|
112094
|
-
? "/*"
|
|
112095
|
-
: "//"
|
|
112118
|
+
? "/*".concat(comment.text, "*/")
|
|
112119
|
+
: "//".concat(comment.text);
|
|
112096
112120
|
}
|
|
112097
112121
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
112098
112122
|
enterComment();
|
|
@@ -112600,7 +112624,7 @@ var ts;
|
|
|
112600
112624
|
var rootResult = tryReadDirectory(rootDir, rootDirPath);
|
|
112601
112625
|
var rootSymLinkResult;
|
|
112602
112626
|
if (rootResult !== undefined) {
|
|
112603
|
-
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath
|
|
112627
|
+
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
112604
112628
|
}
|
|
112605
112629
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
112606
112630
|
function getFileSystemEntries(dir) {
|
|
@@ -112813,7 +112837,7 @@ var ts;
|
|
|
112813
112837
|
var watchedDirPath = _a.watchedDirPath, fileOrDirectory = _a.fileOrDirectory, fileOrDirectoryPath = _a.fileOrDirectoryPath, configFileName = _a.configFileName, options = _a.options, program = _a.program, extraFileExtensions = _a.extraFileExtensions, currentDirectory = _a.currentDirectory, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, writeLog = _a.writeLog, toPath = _a.toPath;
|
|
112814
112838
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
112815
112839
|
if (!newPath) {
|
|
112816
|
-
writeLog("Project: "
|
|
112840
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
112817
112841
|
return true;
|
|
112818
112842
|
}
|
|
112819
112843
|
fileOrDirectoryPath = newPath;
|
|
@@ -112822,11 +112846,11 @@ var ts;
|
|
|
112822
112846
|
// If the the added or created file or directory is not supported file name, ignore the file
|
|
112823
112847
|
// But when watched directory is added/removed, we need to reload the file list
|
|
112824
112848
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
112825
|
-
writeLog("Project: "
|
|
112849
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
112826
112850
|
return true;
|
|
112827
112851
|
}
|
|
112828
112852
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
112829
|
-
writeLog("Project: "
|
|
112853
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
112830
112854
|
return true;
|
|
112831
112855
|
}
|
|
112832
112856
|
if (!program)
|
|
@@ -112850,7 +112874,7 @@ var ts;
|
|
|
112850
112874
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
112851
112875
|
if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
|
|
112852
112876
|
hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
|
|
112853
|
-
writeLog("Project: "
|
|
112877
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
112854
112878
|
return true;
|
|
112855
112879
|
}
|
|
112856
112880
|
return false;
|
|
@@ -112918,36 +112942,36 @@ var ts;
|
|
|
112918
112942
|
host.useCaseSensitiveFileNames();
|
|
112919
112943
|
}
|
|
112920
112944
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
112921
|
-
log("ExcludeWatcher:: Added:: "
|
|
112945
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112922
112946
|
return {
|
|
112923
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
112947
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
112924
112948
|
};
|
|
112925
112949
|
}
|
|
112926
112950
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112927
|
-
log("FileWatcher:: Added:: "
|
|
112951
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112928
112952
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112929
112953
|
return {
|
|
112930
112954
|
close: function () {
|
|
112931
|
-
log("FileWatcher:: Close:: "
|
|
112955
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112932
112956
|
watcher.close();
|
|
112933
112957
|
}
|
|
112934
112958
|
};
|
|
112935
112959
|
}
|
|
112936
112960
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112937
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
112961
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112938
112962
|
log(watchInfo);
|
|
112939
112963
|
var start = ts.timestamp();
|
|
112940
112964
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112941
112965
|
var elapsed = ts.timestamp() - start;
|
|
112942
|
-
log("Elapsed:: "
|
|
112966
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112943
112967
|
return {
|
|
112944
112968
|
close: function () {
|
|
112945
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
112969
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112946
112970
|
log(watchInfo);
|
|
112947
112971
|
var start = ts.timestamp();
|
|
112948
112972
|
watcher.close();
|
|
112949
112973
|
var elapsed = ts.timestamp() - start;
|
|
112950
|
-
log("Elapsed:: "
|
|
112974
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112951
112975
|
}
|
|
112952
112976
|
};
|
|
112953
112977
|
}
|
|
@@ -112957,16 +112981,16 @@ var ts;
|
|
|
112957
112981
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112958
112982
|
args[_i] = arguments[_i];
|
|
112959
112983
|
}
|
|
112960
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
112984
|
+
var triggerredInfo = "".concat(key === "watchFile" ? "FileWatcher" : "DirectoryWatcher", ":: Triggered with ").concat(args[0], " ").concat(args[1] !== undefined ? args[1] : "", ":: ").concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112961
112985
|
log(triggerredInfo);
|
|
112962
112986
|
var start = ts.timestamp();
|
|
112963
112987
|
cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
|
|
112964
112988
|
var elapsed = ts.timestamp() - start;
|
|
112965
|
-
log("Elapsed:: "
|
|
112989
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
112966
112990
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
112967
112991
|
}
|
|
112968
112992
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
112969
|
-
return "WatchInfo: "
|
|
112993
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
112970
112994
|
}
|
|
112971
112995
|
}
|
|
112972
112996
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -113273,12 +113297,12 @@ var ts;
|
|
|
113273
113297
|
}
|
|
113274
113298
|
ts.formatDiagnostics = formatDiagnostics;
|
|
113275
113299
|
function formatDiagnostic(diagnostic, host) {
|
|
113276
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
113300
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
113277
113301
|
if (diagnostic.file) {
|
|
113278
113302
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
|
|
113279
113303
|
var fileName = diagnostic.file.fileName;
|
|
113280
113304
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
113281
|
-
return relativeFileName
|
|
113305
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
113282
113306
|
}
|
|
113283
113307
|
return errorMessage;
|
|
113284
113308
|
}
|
|
@@ -113366,9 +113390,9 @@ var ts;
|
|
|
113366
113390
|
var output = "";
|
|
113367
113391
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
113368
113392
|
output += ":";
|
|
113369
|
-
output += color(""
|
|
113393
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113370
113394
|
output += ":";
|
|
113371
|
-
output += color(""
|
|
113395
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113372
113396
|
return output;
|
|
113373
113397
|
}
|
|
113374
113398
|
ts.formatLocation = formatLocation;
|
|
@@ -113382,7 +113406,7 @@ var ts;
|
|
|
113382
113406
|
output += " - ";
|
|
113383
113407
|
}
|
|
113384
113408
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
113385
|
-
output += formatColorAndReset(" TS"
|
|
113409
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
113386
113410
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
113387
113411
|
if (diagnostic.file) {
|
|
113388
113412
|
output += host.getNewLine();
|
|
@@ -113491,7 +113515,7 @@ var ts;
|
|
|
113491
113515
|
var result = void 0;
|
|
113492
113516
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
113493
113517
|
i++;
|
|
113494
|
-
var cacheKey = mode !== undefined ? mode
|
|
113518
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
113495
113519
|
if (cache.has(cacheKey)) {
|
|
113496
113520
|
result = cache.get(cacheKey);
|
|
113497
113521
|
}
|
|
@@ -115575,7 +115599,7 @@ var ts;
|
|
|
115575
115599
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
115576
115600
|
i++;
|
|
115577
115601
|
}
|
|
115578
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
115602
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
115579
115603
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
115580
115604
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
115581
115605
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -116396,12 +116420,12 @@ var ts;
|
|
|
116396
116420
|
}
|
|
116397
116421
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
116398
116422
|
var dirPath = host.toPath(dir);
|
|
116399
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
116423
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
116400
116424
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
116401
116425
|
// Any parent directory of declaration dir
|
|
116402
116426
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
116403
116427
|
// Any directory inside declaration dir
|
|
116404
|
-
ts.startsWith(dirPath, declDirPath
|
|
116428
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
116405
116429
|
}
|
|
116406
116430
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
116407
116431
|
var _a;
|
|
@@ -116454,7 +116478,7 @@ var ts;
|
|
|
116454
116478
|
if (isFile && result) {
|
|
116455
116479
|
// Store the real path for the file'
|
|
116456
116480
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
116457
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
116481
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
116458
116482
|
}
|
|
116459
116483
|
return result;
|
|
116460
116484
|
}) || false;
|
|
@@ -116912,7 +116936,7 @@ var ts;
|
|
|
116912
116936
|
/*forceDtsEmit*/ true);
|
|
116913
116937
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
116914
116938
|
if (firstDts_1) {
|
|
116915
|
-
ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */]), "File extension for signature expected to be dts", function () { return "Found: "
|
|
116939
|
+
ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */]), "File extension for signature expected to be dts", function () { return "Found: ".concat(ts.getAnyExtensionFromPath(firstDts_1.name), " for ").concat(firstDts_1.name, ":: All output files: ").concat(JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; }))); });
|
|
116916
116940
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
116917
116941
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
116918
116942
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -117420,7 +117444,7 @@ var ts;
|
|
|
117420
117444
|
return;
|
|
117421
117445
|
}
|
|
117422
117446
|
else {
|
|
117423
|
-
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: "
|
|
117447
|
+
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: ".concat(affectedFile.fileName));
|
|
117424
117448
|
}
|
|
117425
117449
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
117426
117450
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -118565,7 +118589,7 @@ var ts;
|
|
|
118565
118589
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
118566
118590
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
118567
118591
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
118568
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
118592
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
118569
118593
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
118570
118594
|
// Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
|
|
118571
118595
|
return {
|
|
@@ -119547,13 +119571,15 @@ var ts;
|
|
|
119547
119571
|
if (host.fileExists(packageJsonPath)) {
|
|
119548
119572
|
var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
|
|
119549
119573
|
// TODO: Inject `require` or `import` condition based on the intended import mode
|
|
119550
|
-
|
|
119551
|
-
|
|
119552
|
-
|
|
119553
|
-
|
|
119554
|
-
|
|
119555
|
-
|
|
119556
|
-
|
|
119574
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
119575
|
+
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
|
|
119576
|
+
if (fromExports) {
|
|
119577
|
+
var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
119578
|
+
return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
|
|
119579
|
+
}
|
|
119580
|
+
if (packageJsonContent.exports) {
|
|
119581
|
+
return { moduleFileToTry: path, blockedByExports: true };
|
|
119582
|
+
}
|
|
119557
119583
|
}
|
|
119558
119584
|
var versionPaths = packageJsonContent.typesVersions
|
|
119559
119585
|
? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
|
|
@@ -119677,7 +119703,7 @@ var ts;
|
|
|
119677
119703
|
}
|
|
119678
119704
|
function getJSExtensionForFile(fileName, options) {
|
|
119679
119705
|
var _a;
|
|
119680
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
119706
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
119681
119707
|
}
|
|
119682
119708
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
119683
119709
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -119780,8 +119806,8 @@ var ts;
|
|
|
119780
119806
|
return pretty ?
|
|
119781
119807
|
function (diagnostic, newLine, options) {
|
|
119782
119808
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
119783
|
-
var output = "["
|
|
119784
|
-
output += ""
|
|
119809
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
119810
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
119785
119811
|
system.write(output);
|
|
119786
119812
|
} :
|
|
119787
119813
|
function (diagnostic, newLine, options) {
|
|
@@ -119789,8 +119815,8 @@ var ts;
|
|
|
119789
119815
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
119790
119816
|
output += newLine;
|
|
119791
119817
|
}
|
|
119792
|
-
output += getLocaleTimeString(system)
|
|
119793
|
-
output += ""
|
|
119818
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
119819
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
119794
119820
|
system.write(output);
|
|
119795
119821
|
};
|
|
119796
119822
|
}
|
|
@@ -119818,7 +119844,7 @@ var ts;
|
|
|
119818
119844
|
if (errorCount === 0)
|
|
119819
119845
|
return "";
|
|
119820
119846
|
var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
|
|
119821
|
-
return ""
|
|
119847
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
|
|
119822
119848
|
}
|
|
119823
119849
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
119824
119850
|
function isBuilderProgram(program) {
|
|
@@ -119844,9 +119870,9 @@ var ts;
|
|
|
119844
119870
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
119845
119871
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
119846
119872
|
var file = _c[_i];
|
|
119847
|
-
write(""
|
|
119848
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
119849
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
119873
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
119874
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
119875
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
119850
119876
|
}
|
|
119851
119877
|
}
|
|
119852
119878
|
ts.explainFiles = explainFiles;
|
|
@@ -119886,7 +119912,7 @@ var ts;
|
|
|
119886
119912
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
|
|
119887
119913
|
return false;
|
|
119888
119914
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
119889
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
119915
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
119890
119916
|
});
|
|
119891
119917
|
}
|
|
119892
119918
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -119895,7 +119921,7 @@ var ts;
|
|
|
119895
119921
|
var options = program.getCompilerOptions();
|
|
119896
119922
|
if (ts.isReferencedFile(reason)) {
|
|
119897
119923
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
119898
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
119924
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
119899
119925
|
var message = void 0;
|
|
119900
119926
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
119901
119927
|
switch (reason.kind) {
|
|
@@ -120019,7 +120045,7 @@ var ts;
|
|
|
120019
120045
|
var currentDir_1 = program.getCurrentDirectory();
|
|
120020
120046
|
ts.forEach(emittedFiles, function (file) {
|
|
120021
120047
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
120022
|
-
write("TSFILE: "
|
|
120048
|
+
write("TSFILE: ".concat(filepath));
|
|
120023
120049
|
});
|
|
120024
120050
|
listFiles(program, write);
|
|
120025
120051
|
}
|
|
@@ -120347,7 +120373,7 @@ var ts;
|
|
|
120347
120373
|
}
|
|
120348
120374
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
120349
120375
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
120350
|
-
writeLog("Current directory: "
|
|
120376
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
120351
120377
|
var configFileWatcher;
|
|
120352
120378
|
if (configFileName) {
|
|
120353
120379
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -120496,10 +120522,10 @@ var ts;
|
|
|
120496
120522
|
function createNewProgram(hasInvalidatedResolution) {
|
|
120497
120523
|
// Compile the program
|
|
120498
120524
|
writeLog("CreatingProgramWith::");
|
|
120499
|
-
writeLog(" roots: "
|
|
120500
|
-
writeLog(" options: "
|
|
120525
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
120526
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
120501
120527
|
if (projectReferences)
|
|
120502
|
-
writeLog(" projectReferences: "
|
|
120528
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
120503
120529
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
120504
120530
|
hasChangedCompilerOptions = false;
|
|
120505
120531
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -120660,7 +120686,7 @@ var ts;
|
|
|
120660
120686
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
120661
120687
|
}
|
|
120662
120688
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
120663
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
120689
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
120664
120690
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
120665
120691
|
}
|
|
120666
120692
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -120720,7 +120746,7 @@ var ts;
|
|
|
120720
120746
|
synchronizeProgram();
|
|
120721
120747
|
}
|
|
120722
120748
|
function reloadConfigFile() {
|
|
120723
|
-
writeLog("Reloading config file: "
|
|
120749
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
120724
120750
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
120725
120751
|
if (cachedDirectoryStructureHost) {
|
|
120726
120752
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -120761,7 +120787,7 @@ var ts;
|
|
|
120761
120787
|
return config.parsedCommandLine;
|
|
120762
120788
|
}
|
|
120763
120789
|
}
|
|
120764
|
-
writeLog("Loading config file: "
|
|
120790
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
120765
120791
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
120766
120792
|
host.getParsedCommandLine(configFileName) :
|
|
120767
120793
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -121065,8 +121091,8 @@ var ts;
|
|
|
121065
121091
|
*/
|
|
121066
121092
|
function createBuilderStatusReporter(system, pretty) {
|
|
121067
121093
|
return function (diagnostic) {
|
|
121068
|
-
var output = pretty ? "["
|
|
121069
|
-
output += ""
|
|
121094
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
121095
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
121070
121096
|
system.write(output);
|
|
121071
121097
|
};
|
|
121072
121098
|
}
|
|
@@ -121841,7 +121867,7 @@ var ts;
|
|
|
121841
121867
|
function listEmittedFile(_a, proj, file) {
|
|
121842
121868
|
var write = _a.write;
|
|
121843
121869
|
if (write && proj.options.listEmittedFiles) {
|
|
121844
|
-
write("TSFILE: "
|
|
121870
|
+
write("TSFILE: ".concat(file));
|
|
121845
121871
|
}
|
|
121846
121872
|
}
|
|
121847
121873
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -121870,7 +121896,7 @@ var ts;
|
|
|
121870
121896
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
121871
121897
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
121872
121898
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
121873
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
121899
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
121874
121900
|
if (canEmitBuildInfo)
|
|
121875
121901
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
121876
121902
|
afterProgramDone(state, program, config);
|
|
@@ -121898,7 +121924,7 @@ var ts;
|
|
|
121898
121924
|
if (!host.fileExists(inputFile)) {
|
|
121899
121925
|
return {
|
|
121900
121926
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
121901
|
-
reason: inputFile
|
|
121927
|
+
reason: "".concat(inputFile, " does not exist")
|
|
121902
121928
|
};
|
|
121903
121929
|
}
|
|
121904
121930
|
if (!force) {
|
|
@@ -122257,7 +122283,7 @@ var ts;
|
|
|
122257
122283
|
}
|
|
122258
122284
|
}
|
|
122259
122285
|
if (filesToDelete) {
|
|
122260
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
122286
|
+
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * ".concat(f); }).join(""));
|
|
122261
122287
|
}
|
|
122262
122288
|
return ts.ExitStatus.Success;
|
|
122263
122289
|
}
|
|
@@ -122590,7 +122616,7 @@ var ts;
|
|
|
122590
122616
|
function nowString() {
|
|
122591
122617
|
// E.g. "12:34:56.789"
|
|
122592
122618
|
var d = new Date();
|
|
122593
|
-
return ts.padLeft(d.getHours().toString(), 2, "0")
|
|
122619
|
+
return "".concat(ts.padLeft(d.getHours().toString(), 2, "0"), ":").concat(ts.padLeft(d.getMinutes().toString(), 2, "0"), ":").concat(ts.padLeft(d.getSeconds().toString(), 2, "0"), ".").concat(ts.padLeft(d.getMilliseconds().toString(), 3, "0"));
|
|
122594
122620
|
}
|
|
122595
122621
|
server.nowString = nowString;
|
|
122596
122622
|
})(server = ts.server || (ts.server = {}));
|
|
@@ -122601,7 +122627,7 @@ var ts;
|
|
|
122601
122627
|
var JsTyping;
|
|
122602
122628
|
(function (JsTyping) {
|
|
122603
122629
|
function isTypingUpToDate(cachedTyping, availableTypingVersions) {
|
|
122604
|
-
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts"
|
|
122630
|
+
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
|
|
122605
122631
|
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
|
122606
122632
|
}
|
|
122607
122633
|
JsTyping.isTypingUpToDate = isTypingUpToDate;
|
|
@@ -122654,7 +122680,7 @@ var ts;
|
|
|
122654
122680
|
"worker_threads",
|
|
122655
122681
|
"zlib"
|
|
122656
122682
|
];
|
|
122657
|
-
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:"
|
|
122683
|
+
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
|
|
122658
122684
|
JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
|
|
122659
122685
|
JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
|
|
122660
122686
|
function nonRelativeModuleNameForTypingCache(moduleName) {
|
|
@@ -122733,7 +122759,7 @@ var ts;
|
|
|
122733
122759
|
var excludeTypingName = exclude_1[_i];
|
|
122734
122760
|
var didDelete = inferredTypings.delete(excludeTypingName);
|
|
122735
122761
|
if (didDelete && log)
|
|
122736
|
-
log("Typing for "
|
|
122762
|
+
log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
|
|
122737
122763
|
}
|
|
122738
122764
|
var newTypingNames = [];
|
|
122739
122765
|
var cachedTypingPaths = [];
|
|
@@ -122747,7 +122773,7 @@ var ts;
|
|
|
122747
122773
|
});
|
|
122748
122774
|
var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
|
|
122749
122775
|
if (log)
|
|
122750
|
-
log("Result: "
|
|
122776
|
+
log("Result: ".concat(JSON.stringify(result)));
|
|
122751
122777
|
return result;
|
|
122752
122778
|
function addInferredTyping(typingName) {
|
|
122753
122779
|
if (!inferredTypings.has(typingName)) {
|
|
@@ -122756,7 +122782,7 @@ var ts;
|
|
|
122756
122782
|
}
|
|
122757
122783
|
function addInferredTypings(typingNames, message) {
|
|
122758
122784
|
if (log)
|
|
122759
|
-
log(message
|
|
122785
|
+
log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
|
|
122760
122786
|
ts.forEach(typingNames, addInferredTyping);
|
|
122761
122787
|
}
|
|
122762
122788
|
/**
|
|
@@ -122769,7 +122795,7 @@ var ts;
|
|
|
122769
122795
|
filesToWatch.push(jsonPath);
|
|
122770
122796
|
var jsonConfig = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); }).config;
|
|
122771
122797
|
var jsonTypingNames = ts.flatMap([jsonConfig.dependencies, jsonConfig.devDependencies, jsonConfig.optionalDependencies, jsonConfig.peerDependencies], ts.getOwnKeys);
|
|
122772
|
-
addInferredTypings(jsonTypingNames, "Typing names in '"
|
|
122798
|
+
addInferredTypings(jsonTypingNames, "Typing names in '".concat(jsonPath, "' dependencies"));
|
|
122773
122799
|
}
|
|
122774
122800
|
/**
|
|
122775
122801
|
* Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
|
|
@@ -122808,7 +122834,7 @@ var ts;
|
|
|
122808
122834
|
// depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar`
|
|
122809
122835
|
var fileNames = host.readDirectory(packagesFolderPath, [".json" /* Json */], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
|
|
122810
122836
|
if (log)
|
|
122811
|
-
log("Searching for typing names in "
|
|
122837
|
+
log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(fileNames)));
|
|
122812
122838
|
var packageNames = [];
|
|
122813
122839
|
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
|
|
122814
122840
|
var fileName = fileNames_1[_i];
|
|
@@ -122835,7 +122861,7 @@ var ts;
|
|
|
122835
122861
|
if (ownTypes) {
|
|
122836
122862
|
var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
|
|
122837
122863
|
if (log)
|
|
122838
|
-
log(" Package '"
|
|
122864
|
+
log(" Package '".concat(packageJson.name, "' provides its own types."));
|
|
122839
122865
|
inferredTypings.set(packageJson.name, absolutePath);
|
|
122840
122866
|
}
|
|
122841
122867
|
else {
|
|
@@ -122907,15 +122933,15 @@ var ts;
|
|
|
122907
122933
|
var kind = isScopeName ? "Scope" : "Package";
|
|
122908
122934
|
switch (result) {
|
|
122909
122935
|
case 1 /* EmptyName */:
|
|
122910
|
-
return "'"
|
|
122936
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
|
|
122911
122937
|
case 2 /* NameTooLong */:
|
|
122912
|
-
return "'"
|
|
122938
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
|
|
122913
122939
|
case 3 /* NameStartsWithDot */:
|
|
122914
|
-
return "'"
|
|
122940
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
|
|
122915
122941
|
case 4 /* NameStartsWithUnderscore */:
|
|
122916
|
-
return "'"
|
|
122942
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
|
|
122917
122943
|
case 5 /* NameContainsNonURISafeCharacters */:
|
|
122918
|
-
return "'"
|
|
122944
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
|
|
122919
122945
|
case 0 /* Ok */:
|
|
122920
122946
|
return ts.Debug.fail(); // Shouldn't have called this.
|
|
122921
122947
|
default:
|
|
@@ -125473,7 +125499,7 @@ var ts;
|
|
|
125473
125499
|
var prefix = ts.isJSDocLink(link) ? "link"
|
|
125474
125500
|
: ts.isJSDocLinkCode(link) ? "linkcode"
|
|
125475
125501
|
: "linkplain";
|
|
125476
|
-
var parts = [linkPart("{@"
|
|
125502
|
+
var parts = [linkPart("{@".concat(prefix, " "))];
|
|
125477
125503
|
if (!link.name) {
|
|
125478
125504
|
if (link.text)
|
|
125479
125505
|
parts.push(linkTextPart(link.text));
|
|
@@ -125721,7 +125747,7 @@ var ts;
|
|
|
125721
125747
|
function getUniqueName(baseName, sourceFile) {
|
|
125722
125748
|
var nameText = baseName;
|
|
125723
125749
|
for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
|
|
125724
|
-
nameText = baseName
|
|
125750
|
+
nameText = "".concat(baseName, "_").concat(i);
|
|
125725
125751
|
}
|
|
125726
125752
|
return nameText;
|
|
125727
125753
|
}
|
|
@@ -125831,7 +125857,7 @@ var ts;
|
|
|
125831
125857
|
// Editors can pass in undefined or empty string - we want to infer the preference in those cases.
|
|
125832
125858
|
var quotePreference = getQuotePreference(sourceFile, preferences);
|
|
125833
125859
|
var quoted = JSON.stringify(text);
|
|
125834
|
-
return quotePreference === 0 /* Single */ ? "'"
|
|
125860
|
+
return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
|
|
125835
125861
|
}
|
|
125836
125862
|
ts.quote = quote;
|
|
125837
125863
|
function isEqualityOperatorKind(kind) {
|
|
@@ -126203,7 +126229,7 @@ var ts;
|
|
|
126203
126229
|
var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
|
|
126204
126230
|
// Scoped packages
|
|
126205
126231
|
if (ts.startsWith(components[0], "@")) {
|
|
126206
|
-
return components[0]
|
|
126232
|
+
return "".concat(components[0], "/").concat(components[1]);
|
|
126207
126233
|
}
|
|
126208
126234
|
return components[0];
|
|
126209
126235
|
}
|
|
@@ -126310,13 +126336,13 @@ var ts;
|
|
|
126310
126336
|
ts.getNameForExportedSymbol = getNameForExportedSymbol;
|
|
126311
126337
|
function getSymbolParentOrFail(symbol) {
|
|
126312
126338
|
var _a;
|
|
126313
|
-
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: "
|
|
126314
|
-
|
|
126339
|
+
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
|
|
126340
|
+
"Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
|
|
126315
126341
|
var kind = ts.Debug.formatSyntaxKind(d.kind);
|
|
126316
126342
|
var inJS = ts.isInJSFile(d);
|
|
126317
126343
|
var expression = d.expression;
|
|
126318
|
-
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: "
|
|
126319
|
-
}).join(", ")
|
|
126344
|
+
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
|
|
126345
|
+
}).join(", "), "."));
|
|
126320
126346
|
}
|
|
126321
126347
|
/**
|
|
126322
126348
|
* Useful to check whether a string contains another string at a specific index
|
|
@@ -126524,7 +126550,7 @@ var ts;
|
|
|
126524
126550
|
: checker.tryFindAmbientModule(info.moduleName));
|
|
126525
126551
|
var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
|
|
126526
126552
|
? checker.resolveExternalModuleSymbol(moduleSymbol)
|
|
126527
|
-
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '"
|
|
126553
|
+
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '".concat(info.symbolName, "' by key '").concat(info.symbolTableKey, "' in module ").concat(moduleSymbol.name));
|
|
126528
126554
|
symbols.set(id, [symbol, moduleSymbol]);
|
|
126529
126555
|
return {
|
|
126530
126556
|
symbol: symbol,
|
|
@@ -126537,7 +126563,7 @@ var ts;
|
|
|
126537
126563
|
}
|
|
126538
126564
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
126539
126565
|
var moduleKey = ambientModuleName || "";
|
|
126540
|
-
return importedName
|
|
126566
|
+
return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
|
|
126541
126567
|
}
|
|
126542
126568
|
function parseKey(key) {
|
|
126543
126569
|
var symbolName = key.substring(0, key.indexOf("|"));
|
|
@@ -126617,7 +126643,7 @@ var ts;
|
|
|
126617
126643
|
if (autoImportProvider) {
|
|
126618
126644
|
var start = ts.timestamp();
|
|
126619
126645
|
forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), function (module, file) { return cb(module, file, autoImportProvider, /*isFromPackageJson*/ true); });
|
|
126620
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: "
|
|
126646
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
|
|
126621
126647
|
}
|
|
126622
126648
|
}
|
|
126623
126649
|
ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
|
|
@@ -126671,7 +126697,7 @@ var ts;
|
|
|
126671
126697
|
}
|
|
126672
126698
|
});
|
|
126673
126699
|
});
|
|
126674
|
-
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in "
|
|
126700
|
+
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
|
|
126675
126701
|
return cache;
|
|
126676
126702
|
}
|
|
126677
126703
|
ts.getExportInfoMap = getExportInfoMap;
|
|
@@ -127204,7 +127230,7 @@ var ts;
|
|
|
127204
127230
|
return { spans: spans, endOfLineState: 0 /* None */ };
|
|
127205
127231
|
function pushClassification(start, end, type) {
|
|
127206
127232
|
var length = end - start;
|
|
127207
|
-
ts.Debug.assert(length > 0, "Classification had non-positive length of "
|
|
127233
|
+
ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
|
|
127208
127234
|
spans.push(start);
|
|
127209
127235
|
spans.push(length);
|
|
127210
127236
|
spans.push(type);
|
|
@@ -128072,7 +128098,7 @@ var ts;
|
|
|
128072
128098
|
case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
|
|
128073
128099
|
case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
|
|
128074
128100
|
case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
|
|
128075
|
-
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension "
|
|
128101
|
+
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
|
|
128076
128102
|
case undefined: return "" /* none */;
|
|
128077
128103
|
default:
|
|
128078
128104
|
return ts.Debug.assertNever(extension);
|
|
@@ -128801,10 +128827,10 @@ var ts;
|
|
|
128801
128827
|
var resolvedFromCacheCount = 0;
|
|
128802
128828
|
var cacheAttemptCount = 0;
|
|
128803
128829
|
var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
|
|
128804
|
-
var hitRateMessage = cacheAttemptCount ? " ("
|
|
128805
|
-
(_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix
|
|
128806
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix
|
|
128807
|
-
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix
|
|
128830
|
+
var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
|
|
128831
|
+
(_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));
|
|
128832
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
|
|
128833
|
+
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
|
|
128808
128834
|
return result;
|
|
128809
128835
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
128810
128836
|
if (isFromAmbientModule) {
|
|
@@ -129107,15 +129133,15 @@ var ts;
|
|
|
129107
129133
|
var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
|
|
129108
129134
|
if (origin && originIsThisType(origin)) {
|
|
129109
129135
|
insertText = needsConvertPropertyAccess
|
|
129110
|
-
? "this"
|
|
129111
|
-
: "this"
|
|
129136
|
+
? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
|
|
129137
|
+
: "this".concat(insertQuestionDot ? "?." : ".").concat(name);
|
|
129112
129138
|
}
|
|
129113
129139
|
// We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
|
|
129114
129140
|
// Somehow there was a global with a non-identifier name. Hopefully someone will complain about getting a "foo bar" global completion and provide a repro.
|
|
129115
129141
|
else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
|
|
129116
|
-
insertText = useBraces ? needsConvertPropertyAccess ? "["
|
|
129142
|
+
insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
|
|
129117
129143
|
if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
|
|
129118
|
-
insertText = "?."
|
|
129144
|
+
insertText = "?.".concat(insertText);
|
|
129119
129145
|
}
|
|
129120
129146
|
var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
|
|
129121
129147
|
ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
|
|
@@ -129129,7 +129155,7 @@ var ts;
|
|
|
129129
129155
|
if (isJsxInitializer) {
|
|
129130
129156
|
if (insertText === undefined)
|
|
129131
129157
|
insertText = name;
|
|
129132
|
-
insertText = "{"
|
|
129158
|
+
insertText = "{".concat(insertText, "}");
|
|
129133
129159
|
if (typeof isJsxInitializer !== "boolean") {
|
|
129134
129160
|
replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
|
|
129135
129161
|
}
|
|
@@ -129142,8 +129168,8 @@ var ts;
|
|
|
129142
129168
|
if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
|
|
129143
129169
|
awaitText = ";";
|
|
129144
129170
|
}
|
|
129145
|
-
awaitText += "(await "
|
|
129146
|
-
insertText = needsConvertPropertyAccess ? ""
|
|
129171
|
+
awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
|
|
129172
|
+
insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
|
|
129147
129173
|
replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
|
|
129148
129174
|
}
|
|
129149
129175
|
if (originIsResolvedExport(origin)) {
|
|
@@ -129174,7 +129200,7 @@ var ts;
|
|
|
129174
129200
|
&& !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
|
|
129175
129201
|
if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
|
|
129176
129202
|
// If is string like or undefined use quotes
|
|
129177
|
-
insertText = ts.escapeSnippetText(name)
|
|
129203
|
+
insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
|
|
129178
129204
|
isSnippet = true;
|
|
129179
129205
|
}
|
|
129180
129206
|
else {
|
|
@@ -129183,12 +129209,9 @@ var ts;
|
|
|
129183
129209
|
}
|
|
129184
129210
|
}
|
|
129185
129211
|
if (useBraces_1) {
|
|
129186
|
-
insertText = ts.escapeSnippetText(name)
|
|
129212
|
+
insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
|
|
129187
129213
|
isSnippet = true;
|
|
129188
129214
|
}
|
|
129189
|
-
if (isSnippet) {
|
|
129190
|
-
replacementSpan = ts.createTextSpanFromNode(location, sourceFile);
|
|
129191
|
-
}
|
|
129192
129215
|
}
|
|
129193
129216
|
if (insertText !== undefined && !preferences.includeCompletionsWithInsertText) {
|
|
129194
129217
|
return undefined;
|
|
@@ -129273,7 +129296,7 @@ var ts;
|
|
|
129273
129296
|
removeComments: true,
|
|
129274
129297
|
module: options.module,
|
|
129275
129298
|
target: options.target,
|
|
129276
|
-
omitTrailingSemicolon:
|
|
129299
|
+
omitTrailingSemicolon: false,
|
|
129277
129300
|
newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
|
|
129278
129301
|
});
|
|
129279
129302
|
var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
|
|
@@ -129329,9 +129352,9 @@ var ts;
|
|
|
129329
129352
|
}
|
|
129330
129353
|
node = ts.factory.updateModifiers(node, modifiers & (~presentModifiers));
|
|
129331
129354
|
completionNodes.push(node);
|
|
129332
|
-
}, body, isAbstract);
|
|
129355
|
+
}, body, 2 /* Property */, isAbstract);
|
|
129333
129356
|
if (completionNodes.length) {
|
|
129334
|
-
insertText = printer.printSnippetList(1 /* MultiLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
129357
|
+
insertText = printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
129335
129358
|
}
|
|
129336
129359
|
return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder };
|
|
129337
129360
|
}
|
|
@@ -129450,14 +129473,14 @@ var ts;
|
|
|
129450
129473
|
var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
|
|
129451
129474
|
var isTopLevelTypeOnly = ((_b = (_a = ts.tryCast(importCompletionNode, ts.isImportDeclaration)) === null || _a === void 0 ? void 0 : _a.importClause) === null || _b === void 0 ? void 0 : _b.isTypeOnly) || ((_c = ts.tryCast(importCompletionNode, ts.isImportEqualsDeclaration)) === null || _c === void 0 ? void 0 : _c.isTypeOnly);
|
|
129452
129475
|
var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
|
|
129453
|
-
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " "
|
|
129454
|
-
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */)
|
|
129476
|
+
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
|
|
129477
|
+
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
|
|
129455
129478
|
var suffix = useSemicolons ? ";" : "";
|
|
129456
129479
|
switch (importKind) {
|
|
129457
|
-
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
129458
|
-
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
129459
|
-
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
129460
|
-
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
129480
|
+
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
|
|
129481
|
+
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129482
|
+
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129483
|
+
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129461
129484
|
}
|
|
129462
129485
|
}
|
|
129463
129486
|
function quotePropertyName(sourceFile, preferences, name) {
|
|
@@ -132356,7 +132379,7 @@ var ts;
|
|
|
132356
132379
|
}
|
|
132357
132380
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
132358
132381
|
var entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(ts.Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided"));
|
|
132359
|
-
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:"
|
|
132382
|
+
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:".concat(scriptKind, " and sourceFile.scriptKind: ").concat(entry === null || entry === void 0 ? void 0 : entry.sourceFile.scriptKind, ", !entry: ").concat(!entry));
|
|
132360
132383
|
return entry;
|
|
132361
132384
|
}
|
|
132362
132385
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
@@ -133368,7 +133391,7 @@ var ts;
|
|
|
133368
133391
|
sourceFile: def.file,
|
|
133369
133392
|
name: def.reference.fileName,
|
|
133370
133393
|
kind: "string" /* string */,
|
|
133371
|
-
displayParts: [ts.displayPart("\""
|
|
133394
|
+
displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
|
|
133372
133395
|
};
|
|
133373
133396
|
}
|
|
133374
133397
|
default:
|
|
@@ -133948,7 +133971,7 @@ var ts;
|
|
|
133948
133971
|
if (symbol.flags & 33554432 /* Transient */)
|
|
133949
133972
|
return undefined;
|
|
133950
133973
|
// Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
|
|
133951
|
-
ts.Debug.fail("Unexpected symbol at "
|
|
133974
|
+
ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
|
|
133952
133975
|
}
|
|
133953
133976
|
return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
|
|
133954
133977
|
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
|
|
@@ -135232,8 +135255,8 @@ var ts;
|
|
|
135232
135255
|
var end = pos + 6; /* "static".length */
|
|
135233
135256
|
var typeChecker = program.getTypeChecker();
|
|
135234
135257
|
var symbol = typeChecker.getSymbolAtLocation(node.parent);
|
|
135235
|
-
var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent)
|
|
135236
|
-
return { text: prefix
|
|
135258
|
+
var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
|
|
135259
|
+
return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
|
|
135237
135260
|
}
|
|
135238
135261
|
var declName = isConstNamedExpression(node) ? node.parent.name :
|
|
135239
135262
|
ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
@@ -136494,7 +136517,7 @@ var ts;
|
|
|
136494
136517
|
function getJSDocTagCompletions() {
|
|
136495
136518
|
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
|
|
136496
136519
|
return {
|
|
136497
|
-
name: "@"
|
|
136520
|
+
name: "@".concat(tagName),
|
|
136498
136521
|
kind: "keyword" /* keyword */,
|
|
136499
136522
|
kindModifiers: "",
|
|
136500
136523
|
sortText: ts.Completions.SortText.LocationPriority
|
|
@@ -136626,11 +136649,11 @@ var ts;
|
|
|
136626
136649
|
var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
|
|
136627
136650
|
var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
|
|
136628
136651
|
var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
|
|
136629
|
-
return indentationStr
|
|
136652
|
+
return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
|
|
136630
136653
|
}).join("");
|
|
136631
136654
|
}
|
|
136632
136655
|
function returnsDocComment(indentationStr, newLine) {
|
|
136633
|
-
return indentationStr
|
|
136656
|
+
return "".concat(indentationStr, " * @returns").concat(newLine);
|
|
136634
136657
|
}
|
|
136635
136658
|
function getCommentOwnerInfo(tokenAtPos, options) {
|
|
136636
136659
|
return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
|
|
@@ -137470,7 +137493,7 @@ var ts;
|
|
|
137470
137493
|
}
|
|
137471
137494
|
if (name) {
|
|
137472
137495
|
var text = ts.isIdentifier(name) ? name.text
|
|
137473
|
-
: ts.isElementAccessExpression(name) ? "["
|
|
137496
|
+
: ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
|
|
137474
137497
|
: nodeText(name);
|
|
137475
137498
|
if (text.length > 0) {
|
|
137476
137499
|
return cleanText(text);
|
|
@@ -137480,7 +137503,7 @@ var ts;
|
|
|
137480
137503
|
case 303 /* SourceFile */:
|
|
137481
137504
|
var sourceFile = node;
|
|
137482
137505
|
return ts.isExternalModule(sourceFile)
|
|
137483
|
-
? "\""
|
|
137506
|
+
? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
|
|
137484
137507
|
: "<global>";
|
|
137485
137508
|
case 270 /* ExportAssignment */:
|
|
137486
137509
|
return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
|
|
@@ -137676,10 +137699,10 @@ var ts;
|
|
|
137676
137699
|
if (name !== undefined) {
|
|
137677
137700
|
name = cleanText(name);
|
|
137678
137701
|
if (name.length > maxLength) {
|
|
137679
|
-
return name
|
|
137702
|
+
return "".concat(name, " callback");
|
|
137680
137703
|
}
|
|
137681
137704
|
var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
|
|
137682
|
-
return name
|
|
137705
|
+
return "".concat(name, "(").concat(args, ") callback");
|
|
137683
137706
|
}
|
|
137684
137707
|
}
|
|
137685
137708
|
return "<function>";
|
|
@@ -137692,7 +137715,7 @@ var ts;
|
|
|
137692
137715
|
else if (ts.isPropertyAccessExpression(expr)) {
|
|
137693
137716
|
var left = getCalledExpressionName(expr.expression);
|
|
137694
137717
|
var right = expr.name.text;
|
|
137695
|
-
return left === undefined ? right : left
|
|
137718
|
+
return left === undefined ? right : "".concat(left, ".").concat(right);
|
|
137696
137719
|
}
|
|
137697
137720
|
else {
|
|
137698
137721
|
return undefined;
|
|
@@ -140124,7 +140147,7 @@ var ts;
|
|
|
140124
140147
|
var _loop_9 = function (n) {
|
|
140125
140148
|
// If the node is not a subspan of its parent, this is a big problem.
|
|
140126
140149
|
// There have been crashes that might be caused by this violation.
|
|
140127
|
-
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: "
|
|
140150
|
+
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: ".concat(ts.Debug.formatSyntaxKind(n.kind), ", parent: ").concat(ts.Debug.formatSyntaxKind(n.parent.kind)); });
|
|
140128
140151
|
var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
|
|
140129
140152
|
if (argumentInfo) {
|
|
140130
140153
|
return { value: argumentInfo };
|
|
@@ -140296,7 +140319,7 @@ var ts;
|
|
|
140296
140319
|
(function (InlayHints) {
|
|
140297
140320
|
var maxHintsLength = 30;
|
|
140298
140321
|
var leadingParameterNameCommentRegexFactory = function (name) {
|
|
140299
|
-
return new RegExp("^\\s?/\\*\\*?\\s?"
|
|
140322
|
+
return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
|
|
140300
140323
|
};
|
|
140301
140324
|
function shouldShowParameterNameHints(preferences) {
|
|
140302
140325
|
return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
|
|
@@ -140360,7 +140383,7 @@ var ts;
|
|
|
140360
140383
|
}
|
|
140361
140384
|
function addParameterHints(text, position, isFirstVariadicArgument) {
|
|
140362
140385
|
result.push({
|
|
140363
|
-
text: ""
|
|
140386
|
+
text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
|
|
140364
140387
|
position: position,
|
|
140365
140388
|
kind: "Parameter" /* Parameter */,
|
|
140366
140389
|
whitespaceAfter: true,
|
|
@@ -140368,7 +140391,7 @@ var ts;
|
|
|
140368
140391
|
}
|
|
140369
140392
|
function addTypeHints(text, position) {
|
|
140370
140393
|
result.push({
|
|
140371
|
-
text: ": "
|
|
140394
|
+
text: ": ".concat(truncation(text, maxHintsLength)),
|
|
140372
140395
|
position: position,
|
|
140373
140396
|
kind: "Type" /* Type */,
|
|
140374
140397
|
whitespaceBefore: true,
|
|
@@ -140376,7 +140399,7 @@ var ts;
|
|
|
140376
140399
|
}
|
|
140377
140400
|
function addEnumMemberValueHints(text, position) {
|
|
140378
140401
|
result.push({
|
|
140379
|
-
text: "= "
|
|
140402
|
+
text: "= ".concat(truncation(text, maxHintsLength)),
|
|
140380
140403
|
position: position,
|
|
140381
140404
|
kind: "Enum" /* Enum */,
|
|
140382
140405
|
whitespaceBefore: true,
|
|
@@ -140911,7 +140934,7 @@ var ts;
|
|
|
140911
140934
|
}
|
|
140912
140935
|
}
|
|
140913
140936
|
function getKeyFromNode(exp) {
|
|
140914
|
-
return exp.pos.toString()
|
|
140937
|
+
return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
|
|
140915
140938
|
}
|
|
140916
140939
|
function canBeConvertedToClass(node, checker) {
|
|
140917
140940
|
var _a, _b, _c, _d;
|
|
@@ -145029,7 +145052,7 @@ var ts;
|
|
|
145029
145052
|
var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
145030
145053
|
var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
145031
145054
|
var indent = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
145032
|
-
var text = (insertAtLineStart ? "" : this.newLineCharacter
|
|
145055
|
+
var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
|
|
145033
145056
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
145034
145057
|
};
|
|
145035
145058
|
ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
|
|
@@ -145229,7 +145252,7 @@ var ts;
|
|
|
145229
145252
|
};
|
|
145230
145253
|
ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
|
|
145231
145254
|
var options = this.getInsertNodeAfterOptionsWorker(after);
|
|
145232
|
-
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n"
|
|
145255
|
+
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
|
|
145233
145256
|
};
|
|
145234
145257
|
ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
|
|
145235
145258
|
switch (node.kind) {
|
|
@@ -145263,7 +145286,7 @@ var ts;
|
|
|
145263
145286
|
}
|
|
145264
145287
|
else {
|
|
145265
145288
|
// `x => {}` -> `function f(x) {}`
|
|
145266
|
-
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function "
|
|
145289
|
+
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
|
|
145267
145290
|
// Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
|
|
145268
145291
|
this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
|
|
145269
145292
|
}
|
|
@@ -145320,7 +145343,7 @@ var ts;
|
|
|
145320
145343
|
var nextNode = containingList[index + 1];
|
|
145321
145344
|
var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
145322
145345
|
// write separator and leading trivia of the next element as suffix
|
|
145323
|
-
var suffix = ""
|
|
145346
|
+
var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
|
|
145324
145347
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
|
|
145325
145348
|
}
|
|
145326
145349
|
}
|
|
@@ -145365,7 +145388,7 @@ var ts;
|
|
|
145365
145388
|
this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
|
|
145366
145389
|
}
|
|
145367
145390
|
else {
|
|
145368
|
-
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator)
|
|
145391
|
+
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
|
|
145369
145392
|
}
|
|
145370
145393
|
}
|
|
145371
145394
|
};
|
|
@@ -145467,7 +145490,7 @@ var ts;
|
|
|
145467
145490
|
var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
|
|
145468
145491
|
var _loop_12 = function (i) {
|
|
145469
145492
|
ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
|
|
145470
|
-
return JSON.stringify(normalized[i].range)
|
|
145493
|
+
return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
|
|
145471
145494
|
});
|
|
145472
145495
|
};
|
|
145473
145496
|
// verify that change intervals do not overlap, except possibly at end points.
|
|
@@ -145564,7 +145587,7 @@ var ts;
|
|
|
145564
145587
|
function applyChanges(text, changes) {
|
|
145565
145588
|
for (var i = changes.length - 1; i >= 0; i--) {
|
|
145566
145589
|
var _a = changes[i], span = _a.span, newText = _a.newText;
|
|
145567
|
-
text = ""
|
|
145590
|
+
text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
|
|
145568
145591
|
}
|
|
145569
145592
|
return text;
|
|
145570
145593
|
}
|
|
@@ -146695,9 +146718,6 @@ var ts;
|
|
|
146695
146718
|
});
|
|
146696
146719
|
function makeChange(changeTracker, sourceFile, pos) {
|
|
146697
146720
|
var token = ts.getTokenAtPosition(sourceFile, pos);
|
|
146698
|
-
if (!ts.isIdentifier(token)) {
|
|
146699
|
-
return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.Debug.formatSyntaxKind(token.kind));
|
|
146700
|
-
}
|
|
146701
146721
|
var param = token.parent;
|
|
146702
146722
|
if (!ts.isParameter(param)) {
|
|
146703
146723
|
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.Debug.formatSyntaxKind(token.kind));
|
|
@@ -146705,9 +146725,10 @@ var ts;
|
|
|
146705
146725
|
var i = param.parent.parameters.indexOf(param);
|
|
146706
146726
|
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
|
|
146707
146727
|
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
|
|
146728
|
+
var typeNode = ts.factory.createTypeReferenceNode(param.name, /*typeArguments*/ undefined);
|
|
146708
146729
|
var replacement = ts.factory.createParameterDeclaration(
|
|
146709
|
-
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.factory.
|
|
146710
|
-
changeTracker.replaceNode(sourceFile,
|
|
146730
|
+
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, param.dotDotDotToken ? ts.factory.createArrayTypeNode(typeNode) : typeNode, param.initializer);
|
|
146731
|
+
changeTracker.replaceNode(sourceFile, param, replacement);
|
|
146711
146732
|
}
|
|
146712
146733
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
146713
146734
|
})(ts || (ts = {}));
|
|
@@ -148038,7 +148059,7 @@ var ts;
|
|
|
148038
148059
|
if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
|
|
148039
148060
|
|| checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
|
|
148040
148061
|
// Unconditionally add an underscore in case `text` is a keyword.
|
|
148041
|
-
res.set(text, makeUniqueName("_"
|
|
148062
|
+
res.set(text, makeUniqueName("_".concat(text), identifiers));
|
|
148042
148063
|
}
|
|
148043
148064
|
});
|
|
148044
148065
|
return res;
|
|
@@ -148138,7 +148159,7 @@ var ts;
|
|
|
148138
148159
|
// `const a = require("b").c` --> `import { c as a } from "./b";
|
|
148139
148160
|
return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
|
|
148140
148161
|
default:
|
|
148141
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form "
|
|
148162
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
|
|
148142
148163
|
}
|
|
148143
148164
|
}
|
|
148144
148165
|
function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
|
|
@@ -148189,7 +148210,7 @@ var ts;
|
|
|
148189
148210
|
case 168 /* MethodDeclaration */:
|
|
148190
148211
|
return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
|
|
148191
148212
|
default:
|
|
148192
|
-
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind "
|
|
148213
|
+
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
|
|
148193
148214
|
}
|
|
148194
148215
|
});
|
|
148195
148216
|
return statements && [statements, false];
|
|
@@ -148323,7 +148344,7 @@ var ts;
|
|
|
148323
148344
|
case 79 /* Identifier */:
|
|
148324
148345
|
return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
|
|
148325
148346
|
default:
|
|
148326
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind "
|
|
148347
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
|
|
148327
148348
|
}
|
|
148328
148349
|
}
|
|
148329
148350
|
/**
|
|
@@ -148380,7 +148401,7 @@ var ts;
|
|
|
148380
148401
|
// Identifiers helpers
|
|
148381
148402
|
function makeUniqueName(name, identifiers) {
|
|
148382
148403
|
while (identifiers.original.has(name) || identifiers.additional.has(name)) {
|
|
148383
|
-
name = "_"
|
|
148404
|
+
name = "_".concat(name);
|
|
148384
148405
|
}
|
|
148385
148406
|
identifiers.additional.add(name);
|
|
148386
148407
|
return name;
|
|
@@ -148460,7 +148481,7 @@ var ts;
|
|
|
148460
148481
|
if (!qualifiedName)
|
|
148461
148482
|
return undefined;
|
|
148462
148483
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
|
|
148463
|
-
var newText = qualifiedName.left.text
|
|
148484
|
+
var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
|
|
148464
148485
|
return [codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, ts.Diagnostics.Rewrite_all_as_indexed_access_types)];
|
|
148465
148486
|
},
|
|
148466
148487
|
fixIds: [fixId],
|
|
@@ -148857,7 +148878,7 @@ var ts;
|
|
|
148857
148878
|
break;
|
|
148858
148879
|
}
|
|
148859
148880
|
default:
|
|
148860
|
-
ts.Debug.assertNever(fix, "fix wasn't never - got kind "
|
|
148881
|
+
ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
|
|
148861
148882
|
}
|
|
148862
148883
|
function reduceAddAsTypeOnlyValues(prevValue, newValue) {
|
|
148863
148884
|
// `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
|
|
@@ -148901,7 +148922,7 @@ var ts;
|
|
|
148901
148922
|
return newEntry;
|
|
148902
148923
|
}
|
|
148903
148924
|
function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
|
|
148904
|
-
return (topLevelTypeOnly ? 1 : 0
|
|
148925
|
+
return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
|
|
148905
148926
|
}
|
|
148906
148927
|
}
|
|
148907
148928
|
function writeFixes(changeTracker) {
|
|
@@ -149354,7 +149375,7 @@ var ts;
|
|
|
149354
149375
|
case ts.ModuleKind.NodeNext:
|
|
149355
149376
|
return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
|
|
149356
149377
|
default:
|
|
149357
|
-
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind "
|
|
149378
|
+
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
|
|
149358
149379
|
}
|
|
149359
149380
|
}
|
|
149360
149381
|
function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
|
|
@@ -149461,7 +149482,7 @@ var ts;
|
|
|
149461
149482
|
switch (fix.kind) {
|
|
149462
149483
|
case 0 /* UseNamespace */:
|
|
149463
149484
|
addNamespaceQualifier(changes, sourceFile, fix);
|
|
149464
|
-
return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix
|
|
149485
|
+
return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
|
|
149465
149486
|
case 1 /* JsdocTypeImport */:
|
|
149466
149487
|
addImportType(changes, sourceFile, fix, quotePreference);
|
|
149467
149488
|
return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
|
|
@@ -149485,7 +149506,7 @@ var ts;
|
|
|
149485
149506
|
return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
|
|
149486
149507
|
}
|
|
149487
149508
|
default:
|
|
149488
|
-
return ts.Debug.assertNever(fix, "Unexpected fix kind "
|
|
149509
|
+
return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
|
|
149489
149510
|
}
|
|
149490
149511
|
}
|
|
149491
149512
|
function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) {
|
|
@@ -149581,7 +149602,7 @@ var ts;
|
|
|
149581
149602
|
}
|
|
149582
149603
|
function getImportTypePrefix(moduleSpecifier, quotePreference) {
|
|
149583
149604
|
var quote = ts.getQuoteFromPreference(quotePreference);
|
|
149584
|
-
return "import("
|
|
149605
|
+
return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
|
|
149585
149606
|
}
|
|
149586
149607
|
function needsTypeOnly(_a) {
|
|
149587
149608
|
var addAsTypeOnly = _a.addAsTypeOnly;
|
|
@@ -149674,7 +149695,7 @@ var ts;
|
|
|
149674
149695
|
lastCharWasValid = isValid;
|
|
149675
149696
|
}
|
|
149676
149697
|
// Need `|| "_"` to ensure result isn't empty.
|
|
149677
|
-
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_"
|
|
149698
|
+
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
|
|
149678
149699
|
}
|
|
149679
149700
|
codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
|
|
149680
149701
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -150874,7 +150895,7 @@ var ts;
|
|
|
150874
150895
|
break;
|
|
150875
150896
|
}
|
|
150876
150897
|
default:
|
|
150877
|
-
ts.Debug.fail("Bad fixId: "
|
|
150898
|
+
ts.Debug.fail("Bad fixId: ".concat(context.fixId));
|
|
150878
150899
|
}
|
|
150879
150900
|
});
|
|
150880
150901
|
},
|
|
@@ -151322,7 +151343,7 @@ var ts;
|
|
|
151322
151343
|
if (!isValidCharacter(character)) {
|
|
151323
151344
|
return;
|
|
151324
151345
|
}
|
|
151325
|
-
var replacement = useHtmlEntity ? htmlEntity[character] : "{"
|
|
151346
|
+
var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
|
|
151326
151347
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
151327
151348
|
}
|
|
151328
151349
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -151513,11 +151534,11 @@ var ts;
|
|
|
151513
151534
|
token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
|
|
151514
151535
|
}
|
|
151515
151536
|
if (ts.isIdentifier(token) && canPrefix(token)) {
|
|
151516
|
-
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_"
|
|
151537
|
+
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
|
|
151517
151538
|
if (ts.isParameter(token.parent)) {
|
|
151518
151539
|
ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
|
|
151519
151540
|
if (ts.isIdentifier(tag.name)) {
|
|
151520
|
-
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_"
|
|
151541
|
+
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
|
|
151521
151542
|
}
|
|
151522
151543
|
});
|
|
151523
151544
|
}
|
|
@@ -151853,7 +151874,7 @@ var ts;
|
|
|
151853
151874
|
}); }
|
|
151854
151875
|
});
|
|
151855
151876
|
function doChange(changes, sourceFile, name) {
|
|
151856
|
-
changes.replaceNodeWithText(sourceFile, name, name.text
|
|
151877
|
+
changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
|
|
151857
151878
|
}
|
|
151858
151879
|
function getCallName(sourceFile, start) {
|
|
151859
151880
|
var token = ts.getTokenAtPosition(sourceFile, start);
|
|
@@ -153002,7 +153023,7 @@ var ts;
|
|
|
153002
153023
|
var parameters = [];
|
|
153003
153024
|
var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
|
|
153004
153025
|
var _loop_16 = function (i) {
|
|
153005
|
-
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg"
|
|
153026
|
+
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
|
|
153006
153027
|
symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
|
|
153007
153028
|
if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
|
|
153008
153029
|
symbol.flags |= 16777216 /* Optional */;
|
|
@@ -153105,7 +153126,7 @@ var ts;
|
|
|
153105
153126
|
codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
|
|
153106
153127
|
ts.createTextChange(sourceFile.checkJsDirective
|
|
153107
153128
|
? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
|
|
153108
|
-
: ts.createTextSpan(0, 0), "// @ts-nocheck"
|
|
153129
|
+
: ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
|
|
153109
153130
|
])], ts.Diagnostics.Disable_checking_for_this_file),
|
|
153110
153131
|
];
|
|
153111
153132
|
if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
|
|
@@ -153161,11 +153182,18 @@ var ts;
|
|
|
153161
153182
|
};
|
|
153162
153183
|
}
|
|
153163
153184
|
codefix.getNoopSymbolTrackerWithResolver = getNoopSymbolTrackerWithResolver;
|
|
153185
|
+
var PreserveOptionalFlags;
|
|
153186
|
+
(function (PreserveOptionalFlags) {
|
|
153187
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Method"] = 1] = "Method";
|
|
153188
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Property"] = 2] = "Property";
|
|
153189
|
+
PreserveOptionalFlags[PreserveOptionalFlags["All"] = 3] = "All";
|
|
153190
|
+
})(PreserveOptionalFlags = codefix.PreserveOptionalFlags || (codefix.PreserveOptionalFlags = {}));
|
|
153164
153191
|
/**
|
|
153165
153192
|
* `addClassElement` will not be called if we can't figure out a representation for `symbol` in `enclosingDeclaration`.
|
|
153166
153193
|
* @param body If defined, this will be the body of the member node passed to `addClassElement`. Otherwise, the body will default to a stub.
|
|
153167
153194
|
*/
|
|
153168
|
-
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, isAmbient) {
|
|
153195
|
+
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional, isAmbient) {
|
|
153196
|
+
if (preserveOptional === void 0) { preserveOptional = 3 /* All */; }
|
|
153169
153197
|
if (isAmbient === void 0) { isAmbient = false; }
|
|
153170
153198
|
var declarations = symbol.getDeclarations();
|
|
153171
153199
|
if (!(declarations && declarations.length)) {
|
|
@@ -153194,7 +153222,7 @@ var ts;
|
|
|
153194
153222
|
}
|
|
153195
153223
|
}
|
|
153196
153224
|
addClassElement(ts.factory.createPropertyDeclaration(
|
|
153197
|
-
/*decorators*/ undefined, modifiers, name, optional ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
153225
|
+
/*decorators*/ undefined, modifiers, name, optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
153198
153226
|
/*initializer*/ undefined));
|
|
153199
153227
|
break;
|
|
153200
153228
|
case 171 /* GetAccessor */:
|
|
@@ -153258,13 +153286,13 @@ var ts;
|
|
|
153258
153286
|
}
|
|
153259
153287
|
else {
|
|
153260
153288
|
ts.Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count");
|
|
153261
|
-
addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional, modifiers, quotePreference, body));
|
|
153289
|
+
addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body));
|
|
153262
153290
|
}
|
|
153263
153291
|
}
|
|
153264
153292
|
break;
|
|
153265
153293
|
}
|
|
153266
153294
|
function outputMethod(quotePreference, signature, modifiers, name, body) {
|
|
153267
|
-
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder);
|
|
153295
|
+
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder);
|
|
153268
153296
|
if (method)
|
|
153269
153297
|
addClassElement(method);
|
|
153270
153298
|
}
|
|
@@ -153364,7 +153392,7 @@ var ts;
|
|
|
153364
153392
|
var typeParameters = isJs || typeArguments === undefined
|
|
153365
153393
|
? undefined
|
|
153366
153394
|
: ts.map(typeArguments, function (_, i) {
|
|
153367
|
-
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T"
|
|
153395
|
+
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
|
|
153368
153396
|
});
|
|
153369
153397
|
var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
|
|
153370
153398
|
var type = isJs || contextualType === undefined
|
|
@@ -153399,7 +153427,7 @@ var ts;
|
|
|
153399
153427
|
/*decorators*/ undefined,
|
|
153400
153428
|
/*modifiers*/ undefined,
|
|
153401
153429
|
/*dotDotDotToken*/ undefined,
|
|
153402
|
-
/*name*/ names && names[i] || "arg"
|
|
153430
|
+
/*name*/ names && names[i] || "arg".concat(i),
|
|
153403
153431
|
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
|
|
153404
153432
|
/*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
|
|
153405
153433
|
/*initializer*/ undefined);
|
|
@@ -153650,7 +153678,7 @@ var ts;
|
|
|
153650
153678
|
}
|
|
153651
153679
|
var name = declaration.name.text;
|
|
153652
153680
|
var startWithUnderscore = ts.startsWithUnderscore(name);
|
|
153653
|
-
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_"
|
|
153681
|
+
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
|
|
153654
153682
|
var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
|
|
153655
153683
|
return {
|
|
153656
153684
|
isStatic: ts.hasStaticModifier(declaration),
|
|
@@ -154674,7 +154702,7 @@ var ts;
|
|
|
154674
154702
|
changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
|
|
154675
154703
|
break;
|
|
154676
154704
|
default:
|
|
154677
|
-
ts.Debug.fail("Unexpected exportNode kind "
|
|
154705
|
+
ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
|
|
154678
154706
|
}
|
|
154679
154707
|
}
|
|
154680
154708
|
}
|
|
@@ -154762,7 +154790,7 @@ var ts;
|
|
|
154762
154790
|
break;
|
|
154763
154791
|
}
|
|
154764
154792
|
default:
|
|
154765
|
-
ts.Debug.assertNever(parent, "Unexpected parent kind "
|
|
154793
|
+
ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
|
|
154766
154794
|
}
|
|
154767
154795
|
}
|
|
154768
154796
|
function makeImportSpecifier(propertyName, name) {
|
|
@@ -155326,7 +155354,7 @@ var ts;
|
|
|
155326
155354
|
var newComment = ts.displayPartsToString(parameterDocComment);
|
|
155327
155355
|
if (newComment.length) {
|
|
155328
155356
|
ts.setSyntheticLeadingComments(result, [{
|
|
155329
|
-
text: "*\n"
|
|
155357
|
+
text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
|
|
155330
155358
|
kind: 3 /* MultiLineCommentTrivia */,
|
|
155331
155359
|
pos: -1,
|
|
155332
155360
|
end: -1,
|
|
@@ -155471,7 +155499,7 @@ var ts;
|
|
|
155471
155499
|
usedFunctionNames.set(description, true);
|
|
155472
155500
|
functionActions.push({
|
|
155473
155501
|
description: description,
|
|
155474
|
-
name: "function_scope_"
|
|
155502
|
+
name: "function_scope_".concat(i),
|
|
155475
155503
|
kind: extractFunctionAction.kind
|
|
155476
155504
|
});
|
|
155477
155505
|
}
|
|
@@ -155479,7 +155507,7 @@ var ts;
|
|
|
155479
155507
|
else if (!innermostErrorFunctionAction) {
|
|
155480
155508
|
innermostErrorFunctionAction = {
|
|
155481
155509
|
description: description,
|
|
155482
|
-
name: "function_scope_"
|
|
155510
|
+
name: "function_scope_".concat(i),
|
|
155483
155511
|
notApplicableReason: getStringError(functionExtraction.errors),
|
|
155484
155512
|
kind: extractFunctionAction.kind
|
|
155485
155513
|
};
|
|
@@ -155495,7 +155523,7 @@ var ts;
|
|
|
155495
155523
|
usedConstantNames.set(description_1, true);
|
|
155496
155524
|
constantActions.push({
|
|
155497
155525
|
description: description_1,
|
|
155498
|
-
name: "constant_scope_"
|
|
155526
|
+
name: "constant_scope_".concat(i),
|
|
155499
155527
|
kind: extractConstantAction.kind
|
|
155500
155528
|
});
|
|
155501
155529
|
}
|
|
@@ -155503,7 +155531,7 @@ var ts;
|
|
|
155503
155531
|
else if (!innermostErrorConstantAction) {
|
|
155504
155532
|
innermostErrorConstantAction = {
|
|
155505
155533
|
description: description,
|
|
155506
|
-
name: "constant_scope_"
|
|
155534
|
+
name: "constant_scope_".concat(i),
|
|
155507
155535
|
notApplicableReason: getStringError(constantExtraction.errors),
|
|
155508
155536
|
kind: extractConstantAction.kind
|
|
155509
155537
|
};
|
|
@@ -156087,28 +156115,28 @@ var ts;
|
|
|
156087
156115
|
case 212 /* FunctionExpression */:
|
|
156088
156116
|
case 255 /* FunctionDeclaration */:
|
|
156089
156117
|
return scope.name
|
|
156090
|
-
? "function '"
|
|
156118
|
+
? "function '".concat(scope.name.text, "'")
|
|
156091
156119
|
: ts.ANONYMOUS;
|
|
156092
156120
|
case 213 /* ArrowFunction */:
|
|
156093
156121
|
return "arrow function";
|
|
156094
156122
|
case 168 /* MethodDeclaration */:
|
|
156095
|
-
return "method '"
|
|
156123
|
+
return "method '".concat(scope.name.getText(), "'");
|
|
156096
156124
|
case 171 /* GetAccessor */:
|
|
156097
|
-
return "'get "
|
|
156125
|
+
return "'get ".concat(scope.name.getText(), "'");
|
|
156098
156126
|
case 172 /* SetAccessor */:
|
|
156099
|
-
return "'set "
|
|
156127
|
+
return "'set ".concat(scope.name.getText(), "'");
|
|
156100
156128
|
default:
|
|
156101
|
-
throw ts.Debug.assertNever(scope, "Unexpected scope kind "
|
|
156129
|
+
throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
|
|
156102
156130
|
}
|
|
156103
156131
|
}
|
|
156104
156132
|
function getDescriptionForClassLikeDeclaration(scope) {
|
|
156105
156133
|
return scope.kind === 256 /* ClassDeclaration */
|
|
156106
|
-
? scope.name ? "class '"
|
|
156107
|
-
: scope.name ? "class expression '"
|
|
156134
|
+
? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
|
|
156135
|
+
: scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
|
|
156108
156136
|
}
|
|
156109
156137
|
function getDescriptionForModuleLikeDeclaration(scope) {
|
|
156110
156138
|
return scope.kind === 261 /* ModuleBlock */
|
|
156111
|
-
? "namespace '"
|
|
156139
|
+
? "namespace '".concat(scope.parent.name.getText(), "'")
|
|
156112
156140
|
: scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
|
|
156113
156141
|
}
|
|
156114
156142
|
var SpecialScope;
|
|
@@ -157575,7 +157603,7 @@ var ts;
|
|
|
157575
157603
|
case 253 /* VariableDeclaration */:
|
|
157576
157604
|
return ts.tryCast(node.name, ts.isIdentifier);
|
|
157577
157605
|
default:
|
|
157578
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157606
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
157579
157607
|
}
|
|
157580
157608
|
}
|
|
157581
157609
|
function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
|
|
@@ -157612,7 +157640,7 @@ var ts;
|
|
|
157612
157640
|
case 253 /* VariableDeclaration */:
|
|
157613
157641
|
return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
|
|
157614
157642
|
default:
|
|
157615
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157643
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
157616
157644
|
}
|
|
157617
157645
|
}
|
|
157618
157646
|
function moduleSpecifierFromImport(i) {
|
|
@@ -157699,7 +157727,7 @@ var ts;
|
|
|
157699
157727
|
deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
|
|
157700
157728
|
break;
|
|
157701
157729
|
default:
|
|
157702
|
-
ts.Debug.assertNever(importDecl, "Unexpected import decl kind "
|
|
157730
|
+
ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
|
|
157703
157731
|
}
|
|
157704
157732
|
}
|
|
157705
157733
|
function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
|
|
@@ -157799,7 +157827,7 @@ var ts;
|
|
|
157799
157827
|
var name = ts.combinePaths(inDirectory, newModuleName + extension);
|
|
157800
157828
|
if (!host.fileExists(name))
|
|
157801
157829
|
return newModuleName; // TODO: GH#18217
|
|
157802
|
-
newModuleName = moduleName
|
|
157830
|
+
newModuleName = "".concat(moduleName, ".").concat(i);
|
|
157803
157831
|
}
|
|
157804
157832
|
}
|
|
157805
157833
|
function getNewModuleName(movedSymbols) {
|
|
@@ -157906,7 +157934,7 @@ var ts;
|
|
|
157906
157934
|
return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
|
|
157907
157935
|
}
|
|
157908
157936
|
default:
|
|
157909
|
-
return ts.Debug.assertNever(i, "Unexpected import kind "
|
|
157937
|
+
return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
|
|
157910
157938
|
}
|
|
157911
157939
|
}
|
|
157912
157940
|
function filterNamedBindings(namedBindings, keep) {
|
|
@@ -158021,7 +158049,7 @@ var ts;
|
|
|
158021
158049
|
case 200 /* ObjectBindingPattern */:
|
|
158022
158050
|
return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
|
|
158023
158051
|
default:
|
|
158024
|
-
return ts.Debug.assertNever(name, "Unexpected name kind "
|
|
158052
|
+
return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
|
|
158025
158053
|
}
|
|
158026
158054
|
}
|
|
158027
158055
|
function nameOfTopLevelDeclaration(d) {
|
|
@@ -158082,7 +158110,7 @@ var ts;
|
|
|
158082
158110
|
case 237 /* ExpressionStatement */:
|
|
158083
158111
|
return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
158084
158112
|
default:
|
|
158085
|
-
return ts.Debug.assertNever(d, "Unexpected declaration kind "
|
|
158113
|
+
return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
|
|
158086
158114
|
}
|
|
158087
158115
|
}
|
|
158088
158116
|
function addCommonjsExport(decl) {
|
|
@@ -158104,7 +158132,7 @@ var ts;
|
|
|
158104
158132
|
case 237 /* ExpressionStatement */:
|
|
158105
158133
|
return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
158106
158134
|
default:
|
|
158107
|
-
return ts.Debug.assertNever(decl, "Unexpected decl kind "
|
|
158135
|
+
return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
|
|
158108
158136
|
}
|
|
158109
158137
|
}
|
|
158110
158138
|
/** Creates `exports.x = x;` */
|
|
@@ -158742,7 +158770,7 @@ var ts;
|
|
|
158742
158770
|
return [functionDeclaration.name, functionDeclaration.parent.name];
|
|
158743
158771
|
return [functionDeclaration.parent.name];
|
|
158744
158772
|
default:
|
|
158745
|
-
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind "
|
|
158773
|
+
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
|
|
158746
158774
|
}
|
|
158747
158775
|
}
|
|
158748
158776
|
})(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
|
|
@@ -159446,7 +159474,7 @@ var ts;
|
|
|
159446
159474
|
var textPos = ts.scanner.getTextPos();
|
|
159447
159475
|
if (textPos <= end) {
|
|
159448
159476
|
if (token === 79 /* Identifier */) {
|
|
159449
|
-
ts.Debug.fail("Did not expect "
|
|
159477
|
+
ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
|
|
159450
159478
|
}
|
|
159451
159479
|
nodes.push(createNode(token, pos, textPos, parent));
|
|
159452
159480
|
}
|
|
@@ -160328,7 +160356,7 @@ var ts;
|
|
|
160328
160356
|
function getValidSourceFile(fileName) {
|
|
160329
160357
|
var sourceFile = program.getSourceFile(fileName);
|
|
160330
160358
|
if (!sourceFile) {
|
|
160331
|
-
var error = new Error("Could not find source file: '"
|
|
160359
|
+
var error = new Error("Could not find source file: '".concat(fileName, "'."));
|
|
160332
160360
|
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
|
160333
160361
|
// See https://github.com/microsoft/TypeScript/issues/30180.
|
|
160334
160362
|
error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
|
|
@@ -161003,7 +161031,7 @@ var ts;
|
|
|
161003
161031
|
var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
|
|
161004
161032
|
: ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
|
|
161005
161033
|
if (element && isUnclosedTag(element)) {
|
|
161006
|
-
return { newText: "</"
|
|
161034
|
+
return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
|
|
161007
161035
|
}
|
|
161008
161036
|
var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
|
|
161009
161037
|
: ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
|
|
@@ -161109,7 +161137,7 @@ var ts;
|
|
|
161109
161137
|
pos = commentRange.end + 1;
|
|
161110
161138
|
}
|
|
161111
161139
|
else { // If it's not in a comment range, then we need to comment the uncommented portions.
|
|
161112
|
-
var newPos = text.substring(pos, textRange.end).search("("
|
|
161140
|
+
var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
|
|
161113
161141
|
isCommenting = insertComment !== undefined
|
|
161114
161142
|
? insertComment
|
|
161115
161143
|
: isCommenting || !ts.isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); // If isCommenting is already true we don't need to check whitespace again.
|
|
@@ -161504,14 +161532,14 @@ var ts;
|
|
|
161504
161532
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
161505
161533
|
invalidOperationsInPartialSemanticMode.forEach(function (key) {
|
|
161506
161534
|
return ls[key] = function () {
|
|
161507
|
-
throw new Error("LanguageService Operation: "
|
|
161535
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
161508
161536
|
};
|
|
161509
161537
|
});
|
|
161510
161538
|
break;
|
|
161511
161539
|
case ts.LanguageServiceMode.Syntactic:
|
|
161512
161540
|
invalidOperationsInSyntacticMode.forEach(function (key) {
|
|
161513
161541
|
return ls[key] = function () {
|
|
161514
|
-
throw new Error("LanguageService Operation: "
|
|
161542
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
|
|
161515
161543
|
};
|
|
161516
161544
|
});
|
|
161517
161545
|
break;
|
|
@@ -162493,13 +162521,13 @@ var ts;
|
|
|
162493
162521
|
var result = action();
|
|
162494
162522
|
if (logPerformance) {
|
|
162495
162523
|
var end = ts.timestamp();
|
|
162496
|
-
logger.log(actionDescription
|
|
162524
|
+
logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
|
|
162497
162525
|
if (ts.isString(result)) {
|
|
162498
162526
|
var str = result;
|
|
162499
162527
|
if (str.length > 128) {
|
|
162500
162528
|
str = str.substring(0, 128) + "...";
|
|
162501
162529
|
}
|
|
162502
|
-
logger.log(" result.length="
|
|
162530
|
+
logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
|
|
162503
162531
|
}
|
|
162504
162532
|
}
|
|
162505
162533
|
return result;
|
|
@@ -162581,7 +162609,7 @@ var ts;
|
|
|
162581
162609
|
* Update the list of scripts known to the compiler
|
|
162582
162610
|
*/
|
|
162583
162611
|
LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
|
|
162584
|
-
this.forwardJSONCall("refresh("
|
|
162612
|
+
this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
|
|
162585
162613
|
);
|
|
162586
162614
|
};
|
|
162587
162615
|
LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
|
|
@@ -162597,43 +162625,43 @@ var ts;
|
|
|
162597
162625
|
};
|
|
162598
162626
|
LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
|
|
162599
162627
|
var _this = this;
|
|
162600
|
-
return this.forwardJSONCall("getSyntacticClassifications('"
|
|
162628
|
+
return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162601
162629
|
};
|
|
162602
162630
|
LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
|
|
162603
162631
|
var _this = this;
|
|
162604
|
-
return this.forwardJSONCall("getSemanticClassifications('"
|
|
162632
|
+
return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162605
162633
|
};
|
|
162606
162634
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
162607
162635
|
var _this = this;
|
|
162608
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('"
|
|
162636
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162609
162637
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162610
162638
|
// on the managed side versus a full JSON array.
|
|
162611
162639
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162612
162640
|
};
|
|
162613
162641
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
162614
162642
|
var _this = this;
|
|
162615
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('"
|
|
162643
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162616
162644
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162617
162645
|
// on the managed side versus a full JSON array.
|
|
162618
162646
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162619
162647
|
};
|
|
162620
162648
|
LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
|
|
162621
162649
|
var _this = this;
|
|
162622
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('"
|
|
162650
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
|
|
162623
162651
|
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
|
|
162624
162652
|
return _this.realizeDiagnostics(diagnostics);
|
|
162625
162653
|
});
|
|
162626
162654
|
};
|
|
162627
162655
|
LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
|
|
162628
162656
|
var _this = this;
|
|
162629
|
-
return this.forwardJSONCall("getSemanticDiagnostics('"
|
|
162657
|
+
return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
|
|
162630
162658
|
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
|
|
162631
162659
|
return _this.realizeDiagnostics(diagnostics);
|
|
162632
162660
|
});
|
|
162633
162661
|
};
|
|
162634
162662
|
LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
|
|
162635
162663
|
var _this = this;
|
|
162636
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('"
|
|
162664
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
|
|
162637
162665
|
};
|
|
162638
162666
|
LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
|
|
162639
162667
|
var _this = this;
|
|
@@ -162649,7 +162677,7 @@ var ts;
|
|
|
162649
162677
|
*/
|
|
162650
162678
|
LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
|
|
162651
162679
|
var _this = this;
|
|
162652
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('"
|
|
162680
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
|
|
162653
162681
|
};
|
|
162654
162682
|
/// NAMEORDOTTEDNAMESPAN
|
|
162655
162683
|
/**
|
|
@@ -162658,7 +162686,7 @@ var ts;
|
|
|
162658
162686
|
*/
|
|
162659
162687
|
LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
|
|
162660
162688
|
var _this = this;
|
|
162661
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('"
|
|
162689
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
|
|
162662
162690
|
};
|
|
162663
162691
|
/**
|
|
162664
162692
|
* STATEMENTSPAN
|
|
@@ -162666,12 +162694,12 @@ var ts;
|
|
|
162666
162694
|
*/
|
|
162667
162695
|
LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
|
|
162668
162696
|
var _this = this;
|
|
162669
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('"
|
|
162697
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
|
|
162670
162698
|
};
|
|
162671
162699
|
/// SIGNATUREHELP
|
|
162672
162700
|
LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
|
|
162673
162701
|
var _this = this;
|
|
162674
|
-
return this.forwardJSONCall("getSignatureHelpItems('"
|
|
162702
|
+
return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
|
|
162675
162703
|
};
|
|
162676
162704
|
/// GOTO DEFINITION
|
|
162677
162705
|
/**
|
|
@@ -162680,7 +162708,7 @@ var ts;
|
|
|
162680
162708
|
*/
|
|
162681
162709
|
LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
|
|
162682
162710
|
var _this = this;
|
|
162683
|
-
return this.forwardJSONCall("getDefinitionAtPosition('"
|
|
162711
|
+
return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
|
|
162684
162712
|
};
|
|
162685
162713
|
/**
|
|
162686
162714
|
* Computes the definition location and file for the symbol
|
|
@@ -162688,7 +162716,7 @@ var ts;
|
|
|
162688
162716
|
*/
|
|
162689
162717
|
LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
|
|
162690
162718
|
var _this = this;
|
|
162691
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('"
|
|
162719
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
|
|
162692
162720
|
};
|
|
162693
162721
|
/// GOTO Type
|
|
162694
162722
|
/**
|
|
@@ -162697,7 +162725,7 @@ var ts;
|
|
|
162697
162725
|
*/
|
|
162698
162726
|
LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
|
|
162699
162727
|
var _this = this;
|
|
162700
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('"
|
|
162728
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
|
|
162701
162729
|
};
|
|
162702
162730
|
/// GOTO Implementation
|
|
162703
162731
|
/**
|
|
@@ -162706,37 +162734,37 @@ var ts;
|
|
|
162706
162734
|
*/
|
|
162707
162735
|
LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
|
|
162708
162736
|
var _this = this;
|
|
162709
|
-
return this.forwardJSONCall("getImplementationAtPosition('"
|
|
162737
|
+
return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
|
|
162710
162738
|
};
|
|
162711
162739
|
LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
|
|
162712
162740
|
var _this = this;
|
|
162713
|
-
return this.forwardJSONCall("getRenameInfo('"
|
|
162741
|
+
return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
|
|
162714
162742
|
};
|
|
162715
162743
|
LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
|
|
162716
162744
|
var _this = this;
|
|
162717
|
-
return this.forwardJSONCall("getSmartSelectionRange('"
|
|
162745
|
+
return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
|
|
162718
162746
|
};
|
|
162719
162747
|
LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
162720
162748
|
var _this = this;
|
|
162721
|
-
return this.forwardJSONCall("findRenameLocations('"
|
|
162749
|
+
return this.forwardJSONCall("findRenameLocations('".concat(fileName, "', ").concat(position, ", ").concat(findInStrings, ", ").concat(findInComments, ", ").concat(providePrefixAndSuffixTextForRename, ")"), function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
|
|
162722
162750
|
};
|
|
162723
162751
|
/// GET BRACE MATCHING
|
|
162724
162752
|
LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
|
|
162725
162753
|
var _this = this;
|
|
162726
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('"
|
|
162754
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
|
|
162727
162755
|
};
|
|
162728
162756
|
LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
|
|
162729
162757
|
var _this = this;
|
|
162730
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('"
|
|
162758
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
|
|
162731
162759
|
};
|
|
162732
162760
|
LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
|
|
162733
162761
|
var _this = this;
|
|
162734
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('"
|
|
162762
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
|
|
162735
162763
|
};
|
|
162736
162764
|
/// GET SMART INDENT
|
|
162737
162765
|
LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
|
|
162738
162766
|
var _this = this;
|
|
162739
|
-
return this.forwardJSONCall("getIndentationAtPosition('"
|
|
162767
|
+
return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162740
162768
|
var localOptions = JSON.parse(options);
|
|
162741
162769
|
return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
|
162742
162770
|
});
|
|
@@ -162744,23 +162772,23 @@ var ts;
|
|
|
162744
162772
|
/// GET REFERENCES
|
|
162745
162773
|
LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
|
|
162746
162774
|
var _this = this;
|
|
162747
|
-
return this.forwardJSONCall("getReferencesAtPosition('"
|
|
162775
|
+
return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
|
|
162748
162776
|
};
|
|
162749
162777
|
LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
|
|
162750
162778
|
var _this = this;
|
|
162751
|
-
return this.forwardJSONCall("findReferences('"
|
|
162779
|
+
return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
|
|
162752
162780
|
};
|
|
162753
162781
|
LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
|
|
162754
162782
|
var _this = this;
|
|
162755
|
-
return this.forwardJSONCall("getFileReferences('"
|
|
162783
|
+
return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
|
|
162756
162784
|
};
|
|
162757
162785
|
LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
|
|
162758
162786
|
var _this = this;
|
|
162759
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('"
|
|
162787
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
|
|
162760
162788
|
};
|
|
162761
162789
|
LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
|
|
162762
162790
|
var _this = this;
|
|
162763
|
-
return this.forwardJSONCall("getDocumentHighlights('"
|
|
162791
|
+
return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162764
162792
|
var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
|
162765
162793
|
// workaround for VS document highlighting issue - keep only items from the initial file
|
|
162766
162794
|
var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
|
|
@@ -162775,108 +162803,108 @@ var ts;
|
|
|
162775
162803
|
*/
|
|
162776
162804
|
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences) {
|
|
162777
162805
|
var _this = this;
|
|
162778
|
-
return this.forwardJSONCall("getCompletionsAtPosition('"
|
|
162806
|
+
return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences); });
|
|
162779
162807
|
};
|
|
162780
162808
|
/** Get a string based representation of a completion list entry details */
|
|
162781
162809
|
LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
|
|
162782
162810
|
var _this = this;
|
|
162783
|
-
return this.forwardJSONCall("getCompletionEntryDetails('"
|
|
162811
|
+
return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
|
|
162784
162812
|
var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
|
|
162785
162813
|
return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
|
|
162786
162814
|
});
|
|
162787
162815
|
};
|
|
162788
162816
|
LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
|
|
162789
162817
|
var _this = this;
|
|
162790
|
-
return this.forwardJSONCall("getFormattingEditsForRange('"
|
|
162818
|
+
return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
|
|
162791
162819
|
var localOptions = JSON.parse(options);
|
|
162792
162820
|
return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
|
162793
162821
|
});
|
|
162794
162822
|
};
|
|
162795
162823
|
LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
|
|
162796
162824
|
var _this = this;
|
|
162797
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('"
|
|
162825
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
|
|
162798
162826
|
var localOptions = JSON.parse(options);
|
|
162799
162827
|
return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
|
162800
162828
|
});
|
|
162801
162829
|
};
|
|
162802
162830
|
LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
|
|
162803
162831
|
var _this = this;
|
|
162804
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"
|
|
162832
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
|
|
162805
162833
|
var localOptions = JSON.parse(options);
|
|
162806
162834
|
return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
|
162807
162835
|
});
|
|
162808
162836
|
};
|
|
162809
162837
|
LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
|
|
162810
162838
|
var _this = this;
|
|
162811
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('"
|
|
162839
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
|
|
162812
162840
|
};
|
|
162813
162841
|
/// NAVIGATE TO
|
|
162814
162842
|
/** Return a list of symbols that are interesting to navigate to */
|
|
162815
162843
|
LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
|
|
162816
162844
|
var _this = this;
|
|
162817
|
-
return this.forwardJSONCall("getNavigateToItems('"
|
|
162845
|
+
return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
|
|
162818
162846
|
};
|
|
162819
162847
|
LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
|
|
162820
162848
|
var _this = this;
|
|
162821
|
-
return this.forwardJSONCall("getNavigationBarItems('"
|
|
162849
|
+
return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
|
|
162822
162850
|
};
|
|
162823
162851
|
LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
|
|
162824
162852
|
var _this = this;
|
|
162825
|
-
return this.forwardJSONCall("getNavigationTree('"
|
|
162853
|
+
return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
|
|
162826
162854
|
};
|
|
162827
162855
|
LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
|
|
162828
162856
|
var _this = this;
|
|
162829
|
-
return this.forwardJSONCall("getOutliningSpans('"
|
|
162857
|
+
return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
|
|
162830
162858
|
};
|
|
162831
162859
|
LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
|
|
162832
162860
|
var _this = this;
|
|
162833
|
-
return this.forwardJSONCall("getTodoComments('"
|
|
162861
|
+
return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
|
|
162834
162862
|
};
|
|
162835
162863
|
/// CALL HIERARCHY
|
|
162836
162864
|
LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
|
|
162837
162865
|
var _this = this;
|
|
162838
|
-
return this.forwardJSONCall("prepareCallHierarchy('"
|
|
162866
|
+
return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
|
|
162839
162867
|
};
|
|
162840
162868
|
LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
|
|
162841
162869
|
var _this = this;
|
|
162842
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"
|
|
162870
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
|
|
162843
162871
|
};
|
|
162844
162872
|
LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
|
|
162845
162873
|
var _this = this;
|
|
162846
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"
|
|
162874
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
|
|
162847
162875
|
};
|
|
162848
162876
|
LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
|
|
162849
162877
|
var _this = this;
|
|
162850
|
-
return this.forwardJSONCall("provideInlayHints('"
|
|
162878
|
+
return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
|
|
162851
162879
|
};
|
|
162852
162880
|
/// Emit
|
|
162853
162881
|
LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
|
|
162854
162882
|
var _this = this;
|
|
162855
|
-
return this.forwardJSONCall("getEmitOutput('"
|
|
162883
|
+
return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
|
|
162856
162884
|
var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
162857
162885
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
162858
162886
|
});
|
|
162859
162887
|
};
|
|
162860
162888
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
162861
162889
|
var _this = this;
|
|
162862
|
-
return forwardCall(this.logger, "getEmitOutput('"
|
|
162890
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
162863
162891
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
162864
162892
|
};
|
|
162865
162893
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|
|
162866
162894
|
var _this = this;
|
|
162867
|
-
return this.forwardJSONCall("toggleLineComment('"
|
|
162895
|
+
return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
|
|
162868
162896
|
};
|
|
162869
162897
|
LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
|
|
162870
162898
|
var _this = this;
|
|
162871
|
-
return this.forwardJSONCall("toggleMultilineComment('"
|
|
162899
|
+
return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
|
|
162872
162900
|
};
|
|
162873
162901
|
LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
|
|
162874
162902
|
var _this = this;
|
|
162875
|
-
return this.forwardJSONCall("commentSelection('"
|
|
162903
|
+
return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
|
|
162876
162904
|
};
|
|
162877
162905
|
LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
|
|
162878
162906
|
var _this = this;
|
|
162879
|
-
return this.forwardJSONCall("uncommentSelection('"
|
|
162907
|
+
return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
|
|
162880
162908
|
};
|
|
162881
162909
|
return LanguageServiceShimObject;
|
|
162882
162910
|
}(ShimBase));
|
|
@@ -162926,7 +162954,7 @@ var ts;
|
|
|
162926
162954
|
};
|
|
162927
162955
|
CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
|
|
162928
162956
|
var _this = this;
|
|
162929
|
-
return this.forwardJSONCall("resolveModuleName('"
|
|
162957
|
+
return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
|
|
162930
162958
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162931
162959
|
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162932
162960
|
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
|
|
@@ -162941,7 +162969,7 @@ var ts;
|
|
|
162941
162969
|
};
|
|
162942
162970
|
CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
|
|
162943
162971
|
var _this = this;
|
|
162944
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective("
|
|
162972
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
|
|
162945
162973
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162946
162974
|
var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162947
162975
|
return {
|
|
@@ -162953,7 +162981,7 @@ var ts;
|
|
|
162953
162981
|
};
|
|
162954
162982
|
CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162955
162983
|
var _this = this;
|
|
162956
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('"
|
|
162984
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
|
|
162957
162985
|
// for now treat files as JavaScript
|
|
162958
162986
|
var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
|
162959
162987
|
return {
|
|
@@ -162968,7 +162996,7 @@ var ts;
|
|
|
162968
162996
|
};
|
|
162969
162997
|
CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
|
|
162970
162998
|
var _this = this;
|
|
162971
|
-
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"
|
|
162999
|
+
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
|
|
162972
163000
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162973
163001
|
return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
|
|
162974
163002
|
});
|
|
@@ -162990,7 +163018,7 @@ var ts;
|
|
|
162990
163018
|
};
|
|
162991
163019
|
CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162992
163020
|
var _this = this;
|
|
162993
|
-
return this.forwardJSONCall("getTSConfigFileInfo('"
|
|
163021
|
+
return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
|
|
162994
163022
|
var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
|
|
162995
163023
|
var normalizedFileName = ts.normalizeSlashes(fileName);
|
|
162996
163024
|
var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
|
|
@@ -163180,7 +163208,7 @@ var ts;
|
|
|
163180
163208
|
}
|
|
163181
163209
|
Errors.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled;
|
|
163182
163210
|
function ThrowProjectDoesNotContainDocument(fileName, project) {
|
|
163183
|
-
throw new Error("Project '"
|
|
163211
|
+
throw new Error("Project '".concat(project.getProjectName(), "' does not contain document '").concat(fileName, "'"));
|
|
163184
163212
|
}
|
|
163185
163213
|
Errors.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
|
|
163186
163214
|
})(Errors = server.Errors || (server.Errors = {}));
|
|
@@ -163221,12 +163249,12 @@ var ts;
|
|
|
163221
163249
|
}
|
|
163222
163250
|
server.isInferredProjectName = isInferredProjectName;
|
|
163223
163251
|
function makeInferredProjectName(counter) {
|
|
163224
|
-
return "/dev/null/inferredProject"
|
|
163252
|
+
return "/dev/null/inferredProject".concat(counter, "*");
|
|
163225
163253
|
}
|
|
163226
163254
|
server.makeInferredProjectName = makeInferredProjectName;
|
|
163227
163255
|
/*@internal*/
|
|
163228
163256
|
function makeAutoImportProviderProjectName(counter) {
|
|
163229
|
-
return "/dev/null/autoImportProviderProject"
|
|
163257
|
+
return "/dev/null/autoImportProviderProject".concat(counter, "*");
|
|
163230
163258
|
}
|
|
163231
163259
|
server.makeAutoImportProviderProjectName = makeAutoImportProviderProjectName;
|
|
163232
163260
|
function createSortedArray() {
|
|
@@ -163261,7 +163289,7 @@ var ts;
|
|
|
163261
163289
|
// schedule new operation, pass arguments
|
|
163262
163290
|
this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, this, operationId, cb));
|
|
163263
163291
|
if (this.logger) {
|
|
163264
|
-
this.logger.info("Scheduled: "
|
|
163292
|
+
this.logger.info("Scheduled: ".concat(operationId).concat(pendingTimeout ? ", Cancelled earlier one" : ""));
|
|
163265
163293
|
}
|
|
163266
163294
|
};
|
|
163267
163295
|
ThrottledOperations.prototype.cancel = function (operationId) {
|
|
@@ -163275,7 +163303,7 @@ var ts;
|
|
|
163275
163303
|
ts.perfLogger.logStartScheduledOperation(operationId);
|
|
163276
163304
|
self.pendingTimeouts.delete(operationId);
|
|
163277
163305
|
if (self.logger) {
|
|
163278
|
-
self.logger.info("Running: "
|
|
163306
|
+
self.logger.info("Running: ".concat(operationId));
|
|
163279
163307
|
}
|
|
163280
163308
|
cb();
|
|
163281
163309
|
ts.perfLogger.logStopScheduledOperation();
|
|
@@ -163304,7 +163332,7 @@ var ts;
|
|
|
163304
163332
|
self.host.gc(); // TODO: GH#18217
|
|
163305
163333
|
if (log) {
|
|
163306
163334
|
var after = self.host.getMemoryUsage(); // TODO: GH#18217
|
|
163307
|
-
self.logger.perftrc("GC::before "
|
|
163335
|
+
self.logger.perftrc("GC::before ".concat(before, ", after ").concat(after));
|
|
163308
163336
|
}
|
|
163309
163337
|
ts.perfLogger.logStopScheduledOperation();
|
|
163310
163338
|
};
|
|
@@ -163656,8 +163684,8 @@ var ts;
|
|
|
163656
163684
|
}
|
|
163657
163685
|
TextStorage.prototype.getVersion = function () {
|
|
163658
163686
|
return this.svc
|
|
163659
|
-
? "SVC-"
|
|
163660
|
-
: "Text-"
|
|
163687
|
+
? "SVC-".concat(this.version.svc, "-").concat(this.svc.getSnapshotVersion())
|
|
163688
|
+
: "Text-".concat(this.version.text);
|
|
163661
163689
|
};
|
|
163662
163690
|
TextStorage.prototype.hasScriptVersionCache_TestOnly = function () {
|
|
163663
163691
|
return this.svc !== undefined;
|
|
@@ -163800,7 +163828,7 @@ var ts;
|
|
|
163800
163828
|
if (fileSize > server.maxFileSize) {
|
|
163801
163829
|
ts.Debug.assert(!!this.info.containingProjects.length);
|
|
163802
163830
|
var service = this.info.containingProjects[0].projectService;
|
|
163803
|
-
service.logger.info("Skipped loading contents of large file "
|
|
163831
|
+
service.logger.info("Skipped loading contents of large file ".concat(fileName, " for info ").concat(this.info.fileName, ": fileSize: ").concat(fileSize));
|
|
163804
163832
|
this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize);
|
|
163805
163833
|
return { text: "", fileSize: fileSize };
|
|
163806
163834
|
}
|
|
@@ -164176,14 +164204,14 @@ var ts;
|
|
|
164176
164204
|
return project;
|
|
164177
164205
|
}
|
|
164178
164206
|
function failIfInvalidPosition(position) {
|
|
164179
|
-
ts.Debug.assert(typeof position === "number", "Expected position "
|
|
164207
|
+
ts.Debug.assert(typeof position === "number", "Expected position ".concat(position, " to be a number."));
|
|
164180
164208
|
ts.Debug.assert(position >= 0, "Expected position to be non-negative.");
|
|
164181
164209
|
}
|
|
164182
164210
|
function failIfInvalidLocation(location) {
|
|
164183
|
-
ts.Debug.assert(typeof location.line === "number", "Expected line "
|
|
164184
|
-
ts.Debug.assert(typeof location.offset === "number", "Expected offset "
|
|
164185
|
-
ts.Debug.assert(location.line > 0, "Expected line to be non-"
|
|
164186
|
-
ts.Debug.assert(location.offset > 0, "Expected offset to be non-"
|
|
164211
|
+
ts.Debug.assert(typeof location.line === "number", "Expected line ".concat(location.line, " to be a number."));
|
|
164212
|
+
ts.Debug.assert(typeof location.offset === "number", "Expected offset ".concat(location.offset, " to be a number."));
|
|
164213
|
+
ts.Debug.assert(location.line > 0, "Expected line to be non-".concat(location.line === 0 ? "zero" : "negative"));
|
|
164214
|
+
ts.Debug.assert(location.offset > 0, "Expected offset to be non-".concat(location.offset === 0 ? "zero" : "negative"));
|
|
164187
164215
|
}
|
|
164188
164216
|
})(server = ts.server || (ts.server = {}));
|
|
164189
164217
|
})(ts || (ts = {}));
|
|
@@ -164495,11 +164523,11 @@ var ts;
|
|
|
164495
164523
|
};
|
|
164496
164524
|
Project.resolveModule = function (moduleName, initialDir, host, log, logErrors) {
|
|
164497
164525
|
var resolvedPath = ts.normalizeSlashes(host.resolvePath(ts.combinePaths(initialDir, "node_modules")));
|
|
164498
|
-
log("Loading "
|
|
164526
|
+
log("Loading ".concat(moduleName, " from ").concat(initialDir, " (resolved to ").concat(resolvedPath, ")"));
|
|
164499
164527
|
var result = host.require(resolvedPath, moduleName); // TODO: GH#18217
|
|
164500
164528
|
if (result.error) {
|
|
164501
164529
|
var err = result.error.stack || result.error.message || JSON.stringify(result.error);
|
|
164502
|
-
(logErrors || log)("Failed to load module '"
|
|
164530
|
+
(logErrors || log)("Failed to load module '".concat(moduleName, "' from ").concat(resolvedPath, ": ").concat(err));
|
|
164503
164531
|
return undefined;
|
|
164504
164532
|
}
|
|
164505
164533
|
return result.module;
|
|
@@ -164647,12 +164675,12 @@ var ts;
|
|
|
164647
164675
|
};
|
|
164648
164676
|
/*@internal*/
|
|
164649
164677
|
Project.prototype.clearInvalidateResolutionOfFailedLookupTimer = function () {
|
|
164650
|
-
return this.projectService.throttledOperations.cancel(this.getProjectName()
|
|
164678
|
+
return this.projectService.throttledOperations.cancel("".concat(this.getProjectName(), "FailedLookupInvalidation"));
|
|
164651
164679
|
};
|
|
164652
164680
|
/*@internal*/
|
|
164653
164681
|
Project.prototype.scheduleInvalidateResolutionsOfFailedLookupLocations = function () {
|
|
164654
164682
|
var _this = this;
|
|
164655
|
-
this.projectService.throttledOperations.schedule(this.getProjectName()
|
|
164683
|
+
this.projectService.throttledOperations.schedule("".concat(this.getProjectName(), "FailedLookupInvalidation"), /*delay*/ 1000, function () {
|
|
164656
164684
|
if (_this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) {
|
|
164657
164685
|
_this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(_this);
|
|
164658
164686
|
}
|
|
@@ -164830,7 +164858,7 @@ var ts;
|
|
|
164830
164858
|
return plugin.module.getExternalFiles(_this);
|
|
164831
164859
|
}
|
|
164832
164860
|
catch (e) {
|
|
164833
|
-
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: "
|
|
164861
|
+
_this.projectService.logger.info("A plugin threw an exception in getExternalFiles: ".concat(e));
|
|
164834
164862
|
if (e.stack) {
|
|
164835
164863
|
_this.projectService.logger.info(e.stack);
|
|
164836
164864
|
}
|
|
@@ -164933,7 +164961,7 @@ var ts;
|
|
|
164933
164961
|
}
|
|
164934
164962
|
return ts.map(this.program.getSourceFiles(), function (sourceFile) {
|
|
164935
164963
|
var scriptInfo = _this.projectService.getScriptInfoForPath(sourceFile.resolvedPath);
|
|
164936
|
-
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '"
|
|
164964
|
+
ts.Debug.assert(!!scriptInfo, "getScriptInfo", function () { return "scriptInfo for a file '".concat(sourceFile.fileName, "' Path: '").concat(sourceFile.path, "' / '").concat(sourceFile.resolvedPath, "' is missing."); });
|
|
164937
164965
|
return scriptInfo;
|
|
164938
164966
|
});
|
|
164939
164967
|
};
|
|
@@ -165176,7 +165204,7 @@ var ts;
|
|
|
165176
165204
|
var _this = this;
|
|
165177
165205
|
var oldProgram = this.program;
|
|
165178
165206
|
ts.Debug.assert(!this.isClosed(), "Called update graph worker of closed project");
|
|
165179
|
-
this.writeLog("Starting updateGraphWorker: Project: "
|
|
165207
|
+
this.writeLog("Starting updateGraphWorker: Project: ".concat(this.getProjectName()));
|
|
165180
165208
|
var start = ts.timestamp();
|
|
165181
165209
|
this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution();
|
|
165182
165210
|
this.resolutionCache.startCachingPerDirectoryResolution();
|
|
@@ -165278,7 +165306,7 @@ var ts;
|
|
|
165278
165306
|
}, function (removed) { return _this.detachScriptInfoFromProject(removed); });
|
|
165279
165307
|
var elapsed = ts.timestamp() - start;
|
|
165280
165308
|
this.sendPerformanceEvent("UpdateGraph", elapsed);
|
|
165281
|
-
this.writeLog("Finishing updateGraphWorker: Project: "
|
|
165309
|
+
this.writeLog("Finishing updateGraphWorker: Project: ".concat(this.getProjectName(), " Version: ").concat(this.getProjectVersion(), " structureChanged: ").concat(hasNewProgram).concat(this.program ? " structureIsReused:: ".concat(ts.StructureIsReused[this.program.structureIsReused]) : "", " Elapsed: ").concat(elapsed, "ms"));
|
|
165282
165310
|
if (this.hasAddedorRemovedFiles) {
|
|
165283
165311
|
this.print(/*writeProjectFileNames*/ true);
|
|
165284
165312
|
}
|
|
@@ -165338,7 +165366,7 @@ var ts;
|
|
|
165338
165366
|
var path = this.toPath(sourceFile);
|
|
165339
165367
|
if (this.generatedFilesMap) {
|
|
165340
165368
|
if (isGeneratedFileWatcher(this.generatedFilesMap)) {
|
|
165341
|
-
ts.Debug.fail(this.projectName
|
|
165369
|
+
ts.Debug.fail("".concat(this.projectName, " Expected to not have --out watcher for generated file with options: ").concat(JSON.stringify(this.compilerOptions)));
|
|
165342
165370
|
return;
|
|
165343
165371
|
}
|
|
165344
165372
|
if (this.generatedFilesMap.has(path))
|
|
@@ -165390,20 +165418,20 @@ var ts;
|
|
|
165390
165418
|
if (!this.program)
|
|
165391
165419
|
return "\tFiles (0) NoProgram\n";
|
|
165392
165420
|
var sourceFiles = this.program.getSourceFiles();
|
|
165393
|
-
var strBuilder = "\tFiles ("
|
|
165421
|
+
var strBuilder = "\tFiles (".concat(sourceFiles.length, ")\n");
|
|
165394
165422
|
if (writeProjectFileNames) {
|
|
165395
165423
|
for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) {
|
|
165396
165424
|
var file = sourceFiles_1[_i];
|
|
165397
|
-
strBuilder += "\t"
|
|
165425
|
+
strBuilder += "\t".concat(file.fileName, "\n");
|
|
165398
165426
|
}
|
|
165399
165427
|
strBuilder += "\n\n";
|
|
165400
|
-
ts.explainFiles(this.program, function (s) { return strBuilder += "\t"
|
|
165428
|
+
ts.explainFiles(this.program, function (s) { return strBuilder += "\t".concat(s, "\n"); });
|
|
165401
165429
|
}
|
|
165402
165430
|
return strBuilder;
|
|
165403
165431
|
};
|
|
165404
165432
|
/*@internal*/
|
|
165405
165433
|
Project.prototype.print = function (writeProjectFileNames) {
|
|
165406
|
-
this.writeLog("Project '"
|
|
165434
|
+
this.writeLog("Project '".concat(this.projectName, "' (").concat(ProjectKind[this.projectKind], ")"));
|
|
165407
165435
|
this.writeLog(this.filesToString(writeProjectFileNames && this.projectService.logger.hasLevel(server.LogLevel.verbose)));
|
|
165408
165436
|
this.writeLog("-----------------------------------------------");
|
|
165409
165437
|
if (this.autoImportProviderHost) {
|
|
@@ -165565,7 +165593,7 @@ var ts;
|
|
|
165565
165593
|
if (options.plugins && options.plugins.some(function (p) { return p.name === globalPluginName; }))
|
|
165566
165594
|
return "continue";
|
|
165567
165595
|
// Provide global: true so plugins can detect why they can't find their config
|
|
165568
|
-
this_1.projectService.logger.info("Loading global plugin "
|
|
165596
|
+
this_1.projectService.logger.info("Loading global plugin ".concat(globalPluginName));
|
|
165569
165597
|
this_1.enablePlugin({ name: globalPluginName, global: true }, searchPaths, pluginConfigOverrides);
|
|
165570
165598
|
};
|
|
165571
165599
|
var this_1 = this;
|
|
@@ -165578,9 +165606,9 @@ var ts;
|
|
|
165578
165606
|
};
|
|
165579
165607
|
Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) {
|
|
165580
165608
|
var _this = this;
|
|
165581
|
-
this.projectService.logger.info("Enabling plugin "
|
|
165609
|
+
this.projectService.logger.info("Enabling plugin ".concat(pluginConfigEntry.name, " from candidate paths: ").concat(searchPaths.join(",")));
|
|
165582
165610
|
if (!pluginConfigEntry.name || ts.parsePackageName(pluginConfigEntry.name).rest) {
|
|
165583
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
165611
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(pluginConfigEntry.name || JSON.stringify(pluginConfigEntry), " because only package name is allowed plugin name"));
|
|
165584
165612
|
return;
|
|
165585
165613
|
}
|
|
165586
165614
|
var log = function (message) { return _this.projectService.logger.info(message); };
|
|
@@ -165603,13 +165631,13 @@ var ts;
|
|
|
165603
165631
|
}
|
|
165604
165632
|
else {
|
|
165605
165633
|
ts.forEach(errorLogs, log);
|
|
165606
|
-
this.projectService.logger.info("Couldn't find "
|
|
165634
|
+
this.projectService.logger.info("Couldn't find ".concat(pluginConfigEntry.name));
|
|
165607
165635
|
}
|
|
165608
165636
|
};
|
|
165609
165637
|
Project.prototype.enableProxy = function (pluginModuleFactory, configEntry) {
|
|
165610
165638
|
try {
|
|
165611
165639
|
if (typeof pluginModuleFactory !== "function") {
|
|
165612
|
-
this.projectService.logger.info("Skipped loading plugin "
|
|
165640
|
+
this.projectService.logger.info("Skipped loading plugin ".concat(configEntry.name, " because it did not expose a proper factory function"));
|
|
165613
165641
|
return;
|
|
165614
165642
|
}
|
|
165615
165643
|
var info = {
|
|
@@ -165626,7 +165654,7 @@ var ts;
|
|
|
165626
165654
|
var k = _a[_i];
|
|
165627
165655
|
// eslint-disable-next-line no-in-operator
|
|
165628
165656
|
if (!(k in newLS)) {
|
|
165629
|
-
this.projectService.logger.info("Plugin activation warning: Missing proxied method "
|
|
165657
|
+
this.projectService.logger.info("Plugin activation warning: Missing proxied method ".concat(k, " in created LS. Patching."));
|
|
165630
165658
|
newLS[k] = this.languageService[k];
|
|
165631
165659
|
}
|
|
165632
165660
|
}
|
|
@@ -165635,7 +165663,7 @@ var ts;
|
|
|
165635
165663
|
this.plugins.push({ name: configEntry.name, module: pluginModule });
|
|
165636
165664
|
}
|
|
165637
165665
|
catch (e) {
|
|
165638
|
-
this.projectService.logger.info("Plugin activation failed: "
|
|
165666
|
+
this.projectService.logger.info("Plugin activation failed: ".concat(e));
|
|
165639
165667
|
}
|
|
165640
165668
|
};
|
|
165641
165669
|
/*@internal*/
|
|
@@ -166150,7 +166178,7 @@ var ts;
|
|
|
166150
166178
|
var searchPaths = __spreadArray([ts.combinePaths(this.projectService.getExecutingFilePath(), "../../..")], this.projectService.pluginProbeLocations, true);
|
|
166151
166179
|
if (this.projectService.allowLocalPluginLoads) {
|
|
166152
166180
|
var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
|
|
166153
|
-
this.projectService.logger.info("Local plugin loading enabled; adding "
|
|
166181
|
+
this.projectService.logger.info("Local plugin loading enabled; adding ".concat(local, " to search paths"));
|
|
166154
166182
|
searchPaths.unshift(local);
|
|
166155
166183
|
}
|
|
166156
166184
|
// Enable tsconfig-specified plugins
|
|
@@ -166576,7 +166604,7 @@ var ts;
|
|
|
166576
166604
|
return forEachAnyProjectReferenceKind(project, function (resolvedRef) { return callbackRefProject(project, cb, resolvedRef.sourceFile.path); }, function (projectRef) { return callbackRefProject(project, cb, project.toPath(ts.resolveProjectReferencePath(projectRef))); }, function (potentialProjectRef) { return callbackRefProject(project, cb, potentialProjectRef); });
|
|
166577
166605
|
}
|
|
166578
166606
|
function getDetailWatchInfo(watchType, project) {
|
|
166579
|
-
return (ts.isString(project) ? "Config: "
|
|
166607
|
+
return "".concat(ts.isString(project) ? "Config: ".concat(project, " ") : project ? "Project: ".concat(project.getProjectName(), " ") : "", "WatchType: ").concat(watchType);
|
|
166580
166608
|
}
|
|
166581
166609
|
function isScriptInfoWatchedFromNodeModules(info) {
|
|
166582
166610
|
return !info.isScriptOpen() && info.mTime !== undefined;
|
|
@@ -166781,7 +166809,7 @@ var ts;
|
|
|
166781
166809
|
try {
|
|
166782
166810
|
var fileContent = this.host.readFile(this.typesMapLocation); // TODO: GH#18217
|
|
166783
166811
|
if (fileContent === undefined) {
|
|
166784
|
-
this.logger.info("Provided types map file \""
|
|
166812
|
+
this.logger.info("Provided types map file \"".concat(this.typesMapLocation, "\" doesn't exist"));
|
|
166785
166813
|
return;
|
|
166786
166814
|
}
|
|
166787
166815
|
var raw = JSON.parse(fileContent);
|
|
@@ -166799,7 +166827,7 @@ var ts;
|
|
|
166799
166827
|
}
|
|
166800
166828
|
}
|
|
166801
166829
|
catch (e) {
|
|
166802
|
-
this.logger.info("Error loading types map: "
|
|
166830
|
+
this.logger.info("Error loading types map: ".concat(e));
|
|
166803
166831
|
this.safelist = defaultTypeSafeList;
|
|
166804
166832
|
this.legacySafelist.clear();
|
|
166805
166833
|
}
|
|
@@ -167121,7 +167149,7 @@ var ts;
|
|
|
167121
167149
|
var fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
167122
167150
|
if (ts.getBaseFileName(fileOrDirectoryPath) === "package.json" && !ts.isInsideNodeModules(fileOrDirectoryPath) &&
|
|
167123
167151
|
(fsResult && fsResult.fileExists || !fsResult && _this.host.fileExists(fileOrDirectoryPath))) {
|
|
167124
|
-
_this.logger.info("Config: "
|
|
167152
|
+
_this.logger.info("Config: ".concat(configFileName, " Detected new package.json: ").concat(fileOrDirectory));
|
|
167125
167153
|
_this.onAddPackageJson(fileOrDirectoryPath);
|
|
167126
167154
|
}
|
|
167127
167155
|
var configuredProjectForConfig = _this.findConfiguredProjectByProjectName(configFileName);
|
|
@@ -167244,13 +167272,13 @@ var ts;
|
|
|
167244
167272
|
project.print(/*writeProjectFileNames*/ true);
|
|
167245
167273
|
project.close();
|
|
167246
167274
|
if (ts.Debug.shouldAssert(1 /* Normal */)) {
|
|
167247
|
-
this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return project.projectName
|
|
167275
|
+
this.filenameToScriptInfo.forEach(function (info) { return ts.Debug.assert(!info.isAttached(project), "Found script Info still attached to project", function () { return "".concat(project.projectName, ": ScriptInfos still attached: ").concat(JSON.stringify(ts.arrayFrom(ts.mapDefinedIterator(_this.filenameToScriptInfo.values(), function (info) { return info.isAttached(project) ?
|
|
167248
167276
|
{
|
|
167249
167277
|
fileName: info.fileName,
|
|
167250
167278
|
projects: info.containingProjects.map(function (p) { return p.projectName; }),
|
|
167251
167279
|
hasMixedContent: info.hasMixedContent
|
|
167252
167280
|
} : undefined; })),
|
|
167253
|
-
/*replacer*/ undefined, " "); }); });
|
|
167281
|
+
/*replacer*/ undefined, " ")); }); });
|
|
167254
167282
|
}
|
|
167255
167283
|
// Remove the project from pending project updates
|
|
167256
167284
|
this.pendingProjectUpdates.delete(project.getProjectName());
|
|
@@ -167651,15 +167679,15 @@ var ts;
|
|
|
167651
167679
|
if (result !== undefined)
|
|
167652
167680
|
return result || undefined;
|
|
167653
167681
|
}
|
|
167654
|
-
this.logger.info("Search path: "
|
|
167682
|
+
this.logger.info("Search path: ".concat(ts.getDirectoryPath(info.fileName)));
|
|
167655
167683
|
var configFileName = this.forEachConfigFileLocation(info, function (canonicalConfigFilePath, configFileName) {
|
|
167656
167684
|
return _this.configFileExists(configFileName, canonicalConfigFilePath, info);
|
|
167657
167685
|
});
|
|
167658
167686
|
if (configFileName) {
|
|
167659
|
-
this.logger.info("For info: "
|
|
167687
|
+
this.logger.info("For info: ".concat(info.fileName, " :: Config file name: ").concat(configFileName));
|
|
167660
167688
|
}
|
|
167661
167689
|
else {
|
|
167662
|
-
this.logger.info("For info: "
|
|
167690
|
+
this.logger.info("For info: ".concat(info.fileName, " :: No config files found."));
|
|
167663
167691
|
}
|
|
167664
167692
|
if (isOpenScriptInfo(info)) {
|
|
167665
167693
|
this.configFileForOpenFiles.set(info.path, configFileName || false);
|
|
@@ -167678,8 +167706,8 @@ var ts;
|
|
|
167678
167706
|
this.logger.info("Open files: ");
|
|
167679
167707
|
this.openFiles.forEach(function (projectRootPath, path) {
|
|
167680
167708
|
var info = _this.getScriptInfoForPath(path);
|
|
167681
|
-
_this.logger.info("\tFileName: "
|
|
167682
|
-
_this.logger.info("\t\tProjects: "
|
|
167709
|
+
_this.logger.info("\tFileName: ".concat(info.fileName, " ProjectRootPath: ").concat(projectRootPath));
|
|
167710
|
+
_this.logger.info("\t\tProjects: ".concat(info.containingProjects.map(function (p) { return p.getProjectName(); })));
|
|
167683
167711
|
});
|
|
167684
167712
|
this.logger.endGroup();
|
|
167685
167713
|
};
|
|
@@ -167718,7 +167746,7 @@ var ts;
|
|
|
167718
167746
|
.map(function (name) { return ({ name: name, size: _this.host.getFileSize(name) }); })
|
|
167719
167747
|
.sort(function (a, b) { return b.size - a.size; })
|
|
167720
167748
|
.slice(0, 5);
|
|
167721
|
-
this.logger.info("Non TS file size exceeded limit ("
|
|
167749
|
+
this.logger.info("Non TS file size exceeded limit (".concat(totalNonTsFileSize, "). Largest files: ").concat(top5LargestFiles.map(function (file) { return "".concat(file.name, ":").concat(file.size); }).join(", ")));
|
|
167722
167750
|
// Keep the size as zero since it's disabled
|
|
167723
167751
|
return fileName;
|
|
167724
167752
|
}
|
|
@@ -167787,7 +167815,7 @@ var ts;
|
|
|
167787
167815
|
};
|
|
167788
167816
|
/* @internal */
|
|
167789
167817
|
ProjectService.prototype.createConfiguredProject = function (configFileName) {
|
|
167790
|
-
this.logger.info("Creating configuration project "
|
|
167818
|
+
this.logger.info("Creating configuration project ".concat(configFileName));
|
|
167791
167819
|
var canonicalConfigFilePath = server.asNormalizedPath(this.toCanonicalFileName(configFileName));
|
|
167792
167820
|
var configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
|
167793
167821
|
// We could be in this scenario if project is the configured project tracked by external project
|
|
@@ -167898,12 +167926,12 @@ var ts;
|
|
|
167898
167926
|
if (parsedCommandLine.errors.length) {
|
|
167899
167927
|
configFileErrors.push.apply(configFileErrors, parsedCommandLine.errors);
|
|
167900
167928
|
}
|
|
167901
|
-
this.logger.info("Config: "
|
|
167929
|
+
this.logger.info("Config: ".concat(configFilename, " : ").concat(JSON.stringify({
|
|
167902
167930
|
rootNames: parsedCommandLine.fileNames,
|
|
167903
167931
|
options: parsedCommandLine.options,
|
|
167904
167932
|
watchOptions: parsedCommandLine.watchOptions,
|
|
167905
167933
|
projectReferences: parsedCommandLine.projectReferences
|
|
167906
|
-
}, /*replacer*/ undefined, " "));
|
|
167934
|
+
}, /*replacer*/ undefined, " ")));
|
|
167907
167935
|
var oldCommandLine = (_b = configFileExistenceInfo.config) === null || _b === void 0 ? void 0 : _b.parsedCommandLine;
|
|
167908
167936
|
if (!configFileExistenceInfo.config) {
|
|
167909
167937
|
configFileExistenceInfo.config = { parsedCommandLine: parsedCommandLine, cachedDirectoryStructureHost: cachedDirectoryStructureHost, projects: new ts.Map() };
|
|
@@ -167933,7 +167961,7 @@ var ts;
|
|
|
167933
167961
|
// Update projects
|
|
167934
167962
|
var ensureProjectsForOpenFiles = false;
|
|
167935
167963
|
(_a = _this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (canonicalPath) {
|
|
167936
|
-
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file "
|
|
167964
|
+
ensureProjectsForOpenFiles = _this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, "Change in extended config file ".concat(extendedConfigFileName, " detected")) || ensureProjectsForOpenFiles;
|
|
167937
167965
|
});
|
|
167938
167966
|
if (ensureProjectsForOpenFiles)
|
|
167939
167967
|
_this.delayEnsureProjectForOpenFiles();
|
|
@@ -168089,7 +168117,7 @@ var ts;
|
|
|
168089
168117
|
// Clear the cache since we are reloading the project from disk
|
|
168090
168118
|
host.clearCache();
|
|
168091
168119
|
var configFileName = project.getConfigFilePath();
|
|
168092
|
-
this.logger.info((isInitialLoad ? "Loading" : "Reloading"
|
|
168120
|
+
this.logger.info("".concat(isInitialLoad ? "Loading" : "Reloading", " configured project ").concat(configFileName));
|
|
168093
168121
|
// Load project from the disk
|
|
168094
168122
|
this.loadConfiguredProject(project, reason);
|
|
168095
168123
|
project.updateGraph();
|
|
@@ -168228,7 +168256,7 @@ var ts;
|
|
|
168228
168256
|
var path = _a[0], scriptInfo = _a[1];
|
|
168229
168257
|
return ({ path: path, fileName: scriptInfo.fileName });
|
|
168230
168258
|
});
|
|
168231
|
-
this.logger.msg("Could not find file "
|
|
168259
|
+
this.logger.msg("Could not find file ".concat(JSON.stringify(fileName), ".\nAll files are: ").concat(JSON.stringify(names)), server.Msg.Err);
|
|
168232
168260
|
};
|
|
168233
168261
|
/**
|
|
168234
168262
|
* Returns the projects that contain script info through SymLink
|
|
@@ -168412,9 +168440,9 @@ var ts;
|
|
|
168412
168440
|
var info = this.getScriptInfoForPath(path);
|
|
168413
168441
|
if (!info) {
|
|
168414
168442
|
var isDynamic = server.isDynamicFileName(fileName);
|
|
168415
|
-
ts.Debug.assert(ts.isRootedDiskPath(fileName) || isDynamic || openedByClient, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
168416
|
-
ts.Debug.assert(!ts.isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
168417
|
-
ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) })
|
|
168443
|
+
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"); });
|
|
168444
|
+
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"); });
|
|
168445
|
+
ts.Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", function () { return "".concat(JSON.stringify({ fileName: fileName, currentDirectory: currentDirectory, hostCurrentDirectory: _this.currentDirectory, openKeys: ts.arrayFrom(_this.openFilesWithNonRootedDiskPath.keys()) }), "\nDynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath."); });
|
|
168418
168446
|
// If the file is not opened by client and the file doesnot exist on the disk, return
|
|
168419
168447
|
if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
|
|
168420
168448
|
return;
|
|
@@ -168593,13 +168621,13 @@ var ts;
|
|
|
168593
168621
|
var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file));
|
|
168594
168622
|
if (info) {
|
|
168595
168623
|
info.setOptions(convertFormatOptions(args.formatOptions), args.preferences);
|
|
168596
|
-
this.logger.info("Host configuration update for file "
|
|
168624
|
+
this.logger.info("Host configuration update for file ".concat(args.file));
|
|
168597
168625
|
}
|
|
168598
168626
|
}
|
|
168599
168627
|
else {
|
|
168600
168628
|
if (args.hostInfo !== undefined) {
|
|
168601
168629
|
this.hostConfiguration.hostInfo = args.hostInfo;
|
|
168602
|
-
this.logger.info("Host information "
|
|
168630
|
+
this.logger.info("Host information ".concat(args.hostInfo));
|
|
168603
168631
|
}
|
|
168604
168632
|
if (args.formatOptions) {
|
|
168605
168633
|
this.hostConfiguration.formatCodeOptions = __assign(__assign({}, this.hostConfiguration.formatCodeOptions), convertFormatOptions(args.formatOptions));
|
|
@@ -168631,7 +168659,7 @@ var ts;
|
|
|
168631
168659
|
}
|
|
168632
168660
|
if (args.watchOptions) {
|
|
168633
168661
|
this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions;
|
|
168634
|
-
this.logger.info("Host watch options changed to "
|
|
168662
|
+
this.logger.info("Host watch options changed to ".concat(JSON.stringify(this.hostConfiguration.watchOptions), ", it will be take effect for next watches."));
|
|
168635
168663
|
}
|
|
168636
168664
|
}
|
|
168637
168665
|
};
|
|
@@ -168843,7 +168871,7 @@ var ts;
|
|
|
168843
168871
|
? originalLocation
|
|
168844
168872
|
: location;
|
|
168845
168873
|
}
|
|
168846
|
-
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: "
|
|
168874
|
+
configuredProject = this.createAndLoadConfiguredProject(configFileName, "Creating project for original file: ".concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
|
|
168847
168875
|
}
|
|
168848
168876
|
updateProjectIfDirty(configuredProject);
|
|
168849
168877
|
var projectContainsOriginalInfo = function (project) {
|
|
@@ -168855,7 +168883,7 @@ var ts;
|
|
|
168855
168883
|
configuredProject = forEachResolvedProjectReferenceProject(configuredProject, fileName, function (child) {
|
|
168856
168884
|
updateProjectIfDirty(child);
|
|
168857
168885
|
return projectContainsOriginalInfo(child) ? child : undefined;
|
|
168858
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
168886
|
+
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(configuredProject.projectName, " to find possible configured project for original file: ").concat(originalFileInfo.fileName).concat(location !== originalLocation ? " for location: " + location.fileName : ""));
|
|
168859
168887
|
if (!configuredProject)
|
|
168860
168888
|
return undefined;
|
|
168861
168889
|
if (configuredProject === project)
|
|
@@ -168909,7 +168937,7 @@ var ts;
|
|
|
168909
168937
|
if (configFileName) {
|
|
168910
168938
|
project = this.findConfiguredProjectByProjectName(configFileName);
|
|
168911
168939
|
if (!project) {
|
|
168912
|
-
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for "
|
|
168940
|
+
project = this.createLoadAndUpdateConfiguredProject(configFileName, "Creating possible configured project for ".concat(info.fileName, " to open"));
|
|
168913
168941
|
defaultConfigProjectIsCreated = true;
|
|
168914
168942
|
}
|
|
168915
168943
|
else {
|
|
@@ -168939,7 +168967,7 @@ var ts;
|
|
|
168939
168967
|
if (!projectForConfigFileDiag && child.containsScriptInfo(info)) {
|
|
168940
168968
|
projectForConfigFileDiag = child;
|
|
168941
168969
|
}
|
|
168942
|
-
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution "
|
|
168970
|
+
}, ProjectReferenceProjectLoadKind.FindCreateLoad, "Creating project referenced in solution ".concat(project.projectName, " to find possible configured project for ").concat(info.fileName, " to open"));
|
|
168943
168971
|
}
|
|
168944
168972
|
// Send the event only if the project got created as part of this open request and info is part of the project
|
|
168945
168973
|
if (projectForConfigFileDiag) {
|
|
@@ -169001,7 +169029,7 @@ var ts;
|
|
|
169001
169029
|
return;
|
|
169002
169030
|
// find or delay load the project
|
|
169003
169031
|
var ancestor = this.findConfiguredProjectByProjectName(configFileName) ||
|
|
169004
|
-
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project "
|
|
169032
|
+
this.createConfiguredProjectWithDelayLoad(configFileName, "Creating project possibly referencing default composite project ".concat(project.getProjectName(), " of open file ").concat(info.fileName));
|
|
169005
169033
|
if (ancestor.isInitialLoadPending()) {
|
|
169006
169034
|
// Set a potential project reference
|
|
169007
169035
|
ancestor.setPotentialProjectReference(project.canonicalConfigFilePath);
|
|
@@ -169044,7 +169072,7 @@ var ts;
|
|
|
169044
169072
|
// Load this project,
|
|
169045
169073
|
var configFileName = server.toNormalizedPath(child.sourceFile.fileName);
|
|
169046
169074
|
var childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) ||
|
|
169047
|
-
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : "
|
|
169075
|
+
project.projectService.createAndLoadConfiguredProject(configFileName, "Creating project referenced by : ".concat(project.projectName, " as it references project ").concat(referencedProject.sourceFile.fileName));
|
|
169048
169076
|
updateProjectIfDirty(childProject);
|
|
169049
169077
|
// Ensure children for this project
|
|
169050
169078
|
this.ensureProjectChildren(childProject, forProjects, seenProjects);
|
|
@@ -169345,7 +169373,7 @@ var ts;
|
|
|
169345
169373
|
for (var _b = 0, normalizedNames_1 = normalizedNames; _b < normalizedNames_1.length; _b++) {
|
|
169346
169374
|
var root = normalizedNames_1[_b];
|
|
169347
169375
|
if (rule.match.test(root)) {
|
|
169348
|
-
this_2.logger.info("Excluding files based on rule "
|
|
169376
|
+
this_2.logger.info("Excluding files based on rule ".concat(name, " matching file '").concat(root, "'"));
|
|
169349
169377
|
// If the file matches, collect its types packages and exclude rules
|
|
169350
169378
|
if (rule.types) {
|
|
169351
169379
|
for (var _c = 0, _d = rule.types; _c < _d.length; _c++) {
|
|
@@ -169370,7 +169398,7 @@ var ts;
|
|
|
169370
169398
|
if (typeof groupNumberOrString === "number") {
|
|
169371
169399
|
if (!ts.isString(groups[groupNumberOrString])) {
|
|
169372
169400
|
// Specification was wrong - exclude nothing!
|
|
169373
|
-
_this.logger.info("Incorrect RegExp specification in safelist rule "
|
|
169401
|
+
_this.logger.info("Incorrect RegExp specification in safelist rule ".concat(name, " - not enough groups"));
|
|
169374
169402
|
// * can't appear in a filename; escape it because it's feeding into a RegExp
|
|
169375
169403
|
return "\\*";
|
|
169376
169404
|
}
|
|
@@ -169418,7 +169446,7 @@ var ts;
|
|
|
169418
169446
|
var cleanedTypingName = ts.removeMinAndVersionNumbers(inferredTypingName);
|
|
169419
169447
|
var typeName = this_3.legacySafelist.get(cleanedTypingName);
|
|
169420
169448
|
if (typeName !== undefined) {
|
|
169421
|
-
this_3.logger.info("Excluded '"
|
|
169449
|
+
this_3.logger.info("Excluded '".concat(normalizedNames[i], "' because it matched ").concat(cleanedTypingName, " from the legacy safelist"));
|
|
169422
169450
|
excludedFiles.push(normalizedNames[i]);
|
|
169423
169451
|
// *exclude* it from the project...
|
|
169424
169452
|
exclude = true;
|
|
@@ -169548,8 +169576,8 @@ var ts;
|
|
|
169548
169576
|
if (!project) {
|
|
169549
169577
|
// errors are stored in the project, do not need to update the graph
|
|
169550
169578
|
project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ?
|
|
169551
|
-
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: "
|
|
169552
|
-
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: "
|
|
169579
|
+
this.createConfiguredProjectWithDelayLoad(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName)) :
|
|
169580
|
+
this.createLoadAndUpdateConfiguredProject(tsconfigFile, "Creating configured project in external project: ".concat(proj.projectFileName));
|
|
169553
169581
|
}
|
|
169554
169582
|
if (project && !ts.contains(exisingConfigFiles, tsconfigFile)) {
|
|
169555
169583
|
// keep project alive even if no documents are opened - its lifetime is bound to the lifetime of containing external project
|
|
@@ -169787,7 +169815,7 @@ var ts;
|
|
|
169787
169815
|
return cache || (cache = new ts.Map());
|
|
169788
169816
|
}
|
|
169789
169817
|
function key(fromFileName, preferences) {
|
|
169790
|
-
return fromFileName
|
|
169818
|
+
return "".concat(fromFileName, ",").concat(preferences.importModuleSpecifierEnding, ",").concat(preferences.importModuleSpecifierPreference);
|
|
169791
169819
|
}
|
|
169792
169820
|
function createInfo(modulePaths, moduleSpecifiers, isAutoImportable) {
|
|
169793
169821
|
return { modulePaths: modulePaths, moduleSpecifiers: moduleSpecifiers, isAutoImportable: isAutoImportable };
|
|
@@ -169946,10 +169974,10 @@ var ts;
|
|
|
169946
169974
|
var verboseLogging = logger.hasLevel(server.LogLevel.verbose);
|
|
169947
169975
|
var json = JSON.stringify(msg);
|
|
169948
169976
|
if (verboseLogging) {
|
|
169949
|
-
logger.info(msg.type
|
|
169977
|
+
logger.info("".concat(msg.type, ":").concat(server.indent(json)));
|
|
169950
169978
|
}
|
|
169951
169979
|
var len = byteLength(json, "utf8");
|
|
169952
|
-
return "Content-Length: "
|
|
169980
|
+
return "Content-Length: ".concat(1 + len, "\r\n\r\n").concat(json).concat(newLine);
|
|
169953
169981
|
}
|
|
169954
169982
|
server.formatMessage = formatMessage;
|
|
169955
169983
|
/**
|
|
@@ -170014,7 +170042,7 @@ var ts;
|
|
|
170014
170042
|
}
|
|
170015
170043
|
else {
|
|
170016
170044
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("session" /* Session */, "stepError", { seq: this.requestId, message: e.message });
|
|
170017
|
-
this.operationHost.logError(e, "delayed processing of request "
|
|
170045
|
+
this.operationHost.logError(e, "delayed processing of request ".concat(this.requestId));
|
|
170018
170046
|
}
|
|
170019
170047
|
}
|
|
170020
170048
|
if (stop || !this.hasPendingWork()) {
|
|
@@ -170799,14 +170827,14 @@ var ts;
|
|
|
170799
170827
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
170800
170828
|
invalidPartialSemanticModeCommands.forEach(function (commandName) {
|
|
170801
170829
|
return _this.handlers.set(commandName, function (request) {
|
|
170802
|
-
throw new Error("Request: "
|
|
170830
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
170803
170831
|
});
|
|
170804
170832
|
});
|
|
170805
170833
|
break;
|
|
170806
170834
|
case ts.LanguageServiceMode.Syntactic:
|
|
170807
170835
|
invalidSyntacticModeCommands.forEach(function (commandName) {
|
|
170808
170836
|
return _this.handlers.set(commandName, function (request) {
|
|
170809
|
-
throw new Error("Request: "
|
|
170837
|
+
throw new Error("Request: ".concat(request.command, " not allowed in LanguageServiceMode.Syntactic"));
|
|
170810
170838
|
});
|
|
170811
170839
|
});
|
|
170812
170840
|
break;
|
|
@@ -170881,7 +170909,7 @@ var ts;
|
|
|
170881
170909
|
};
|
|
170882
170910
|
Session.prototype.projectsUpdatedInBackgroundEvent = function (openFiles) {
|
|
170883
170911
|
var _this = this;
|
|
170884
|
-
this.projectService.logger.info("got projects updated in background, updating diagnostics for "
|
|
170912
|
+
this.projectService.logger.info("got projects updated in background, updating diagnostics for ".concat(openFiles));
|
|
170885
170913
|
if (openFiles.length) {
|
|
170886
170914
|
if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) {
|
|
170887
170915
|
// For now only queue error checking for open files. We can change this to include non open files as well
|
|
@@ -170911,17 +170939,17 @@ var ts;
|
|
|
170911
170939
|
var scriptInfo = project.getScriptInfoForNormalizedPath(file);
|
|
170912
170940
|
if (scriptInfo) {
|
|
170913
170941
|
var text = ts.getSnapshotText(scriptInfo.getSnapshot());
|
|
170914
|
-
msg += "\n\nFile text of "
|
|
170942
|
+
msg += "\n\nFile text of ".concat(fileRequest.file, ":").concat(server.indent(text), "\n");
|
|
170915
170943
|
}
|
|
170916
170944
|
}
|
|
170917
170945
|
catch (_b) { } // eslint-disable-line no-empty
|
|
170918
170946
|
}
|
|
170919
170947
|
if (err.ProgramFiles) {
|
|
170920
|
-
msg += "\n\nProgram files: "
|
|
170948
|
+
msg += "\n\nProgram files: ".concat(JSON.stringify(err.ProgramFiles), "\n");
|
|
170921
170949
|
msg += "\n\nProjects::\n";
|
|
170922
170950
|
var counter_1 = 0;
|
|
170923
170951
|
var addProjectInfo = function (project) {
|
|
170924
|
-
msg += "\nProject '"
|
|
170952
|
+
msg += "\nProject '".concat(project.projectName, "' (").concat(server.ProjectKind[project.projectKind], ") ").concat(counter_1, "\n");
|
|
170925
170953
|
msg += project.filesToString(/*writeProjectFileNames*/ true);
|
|
170926
170954
|
msg += "\n-----------------------------------------------\n";
|
|
170927
170955
|
counter_1++;
|
|
@@ -170936,12 +170964,12 @@ var ts;
|
|
|
170936
170964
|
Session.prototype.send = function (msg) {
|
|
170937
170965
|
if (msg.type === "event" && !this.canUseEvents) {
|
|
170938
170966
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
170939
|
-
this.logger.info("Session does not support events: ignored event: "
|
|
170967
|
+
this.logger.info("Session does not support events: ignored event: ".concat(JSON.stringify(msg)));
|
|
170940
170968
|
}
|
|
170941
170969
|
return;
|
|
170942
170970
|
}
|
|
170943
170971
|
var msgText = formatMessage(msg, this.logger, this.byteLength, this.host.newLine);
|
|
170944
|
-
ts.perfLogger.logEvent("Response message size: "
|
|
170972
|
+
ts.perfLogger.logEvent("Response message size: ".concat(msgText.length));
|
|
170945
170973
|
this.host.write(msgText);
|
|
170946
170974
|
};
|
|
170947
170975
|
Session.prototype.event = function (body, eventName) {
|
|
@@ -171079,7 +171107,7 @@ var ts;
|
|
|
171079
171107
|
if (!projects) {
|
|
171080
171108
|
return;
|
|
171081
171109
|
}
|
|
171082
|
-
this.logger.info("cleaning "
|
|
171110
|
+
this.logger.info("cleaning ".concat(caption));
|
|
171083
171111
|
for (var _i = 0, projects_4 = projects; _i < projects_4.length; _i++) {
|
|
171084
171112
|
var p = projects_4[_i];
|
|
171085
171113
|
p.getLanguageService(/*ensureSynchronized*/ false).cleanupSemanticCache();
|
|
@@ -171493,7 +171521,7 @@ var ts;
|
|
|
171493
171521
|
var refs = references.map(function (entry) { return referenceEntryToReferencesResponseItem(_this.projectService, entry); });
|
|
171494
171522
|
return {
|
|
171495
171523
|
refs: refs,
|
|
171496
|
-
symbolName: "\""
|
|
171524
|
+
symbolName: "\"".concat(args.file, "\"")
|
|
171497
171525
|
};
|
|
171498
171526
|
};
|
|
171499
171527
|
/**
|
|
@@ -172037,7 +172065,7 @@ var ts;
|
|
|
172037
172065
|
});
|
|
172038
172066
|
var badCode = args.errorCodes.find(function (c) { return !existingDiagCodes_1.includes(c); });
|
|
172039
172067
|
if (badCode !== undefined) {
|
|
172040
|
-
e.message = "BADCLIENT: Bad error code, "
|
|
172068
|
+
e.message = "BADCLIENT: Bad error code, ".concat(badCode, " not found in range ").concat(startPosition, "..").concat(endPosition, " (found: ").concat(existingDiagCodes_1.join(", "), "); could have caused this error:\n").concat(e.message);
|
|
172041
172069
|
}
|
|
172042
172070
|
throw e;
|
|
172043
172071
|
}
|
|
@@ -172314,7 +172342,7 @@ var ts;
|
|
|
172314
172342
|
};
|
|
172315
172343
|
Session.prototype.addProtocolHandler = function (command, handler) {
|
|
172316
172344
|
if (this.handlers.has(command)) {
|
|
172317
|
-
throw new Error("Protocol handler already exists for command \""
|
|
172345
|
+
throw new Error("Protocol handler already exists for command \"".concat(command, "\""));
|
|
172318
172346
|
}
|
|
172319
172347
|
this.handlers.set(command, handler);
|
|
172320
172348
|
};
|
|
@@ -172343,8 +172371,8 @@ var ts;
|
|
|
172343
172371
|
return this.executeWithRequestId(request.seq, function () { return handler(request); });
|
|
172344
172372
|
}
|
|
172345
172373
|
else {
|
|
172346
|
-
this.logger.msg("Unrecognized JSON command:"
|
|
172347
|
-
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: "
|
|
172374
|
+
this.logger.msg("Unrecognized JSON command:".concat(server.stringifyIndented(request)), server.Msg.Err);
|
|
172375
|
+
this.doOutput(/*info*/ undefined, server.CommandNames.Unknown, request.seq, /*success*/ false, "Unrecognized JSON command: ".concat(request.command));
|
|
172348
172376
|
return { responseRequired: false };
|
|
172349
172377
|
}
|
|
172350
172378
|
};
|
|
@@ -172355,7 +172383,7 @@ var ts;
|
|
|
172355
172383
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
172356
172384
|
start = this.hrtime();
|
|
172357
172385
|
if (this.logger.hasLevel(server.LogLevel.verbose)) {
|
|
172358
|
-
this.logger.info("request:"
|
|
172386
|
+
this.logger.info("request:".concat(server.indent(this.toStringMessage(message))));
|
|
172359
172387
|
}
|
|
172360
172388
|
}
|
|
172361
172389
|
var request;
|
|
@@ -172371,10 +172399,10 @@ var ts;
|
|
|
172371
172399
|
if (this.logger.hasLevel(server.LogLevel.requestTime)) {
|
|
172372
172400
|
var elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4);
|
|
172373
172401
|
if (responseRequired) {
|
|
172374
|
-
this.logger.perftrc(request.seq
|
|
172402
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
172375
172403
|
}
|
|
172376
172404
|
else {
|
|
172377
|
-
this.logger.perftrc(request.seq
|
|
172405
|
+
this.logger.perftrc("".concat(request.seq, "::").concat(request.command, ": async elapsed time (in milliseconds) ").concat(elapsedTime));
|
|
172378
172406
|
}
|
|
172379
172407
|
}
|
|
172380
172408
|
// Note: Log before writing the response, else the editor can complete its activity before the server does
|