typescript 4.5.1-rc → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/tsc.js +290 -284
- package/lib/tsserver.js +594 -585
- package/lib/tsserverlibrary.js +570 -561
- package/lib/typescript.js +479 -470
- package/lib/typescriptServices.js +479 -470
- package/lib/typingsInstaller.js +348 -341
- package/package.json +1 -1
package/lib/typescript.js
CHANGED
|
@@ -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.2";
|
|
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
|
}
|
|
@@ -41920,7 +41920,7 @@ var ts;
|
|
|
41920
41920
|
};
|
|
41921
41921
|
return cache;
|
|
41922
41922
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
41923
|
-
var result = mode === undefined ? specifier : mode
|
|
41923
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
41924
41924
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
41925
41925
|
return result;
|
|
41926
41926
|
}
|
|
@@ -41951,7 +41951,7 @@ var ts;
|
|
|
41951
41951
|
}
|
|
41952
41952
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
41953
41953
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
41954
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
41954
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
41955
41955
|
}
|
|
41956
41956
|
function createPerModuleNameCache() {
|
|
41957
41957
|
var directoryPathMap = new ts.Map();
|
|
@@ -42098,10 +42098,10 @@ var ts;
|
|
|
42098
42098
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42099
42099
|
break;
|
|
42100
42100
|
default:
|
|
42101
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
42101
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
42102
42102
|
}
|
|
42103
42103
|
if (result && result.resolvedModule)
|
|
42104
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
42104
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
42105
42105
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
42106
42106
|
if (perFolderCache) {
|
|
42107
42107
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -42304,7 +42304,7 @@ var ts;
|
|
|
42304
42304
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
42305
42305
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
42306
42306
|
if (!resolvedModule) {
|
|
42307
|
-
throw new Error("Could not resolve JS module '"
|
|
42307
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
42308
42308
|
}
|
|
42309
42309
|
return resolvedModule.resolvedFileName;
|
|
42310
42310
|
}
|
|
@@ -42417,7 +42417,7 @@ var ts;
|
|
|
42417
42417
|
if (traceEnabled) {
|
|
42418
42418
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
42419
42419
|
}
|
|
42420
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
42420
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
42421
42421
|
return real;
|
|
42422
42422
|
}
|
|
42423
42423
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -42803,7 +42803,7 @@ var ts;
|
|
|
42803
42803
|
return undefined;
|
|
42804
42804
|
}
|
|
42805
42805
|
var trailingParts = parts.slice(nameParts.length);
|
|
42806
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
42806
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
42807
42807
|
}
|
|
42808
42808
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
42809
42809
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -43131,7 +43131,7 @@ var ts;
|
|
|
43131
43131
|
}
|
|
43132
43132
|
/* @internal */
|
|
43133
43133
|
function getTypesPackageName(packageName) {
|
|
43134
|
-
return "@types/"
|
|
43134
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
43135
43135
|
}
|
|
43136
43136
|
ts.getTypesPackageName = getTypesPackageName;
|
|
43137
43137
|
/* @internal */
|
|
@@ -43532,7 +43532,7 @@ var ts;
|
|
|
43532
43532
|
if (name) {
|
|
43533
43533
|
if (ts.isAmbientModule(node)) {
|
|
43534
43534
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
43535
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
43535
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
43536
43536
|
}
|
|
43537
43537
|
if (name.kind === 161 /* ComputedPropertyName */) {
|
|
43538
43538
|
var nameExpression = name.expression;
|
|
@@ -43589,7 +43589,7 @@ var ts;
|
|
|
43589
43589
|
case 163 /* Parameter */:
|
|
43590
43590
|
// Parameters with names are handled at the top of this function. Parameters
|
|
43591
43591
|
// without names can only come from JSDocFunctionTypes.
|
|
43592
|
-
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: "
|
|
43592
|
+
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
43593
|
var functionType = node.parent;
|
|
43594
43594
|
var index = functionType.parameters.indexOf(node);
|
|
43595
43595
|
return "arg" + index;
|
|
@@ -43701,7 +43701,7 @@ var ts;
|
|
|
43701
43701
|
var relatedInformation_1 = [];
|
|
43702
43702
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
|
|
43703
43703
|
// export type T; - may have meant export type { T }?
|
|
43704
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
43704
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
43705
43705
|
}
|
|
43706
43706
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
43707
43707
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -45774,7 +45774,7 @@ var ts;
|
|
|
45774
45774
|
}
|
|
45775
45775
|
}
|
|
45776
45776
|
function bindSourceFileAsExternalModule() {
|
|
45777
|
-
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\""
|
|
45777
|
+
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
45778
45778
|
}
|
|
45779
45779
|
function bindExportAssignment(node) {
|
|
45780
45780
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -47863,7 +47863,7 @@ var ts;
|
|
|
47863
47863
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
47864
47864
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
47865
47865
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
47866
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
47866
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
47867
47867
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
47868
47868
|
});
|
|
47869
47869
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -50502,7 +50502,7 @@ var ts;
|
|
|
50502
50502
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
50503
50503
|
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
|
50504
50504
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
50505
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
50505
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
50506
50506
|
if (cache.has(key)) {
|
|
50507
50507
|
return cache.get(key);
|
|
50508
50508
|
}
|
|
@@ -51350,7 +51350,7 @@ var ts;
|
|
|
51350
51350
|
context.symbolDepth = new ts.Map();
|
|
51351
51351
|
}
|
|
51352
51352
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
51353
|
-
var key = getTypeId(type)
|
|
51353
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
51354
51354
|
if (links) {
|
|
51355
51355
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
51356
51356
|
}
|
|
@@ -51619,7 +51619,7 @@ var ts;
|
|
|
51619
51619
|
}
|
|
51620
51620
|
}
|
|
51621
51621
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
51622
|
-
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... "
|
|
51622
|
+
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
|
|
51623
51623
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
51624
51624
|
break;
|
|
51625
51625
|
}
|
|
@@ -51734,7 +51734,7 @@ var ts;
|
|
|
51734
51734
|
else if (types.length > 2) {
|
|
51735
51735
|
return [
|
|
51736
51736
|
typeToTypeNodeHelper(types[0], context),
|
|
51737
|
-
ts.factory.createTypeReferenceNode("... "
|
|
51737
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
|
|
51738
51738
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
51739
51739
|
];
|
|
51740
51740
|
}
|
|
@@ -51748,7 +51748,7 @@ var ts;
|
|
|
51748
51748
|
var type = types_2[_i];
|
|
51749
51749
|
i++;
|
|
51750
51750
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
51751
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
51751
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
|
|
51752
51752
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
51753
51753
|
if (typeNode_1) {
|
|
51754
51754
|
result_5.push(typeNode_1);
|
|
@@ -52256,7 +52256,7 @@ var ts;
|
|
|
52256
52256
|
var text = rawtext;
|
|
52257
52257
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
52258
52258
|
i++;
|
|
52259
|
-
text = rawtext
|
|
52259
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
52260
52260
|
}
|
|
52261
52261
|
if (text !== rawtext) {
|
|
52262
52262
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -52582,7 +52582,7 @@ var ts;
|
|
|
52582
52582
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
52583
52583
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
52584
52584
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
52585
|
-
: "arg"
|
|
52585
|
+
: "arg".concat(index);
|
|
52586
52586
|
}
|
|
52587
52587
|
function rewriteModuleSpecifier(parent, lit) {
|
|
52588
52588
|
if (bundled) {
|
|
@@ -53667,7 +53667,7 @@ var ts;
|
|
|
53667
53667
|
return results_1;
|
|
53668
53668
|
}
|
|
53669
53669
|
// 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! "
|
|
53670
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
53671
53671
|
};
|
|
53672
53672
|
}
|
|
53673
53673
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -53742,7 +53742,7 @@ var ts;
|
|
|
53742
53742
|
if (ref) {
|
|
53743
53743
|
return ref;
|
|
53744
53744
|
}
|
|
53745
|
-
var tempName = getUnusedName(rootName
|
|
53745
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
53746
53746
|
var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
53747
53747
|
ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
|
|
53748
53748
|
], 2 /* Const */));
|
|
@@ -53789,7 +53789,7 @@ var ts;
|
|
|
53789
53789
|
var original = input;
|
|
53790
53790
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
53791
53791
|
i++;
|
|
53792
|
-
input = original
|
|
53792
|
+
input = "".concat(original, "_").concat(i);
|
|
53793
53793
|
}
|
|
53794
53794
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
53795
53795
|
if (id) {
|
|
@@ -53897,15 +53897,15 @@ var ts;
|
|
|
53897
53897
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
53898
53898
|
var name = "" + nameType.value;
|
|
53899
53899
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
|
|
53900
|
-
return "\""
|
|
53900
|
+
return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
|
|
53901
53901
|
}
|
|
53902
53902
|
if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
53903
|
-
return "["
|
|
53903
|
+
return "[".concat(name, "]");
|
|
53904
53904
|
}
|
|
53905
53905
|
return name;
|
|
53906
53906
|
}
|
|
53907
53907
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
53908
|
-
return "["
|
|
53908
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
53909
53909
|
}
|
|
53910
53910
|
}
|
|
53911
53911
|
}
|
|
@@ -56679,7 +56679,7 @@ var ts;
|
|
|
56679
56679
|
!leftName ? rightName :
|
|
56680
56680
|
!rightName ? leftName :
|
|
56681
56681
|
undefined;
|
|
56682
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
56682
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
56683
56683
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
56684
56684
|
params[i] = paramSymbol;
|
|
56685
56685
|
}
|
|
@@ -58598,7 +58598,7 @@ var ts;
|
|
|
58598
58598
|
return result;
|
|
58599
58599
|
}
|
|
58600
58600
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
58601
|
-
return aliasSymbol ? "@"
|
|
58601
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
58602
58602
|
}
|
|
58603
58603
|
// This function is used to propagate certain flags when creating new object type references and union types.
|
|
58604
58604
|
// It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
|
|
@@ -58784,7 +58784,7 @@ var ts;
|
|
|
58784
58784
|
return undefined;
|
|
58785
58785
|
}
|
|
58786
58786
|
function getSymbolPath(symbol) {
|
|
58787
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
58787
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
58788
58788
|
}
|
|
58789
58789
|
function getUnresolvedSymbolForEntityName(name) {
|
|
58790
58790
|
var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
|
|
@@ -58795,7 +58795,7 @@ var ts;
|
|
|
58795
58795
|
var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
|
|
58796
58796
|
name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
58797
58797
|
undefined;
|
|
58798
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
58798
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
58799
58799
|
var result = unresolvedSymbols.get(path);
|
|
58800
58800
|
if (!result) {
|
|
58801
58801
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
@@ -58868,7 +58868,7 @@ var ts;
|
|
|
58868
58868
|
if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
|
|
58869
58869
|
return baseType;
|
|
58870
58870
|
}
|
|
58871
|
-
var id = getTypeId(baseType)
|
|
58871
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
58872
58872
|
var cached = substitutionTypes.get(id);
|
|
58873
58873
|
if (cached) {
|
|
58874
58874
|
return cached;
|
|
@@ -59529,6 +59529,8 @@ var ts;
|
|
|
59529
59529
|
// We ignore 'never' types in unions
|
|
59530
59530
|
if (!(flags & 131072 /* Never */)) {
|
|
59531
59531
|
includes |= flags & 205258751 /* IncludesMask */;
|
|
59532
|
+
if (flags & 465829888 /* Instantiable */)
|
|
59533
|
+
includes |= 33554432 /* IncludesInstantiable */;
|
|
59532
59534
|
if (type === wildcardType)
|
|
59533
59535
|
includes |= 8388608 /* IncludesWildcard */;
|
|
59534
59536
|
if (!strictNullChecks && flags & 98304 /* Nullable */) {
|
|
@@ -59742,7 +59744,7 @@ var ts;
|
|
|
59742
59744
|
origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
|
|
59743
59745
|
}
|
|
59744
59746
|
}
|
|
59745
|
-
var objectFlags = (includes &
|
|
59747
|
+
var objectFlags = (includes & 36323363 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) |
|
|
59746
59748
|
(includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
|
|
59747
59749
|
return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
|
|
59748
59750
|
}
|
|
@@ -59790,9 +59792,9 @@ var ts;
|
|
|
59790
59792
|
return types[0];
|
|
59791
59793
|
}
|
|
59792
59794
|
var typeKey = !origin ? getTypeListId(types) :
|
|
59793
|
-
origin.flags & 1048576 /* Union */ ? "|"
|
|
59794
|
-
origin.flags & 2097152 /* Intersection */ ? "&"
|
|
59795
|
-
"#"
|
|
59795
|
+
origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
|
|
59796
|
+
origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
|
|
59797
|
+
"#".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
59798
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
59797
59799
|
var type = unionTypes.get(id);
|
|
59798
59800
|
if (!type) {
|
|
@@ -60314,7 +60316,7 @@ var ts;
|
|
|
60314
60316
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
|
|
60315
60317
|
return stringType;
|
|
60316
60318
|
}
|
|
60317
|
-
var id = getTypeListId(newTypes)
|
|
60319
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
60318
60320
|
var type = templateLiteralTypes.get(id);
|
|
60319
60321
|
if (!type) {
|
|
60320
60322
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -60374,7 +60376,7 @@ var ts;
|
|
|
60374
60376
|
return str;
|
|
60375
60377
|
}
|
|
60376
60378
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
60377
|
-
var id = getSymbolId(symbol)
|
|
60379
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
60378
60380
|
var result = stringMappingTypes.get(id);
|
|
60379
60381
|
if (!result) {
|
|
60380
60382
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -61394,7 +61396,7 @@ var ts;
|
|
|
61394
61396
|
function createUniqueESSymbolType(symbol) {
|
|
61395
61397
|
var type = createType(8192 /* UniqueESSymbol */);
|
|
61396
61398
|
type.symbol = symbol;
|
|
61397
|
-
type.escapedName = "__@"
|
|
61399
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
61398
61400
|
return type;
|
|
61399
61401
|
}
|
|
61400
61402
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -63083,24 +63085,24 @@ var ts;
|
|
|
63083
63085
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
63084
63086
|
// Parenthesize a `new` if there is one
|
|
63085
63087
|
if (path.indexOf("new ") === 0) {
|
|
63086
|
-
path = "("
|
|
63088
|
+
path = "(".concat(path, ")");
|
|
63087
63089
|
}
|
|
63088
63090
|
var str = "" + args[0];
|
|
63089
63091
|
// If leading, just print back the arg (irrespective of if it's a valid identifier)
|
|
63090
63092
|
if (path.length === 0) {
|
|
63091
|
-
path = ""
|
|
63093
|
+
path = "".concat(str);
|
|
63092
63094
|
}
|
|
63093
63095
|
// Otherwise write a dotted name if possible
|
|
63094
63096
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
63095
|
-
path = path
|
|
63097
|
+
path = "".concat(path, ".").concat(str);
|
|
63096
63098
|
}
|
|
63097
63099
|
// Failing that, check if the name is already a computed name
|
|
63098
63100
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
63099
|
-
path = ""
|
|
63101
|
+
path = "".concat(path).concat(str);
|
|
63100
63102
|
}
|
|
63101
63103
|
// And finally write out a computed name as a last resort
|
|
63102
63104
|
else {
|
|
63103
|
-
path = path
|
|
63105
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
63104
63106
|
}
|
|
63105
63107
|
break;
|
|
63106
63108
|
}
|
|
@@ -63129,7 +63131,7 @@ var ts;
|
|
|
63129
63131
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
63130
63132
|
? ""
|
|
63131
63133
|
: "...";
|
|
63132
|
-
path = ""
|
|
63134
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
63133
63135
|
}
|
|
63134
63136
|
break;
|
|
63135
63137
|
}
|
|
@@ -63142,7 +63144,7 @@ var ts;
|
|
|
63142
63144
|
break;
|
|
63143
63145
|
}
|
|
63144
63146
|
default:
|
|
63145
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
63147
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
63146
63148
|
}
|
|
63147
63149
|
}
|
|
63148
63150
|
if (path) {
|
|
@@ -63818,7 +63820,7 @@ var ts;
|
|
|
63818
63820
|
// prevent finding matches- but it should hit up the common cases
|
|
63819
63821
|
var broadestEquivalentId = id.split(",").map(function (i) { return i.replace(/-\d+/g, function (_match, offset) {
|
|
63820
63822
|
var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
|
|
63821
|
-
return "="
|
|
63823
|
+
return "=".concat(index);
|
|
63822
63824
|
}); }).join(",");
|
|
63823
63825
|
for (var i = 0; i < maybeCount; i++) {
|
|
63824
63826
|
// If source and target are already being compared, consider them related with assumptions
|
|
@@ -64117,7 +64119,7 @@ var ts;
|
|
|
64117
64119
|
originalErrorInfo = undefined;
|
|
64118
64120
|
}
|
|
64119
64121
|
}
|
|
64120
|
-
else if (isGenericMappedType(target)) {
|
|
64122
|
+
else if (isGenericMappedType(target) && relation !== identityRelation) {
|
|
64121
64123
|
// Check if source type `S` is related to target type `{ [P in Q]: T }` or `{ [P in Q as R]: T}`.
|
|
64122
64124
|
var keysRemapped = !!target.declaration.nameType;
|
|
64123
64125
|
var templateType = getTemplateTypeFromMappedType(target);
|
|
@@ -66178,7 +66180,8 @@ var ts;
|
|
|
66178
66180
|
(resolveName(param, param.name.escapedText, 788968 /* Type */, undefined, param.name.escapedText, /*isUse*/ true) ||
|
|
66179
66181
|
param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
|
|
66180
66182
|
var newName = "arg" + param.parent.parameters.indexOf(param);
|
|
66181
|
-
|
|
66183
|
+
var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
66184
|
+
errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
66182
66185
|
return;
|
|
66183
66186
|
}
|
|
66184
66187
|
diagnostic = declaration.dotDotDotToken ?
|
|
@@ -67481,11 +67484,11 @@ var ts;
|
|
|
67481
67484
|
case 79 /* Identifier */:
|
|
67482
67485
|
if (!ts.isThisInTypeQuery(node)) {
|
|
67483
67486
|
var symbol = getResolvedSymbol(node);
|
|
67484
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
67487
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
67485
67488
|
}
|
|
67486
67489
|
// falls through
|
|
67487
67490
|
case 108 /* ThisKeyword */:
|
|
67488
|
-
return "0|"
|
|
67491
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
67489
67492
|
case 229 /* NonNullExpression */:
|
|
67490
67493
|
case 211 /* ParenthesizedExpression */:
|
|
67491
67494
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -71247,7 +71250,7 @@ var ts;
|
|
|
71247
71250
|
!leftName ? rightName :
|
|
71248
71251
|
!rightName ? leftName :
|
|
71249
71252
|
undefined;
|
|
71250
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
71253
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
71251
71254
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71252
71255
|
params[i] = paramSymbol;
|
|
71253
71256
|
}
|
|
@@ -78551,7 +78554,9 @@ var ts;
|
|
|
78551
78554
|
var typeReferenceNode = ts.tryCast(node.parent, ts.isTypeReferenceType);
|
|
78552
78555
|
if (!typeReferenceNode)
|
|
78553
78556
|
return undefined;
|
|
78554
|
-
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78557
|
+
var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
|
|
78558
|
+
if (!typeParameters)
|
|
78559
|
+
return undefined;
|
|
78555
78560
|
var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
|
|
78556
78561
|
return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
|
|
78557
78562
|
}
|
|
@@ -81158,7 +81163,7 @@ var ts;
|
|
|
81158
81163
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
81159
81164
|
var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
|
|
81160
81165
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
81161
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
81166
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
81162
81167
|
}
|
|
81163
81168
|
/**
|
|
81164
81169
|
* Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
|
|
@@ -88130,7 +88135,7 @@ var ts;
|
|
|
88130
88135
|
value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
|
|
88131
88136
|
value === 62 ? 43 /* plus */ :
|
|
88132
88137
|
value === 63 ? 47 /* slash */ :
|
|
88133
|
-
ts.Debug.fail(value
|
|
88138
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
88134
88139
|
}
|
|
88135
88140
|
function base64FormatDecode(ch) {
|
|
88136
88141
|
return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
|
|
@@ -88205,7 +88210,7 @@ var ts;
|
|
|
88205
88210
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
88206
88211
|
if (decoder.error !== undefined) {
|
|
88207
88212
|
if (host.log) {
|
|
88208
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
88213
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
88209
88214
|
}
|
|
88210
88215
|
decodedMappings = ts.emptyArray;
|
|
88211
88216
|
}
|
|
@@ -91871,7 +91876,7 @@ var ts;
|
|
|
91871
91876
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
91872
91877
|
? ts.declarationNameToString(originalNode.name)
|
|
91873
91878
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
91874
|
-
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " "
|
|
91879
|
+
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
|
|
91875
91880
|
}
|
|
91876
91881
|
return substitute;
|
|
91877
91882
|
}
|
|
@@ -93263,8 +93268,8 @@ var ts;
|
|
|
93263
93268
|
}
|
|
93264
93269
|
function createHoistedVariableForClass(name, node) {
|
|
93265
93270
|
var className = getPrivateIdentifierEnvironment().className;
|
|
93266
|
-
var prefix = className ? "_"
|
|
93267
|
-
var identifier = factory.createUniqueName(prefix
|
|
93271
|
+
var prefix = className ? "_".concat(className) : "";
|
|
93272
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
|
|
93268
93273
|
if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
|
|
93269
93274
|
addBlockScopedVariable(identifier);
|
|
93270
93275
|
}
|
|
@@ -95162,7 +95167,7 @@ var ts;
|
|
|
95162
95167
|
specifierSourceImports = ts.createMap();
|
|
95163
95168
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
95164
95169
|
}
|
|
95165
|
-
var generatedName = factory.createUniqueName("_"
|
|
95170
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
|
|
95166
95171
|
var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
|
|
95167
95172
|
generatedName.generatedImportReference = specifier;
|
|
95168
95173
|
specifierSourceImports.set(name, specifier);
|
|
@@ -96301,11 +96306,11 @@ var ts;
|
|
|
96301
96306
|
}
|
|
96302
96307
|
else {
|
|
96303
96308
|
if (node.kind === 245 /* BreakStatement */) {
|
|
96304
|
-
labelMarker = "break-"
|
|
96309
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
96305
96310
|
setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
|
|
96306
96311
|
}
|
|
96307
96312
|
else {
|
|
96308
|
-
labelMarker = "continue-"
|
|
96313
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
96309
96314
|
setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
|
|
96310
96315
|
}
|
|
96311
96316
|
}
|
|
@@ -105114,7 +105119,7 @@ var ts;
|
|
|
105114
105119
|
return getTypeAliasDeclarationVisibilityError;
|
|
105115
105120
|
}
|
|
105116
105121
|
else {
|
|
105117
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
105122
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
105118
105123
|
}
|
|
105119
105124
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
105120
105125
|
if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
|
|
@@ -105325,7 +105330,7 @@ var ts;
|
|
|
105325
105330
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
105326
105331
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
105327
105332
|
default:
|
|
105328
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
105333
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
105329
105334
|
}
|
|
105330
105335
|
}
|
|
105331
105336
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -106083,7 +106088,7 @@ var ts;
|
|
|
106083
106088
|
while (ts.length(lateMarkedStatements)) {
|
|
106084
106089
|
var i = lateMarkedStatements.shift();
|
|
106085
106090
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
106086
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
106091
|
+
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
106092
|
}
|
|
106088
106093
|
var priorNeedsDeclare = needsDeclare;
|
|
106089
106094
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -106272,7 +106277,7 @@ var ts;
|
|
|
106272
106277
|
return cleanup(input);
|
|
106273
106278
|
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
106279
|
}
|
|
106275
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
106280
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
106276
106281
|
}
|
|
106277
106282
|
}
|
|
106278
106283
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -106563,7 +106568,7 @@ var ts;
|
|
|
106563
106568
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
|
|
106564
106569
|
// We must add a temporary declaration for the extends clause expression
|
|
106565
106570
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
106566
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
106571
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
|
|
106567
106572
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
106568
106573
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
106569
106574
|
errorNode: extendsClause_1,
|
|
@@ -106604,7 +106609,7 @@ var ts;
|
|
|
106604
106609
|
}
|
|
106605
106610
|
}
|
|
106606
106611
|
// Anything left unhandled is an error, so this should be unreachable
|
|
106607
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
106612
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
106608
106613
|
function cleanup(node) {
|
|
106609
106614
|
if (isEnclosingDeclaration(input)) {
|
|
106610
106615
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -107496,13 +107501,13 @@ var ts;
|
|
|
107496
107501
|
if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
|
|
107497
107502
|
return;
|
|
107498
107503
|
if (js && configFile.options.sourceMap) {
|
|
107499
|
-
addOutput(js
|
|
107504
|
+
addOutput("".concat(js, ".map"));
|
|
107500
107505
|
}
|
|
107501
107506
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
107502
107507
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
107503
107508
|
addOutput(dts);
|
|
107504
107509
|
if (configFile.options.declarationMap) {
|
|
107505
|
-
addOutput(dts
|
|
107510
|
+
addOutput("".concat(dts, ".map"));
|
|
107506
107511
|
}
|
|
107507
107512
|
}
|
|
107508
107513
|
}
|
|
@@ -107571,7 +107576,7 @@ var ts;
|
|
|
107571
107576
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
107572
107577
|
if (ts.outFile(configFile.options)) {
|
|
107573
107578
|
var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
|
|
107574
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
107579
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107575
107580
|
}
|
|
107576
107581
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
107577
107582
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -107590,7 +107595,7 @@ var ts;
|
|
|
107590
107595
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
107591
107596
|
if (buildInfoPath)
|
|
107592
107597
|
return buildInfoPath;
|
|
107593
|
-
return ts.Debug.fail("project "
|
|
107598
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
107594
107599
|
}
|
|
107595
107600
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
107596
107601
|
/*@internal*/
|
|
@@ -107816,7 +107821,7 @@ var ts;
|
|
|
107816
107821
|
if (sourceMappingURL) {
|
|
107817
107822
|
if (!writer.isAtStartOfLine())
|
|
107818
107823
|
writer.rawWrite(newLine);
|
|
107819
|
-
writer.writeComment("//# "
|
|
107824
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
|
|
107820
107825
|
}
|
|
107821
107826
|
// Write the source map
|
|
107822
107827
|
if (sourceMapFilePath) {
|
|
@@ -107865,7 +107870,7 @@ var ts;
|
|
|
107865
107870
|
// Encode the sourceMap into the sourceMap url
|
|
107866
107871
|
var sourceMapText = sourceMapGenerator.toString();
|
|
107867
107872
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
107868
|
-
return "data:application/json;base64,"
|
|
107873
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
107869
107874
|
}
|
|
107870
107875
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
107871
107876
|
if (mapOptions.mapRoot) {
|
|
@@ -108045,7 +108050,7 @@ var ts;
|
|
|
108045
108050
|
return;
|
|
108046
108051
|
break;
|
|
108047
108052
|
default:
|
|
108048
|
-
ts.Debug.fail("Unexpected path: "
|
|
108053
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
108049
108054
|
}
|
|
108050
108055
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
108051
108056
|
},
|
|
@@ -108905,7 +108910,7 @@ var ts;
|
|
|
108905
108910
|
return writeTokenNode(node, writeKeyword);
|
|
108906
108911
|
if (ts.isTokenKind(node.kind))
|
|
108907
108912
|
return writeTokenNode(node, writePunctuation);
|
|
108908
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
108913
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
108909
108914
|
}
|
|
108910
108915
|
function emitMappedTypeParameter(node) {
|
|
108911
108916
|
emit(node.name);
|
|
@@ -109075,13 +109080,13 @@ var ts;
|
|
|
109075
109080
|
}
|
|
109076
109081
|
}
|
|
109077
109082
|
function emitPlaceholder(hint, node, snippet) {
|
|
109078
|
-
nonEscapingWrite("${"
|
|
109083
|
+
nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
|
|
109079
109084
|
pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
|
|
109080
109085
|
nonEscapingWrite("}"); // `}`
|
|
109081
109086
|
// `${2:...}`
|
|
109082
109087
|
}
|
|
109083
109088
|
function emitTabStop(snippet) {
|
|
109084
|
-
nonEscapingWrite("$"
|
|
109089
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
109085
109090
|
}
|
|
109086
109091
|
//
|
|
109087
109092
|
// Identifiers
|
|
@@ -110803,17 +110808,17 @@ var ts;
|
|
|
110803
110808
|
writeLine();
|
|
110804
110809
|
}
|
|
110805
110810
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
110806
|
-
writeComment("/// <amd-module name=\""
|
|
110811
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
110807
110812
|
writeLine();
|
|
110808
110813
|
}
|
|
110809
110814
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
110810
110815
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
110811
110816
|
var dep = _b[_a];
|
|
110812
110817
|
if (dep.name) {
|
|
110813
|
-
writeComment("/// <amd-dependency name=\""
|
|
110818
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
110814
110819
|
}
|
|
110815
110820
|
else {
|
|
110816
|
-
writeComment("/// <amd-dependency path=\""
|
|
110821
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
110817
110822
|
}
|
|
110818
110823
|
writeLine();
|
|
110819
110824
|
}
|
|
@@ -110821,7 +110826,7 @@ var ts;
|
|
|
110821
110826
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
110822
110827
|
var directive = files_2[_c];
|
|
110823
110828
|
var pos = writer.getTextPos();
|
|
110824
|
-
writeComment("/// <reference path=\""
|
|
110829
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
110825
110830
|
if (bundleFileInfo)
|
|
110826
110831
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
|
|
110827
110832
|
writeLine();
|
|
@@ -110829,7 +110834,7 @@ var ts;
|
|
|
110829
110834
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
110830
110835
|
var directive = types_24[_d];
|
|
110831
110836
|
var pos = writer.getTextPos();
|
|
110832
|
-
writeComment("/// <reference types=\""
|
|
110837
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
110833
110838
|
if (bundleFileInfo)
|
|
110834
110839
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
|
|
110835
110840
|
writeLine();
|
|
@@ -110837,7 +110842,7 @@ var ts;
|
|
|
110837
110842
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
110838
110843
|
var directive = libs_1[_e];
|
|
110839
110844
|
var pos = writer.getTextPos();
|
|
110840
|
-
writeComment("/// <reference lib=\""
|
|
110845
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
110841
110846
|
if (bundleFileInfo)
|
|
110842
110847
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
|
|
110843
110848
|
writeLine();
|
|
@@ -111612,9 +111617,9 @@ var ts;
|
|
|
111612
111617
|
var textSourceNode = node.textSourceNode;
|
|
111613
111618
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
111614
111619
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
111615
|
-
return jsxAttributeEscape ? "\""
|
|
111616
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\""
|
|
111617
|
-
"\""
|
|
111620
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
111621
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
111622
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
111618
111623
|
}
|
|
111619
111624
|
else {
|
|
111620
111625
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -112091,8 +112096,8 @@ var ts;
|
|
|
112091
112096
|
}
|
|
112092
112097
|
function formatSynthesizedComment(comment) {
|
|
112093
112098
|
return comment.kind === 3 /* MultiLineCommentTrivia */
|
|
112094
|
-
? "/*"
|
|
112095
|
-
: "//"
|
|
112099
|
+
? "/*".concat(comment.text, "*/")
|
|
112100
|
+
: "//".concat(comment.text);
|
|
112096
112101
|
}
|
|
112097
112102
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
112098
112103
|
enterComment();
|
|
@@ -112600,7 +112605,7 @@ var ts;
|
|
|
112600
112605
|
var rootResult = tryReadDirectory(rootDir, rootDirPath);
|
|
112601
112606
|
var rootSymLinkResult;
|
|
112602
112607
|
if (rootResult !== undefined) {
|
|
112603
|
-
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath
|
|
112608
|
+
return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
|
|
112604
112609
|
}
|
|
112605
112610
|
return host.readDirectory(rootDir, extensions, excludes, includes, depth);
|
|
112606
112611
|
function getFileSystemEntries(dir) {
|
|
@@ -112813,7 +112818,7 @@ var ts;
|
|
|
112813
112818
|
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
112819
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
112815
112820
|
if (!newPath) {
|
|
112816
|
-
writeLog("Project: "
|
|
112821
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
112817
112822
|
return true;
|
|
112818
112823
|
}
|
|
112819
112824
|
fileOrDirectoryPath = newPath;
|
|
@@ -112822,11 +112827,11 @@ var ts;
|
|
|
112822
112827
|
// If the the added or created file or directory is not supported file name, ignore the file
|
|
112823
112828
|
// But when watched directory is added/removed, we need to reload the file list
|
|
112824
112829
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
112825
|
-
writeLog("Project: "
|
|
112830
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
112826
112831
|
return true;
|
|
112827
112832
|
}
|
|
112828
112833
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
112829
|
-
writeLog("Project: "
|
|
112834
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
112830
112835
|
return true;
|
|
112831
112836
|
}
|
|
112832
112837
|
if (!program)
|
|
@@ -112850,7 +112855,7 @@ var ts;
|
|
|
112850
112855
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
112851
112856
|
if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
|
|
112852
112857
|
hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
|
|
112853
|
-
writeLog("Project: "
|
|
112858
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
112854
112859
|
return true;
|
|
112855
112860
|
}
|
|
112856
112861
|
return false;
|
|
@@ -112918,36 +112923,36 @@ var ts;
|
|
|
112918
112923
|
host.useCaseSensitiveFileNames();
|
|
112919
112924
|
}
|
|
112920
112925
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
112921
|
-
log("ExcludeWatcher:: Added:: "
|
|
112926
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112922
112927
|
return {
|
|
112923
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
112928
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
112924
112929
|
};
|
|
112925
112930
|
}
|
|
112926
112931
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112927
|
-
log("FileWatcher:: Added:: "
|
|
112932
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112928
112933
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112929
112934
|
return {
|
|
112930
112935
|
close: function () {
|
|
112931
|
-
log("FileWatcher:: Close:: "
|
|
112936
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
112932
112937
|
watcher.close();
|
|
112933
112938
|
}
|
|
112934
112939
|
};
|
|
112935
112940
|
}
|
|
112936
112941
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
112937
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
112942
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112938
112943
|
log(watchInfo);
|
|
112939
112944
|
var start = ts.timestamp();
|
|
112940
112945
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
112941
112946
|
var elapsed = ts.timestamp() - start;
|
|
112942
|
-
log("Elapsed:: "
|
|
112947
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112943
112948
|
return {
|
|
112944
112949
|
close: function () {
|
|
112945
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
112950
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
112946
112951
|
log(watchInfo);
|
|
112947
112952
|
var start = ts.timestamp();
|
|
112948
112953
|
watcher.close();
|
|
112949
112954
|
var elapsed = ts.timestamp() - start;
|
|
112950
|
-
log("Elapsed:: "
|
|
112955
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
112951
112956
|
}
|
|
112952
112957
|
};
|
|
112953
112958
|
}
|
|
@@ -112957,16 +112962,16 @@ var ts;
|
|
|
112957
112962
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112958
112963
|
args[_i] = arguments[_i];
|
|
112959
112964
|
}
|
|
112960
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
112965
|
+
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
112966
|
log(triggerredInfo);
|
|
112962
112967
|
var start = ts.timestamp();
|
|
112963
112968
|
cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
|
|
112964
112969
|
var elapsed = ts.timestamp() - start;
|
|
112965
|
-
log("Elapsed:: "
|
|
112970
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
112966
112971
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
112967
112972
|
}
|
|
112968
112973
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
112969
|
-
return "WatchInfo: "
|
|
112974
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
112970
112975
|
}
|
|
112971
112976
|
}
|
|
112972
112977
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -113273,12 +113278,12 @@ var ts;
|
|
|
113273
113278
|
}
|
|
113274
113279
|
ts.formatDiagnostics = formatDiagnostics;
|
|
113275
113280
|
function formatDiagnostic(diagnostic, host) {
|
|
113276
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
113281
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
113277
113282
|
if (diagnostic.file) {
|
|
113278
113283
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
|
|
113279
113284
|
var fileName = diagnostic.file.fileName;
|
|
113280
113285
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
113281
|
-
return relativeFileName
|
|
113286
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
113282
113287
|
}
|
|
113283
113288
|
return errorMessage;
|
|
113284
113289
|
}
|
|
@@ -113366,9 +113371,9 @@ var ts;
|
|
|
113366
113371
|
var output = "";
|
|
113367
113372
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
113368
113373
|
output += ":";
|
|
113369
|
-
output += color(""
|
|
113374
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113370
113375
|
output += ":";
|
|
113371
|
-
output += color(""
|
|
113376
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
113372
113377
|
return output;
|
|
113373
113378
|
}
|
|
113374
113379
|
ts.formatLocation = formatLocation;
|
|
@@ -113382,7 +113387,7 @@ var ts;
|
|
|
113382
113387
|
output += " - ";
|
|
113383
113388
|
}
|
|
113384
113389
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
113385
|
-
output += formatColorAndReset(" TS"
|
|
113390
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
113386
113391
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
113387
113392
|
if (diagnostic.file) {
|
|
113388
113393
|
output += host.getNewLine();
|
|
@@ -113491,7 +113496,7 @@ var ts;
|
|
|
113491
113496
|
var result = void 0;
|
|
113492
113497
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
113493
113498
|
i++;
|
|
113494
|
-
var cacheKey = mode !== undefined ? mode
|
|
113499
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
113495
113500
|
if (cache.has(cacheKey)) {
|
|
113496
113501
|
result = cache.get(cacheKey);
|
|
113497
113502
|
}
|
|
@@ -115575,7 +115580,7 @@ var ts;
|
|
|
115575
115580
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
115576
115581
|
i++;
|
|
115577
115582
|
}
|
|
115578
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
115583
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
115579
115584
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
115580
115585
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
115581
115586
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -116396,12 +116401,12 @@ var ts;
|
|
|
116396
116401
|
}
|
|
116397
116402
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
116398
116403
|
var dirPath = host.toPath(dir);
|
|
116399
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
116404
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
116400
116405
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
116401
116406
|
// Any parent directory of declaration dir
|
|
116402
116407
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
116403
116408
|
// Any directory inside declaration dir
|
|
116404
|
-
ts.startsWith(dirPath, declDirPath
|
|
116409
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
116405
116410
|
}
|
|
116406
116411
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
116407
116412
|
var _a;
|
|
@@ -116454,7 +116459,7 @@ var ts;
|
|
|
116454
116459
|
if (isFile && result) {
|
|
116455
116460
|
// Store the real path for the file'
|
|
116456
116461
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
116457
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
116462
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
116458
116463
|
}
|
|
116459
116464
|
return result;
|
|
116460
116465
|
}) || false;
|
|
@@ -116912,7 +116917,7 @@ var ts;
|
|
|
116912
116917
|
/*forceDtsEmit*/ true);
|
|
116913
116918
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
116914
116919
|
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: "
|
|
116920
|
+
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
116921
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
116917
116922
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
116918
116923
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -117420,7 +117425,7 @@ var ts;
|
|
|
117420
117425
|
return;
|
|
117421
117426
|
}
|
|
117422
117427
|
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: "
|
|
117428
|
+
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
117429
|
}
|
|
117425
117430
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
117426
117431
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -118565,7 +118570,7 @@ var ts;
|
|
|
118565
118570
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
118566
118571
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
118567
118572
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
118568
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
118573
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
118569
118574
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
118570
118575
|
// Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
|
|
118571
118576
|
return {
|
|
@@ -119547,13 +119552,15 @@ var ts;
|
|
|
119547
119552
|
if (host.fileExists(packageJsonPath)) {
|
|
119548
119553
|
var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
|
|
119549
119554
|
// TODO: Inject `require` or `import` condition based on the intended import mode
|
|
119550
|
-
|
|
119551
|
-
|
|
119552
|
-
|
|
119553
|
-
|
|
119554
|
-
|
|
119555
|
-
|
|
119556
|
-
|
|
119555
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
119556
|
+
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
|
|
119557
|
+
if (fromExports) {
|
|
119558
|
+
var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
119559
|
+
return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
|
|
119560
|
+
}
|
|
119561
|
+
if (packageJsonContent.exports) {
|
|
119562
|
+
return { moduleFileToTry: path, blockedByExports: true };
|
|
119563
|
+
}
|
|
119557
119564
|
}
|
|
119558
119565
|
var versionPaths = packageJsonContent.typesVersions
|
|
119559
119566
|
? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
|
|
@@ -119677,7 +119684,7 @@ var ts;
|
|
|
119677
119684
|
}
|
|
119678
119685
|
function getJSExtensionForFile(fileName, options) {
|
|
119679
119686
|
var _a;
|
|
119680
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
119687
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
119681
119688
|
}
|
|
119682
119689
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
119683
119690
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -119780,8 +119787,8 @@ var ts;
|
|
|
119780
119787
|
return pretty ?
|
|
119781
119788
|
function (diagnostic, newLine, options) {
|
|
119782
119789
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
119783
|
-
var output = "["
|
|
119784
|
-
output += ""
|
|
119790
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
119791
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
119785
119792
|
system.write(output);
|
|
119786
119793
|
} :
|
|
119787
119794
|
function (diagnostic, newLine, options) {
|
|
@@ -119789,8 +119796,8 @@ var ts;
|
|
|
119789
119796
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
119790
119797
|
output += newLine;
|
|
119791
119798
|
}
|
|
119792
|
-
output += getLocaleTimeString(system)
|
|
119793
|
-
output += ""
|
|
119799
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
119800
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
119794
119801
|
system.write(output);
|
|
119795
119802
|
};
|
|
119796
119803
|
}
|
|
@@ -119818,7 +119825,7 @@ var ts;
|
|
|
119818
119825
|
if (errorCount === 0)
|
|
119819
119826
|
return "";
|
|
119820
119827
|
var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
|
|
119821
|
-
return ""
|
|
119828
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
|
|
119822
119829
|
}
|
|
119823
119830
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
119824
119831
|
function isBuilderProgram(program) {
|
|
@@ -119844,9 +119851,9 @@ var ts;
|
|
|
119844
119851
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
119845
119852
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
119846
119853
|
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(" "
|
|
119854
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
119855
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
119856
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
119850
119857
|
}
|
|
119851
119858
|
}
|
|
119852
119859
|
ts.explainFiles = explainFiles;
|
|
@@ -119886,7 +119893,7 @@ var ts;
|
|
|
119886
119893
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
|
|
119887
119894
|
return false;
|
|
119888
119895
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
119889
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
119896
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
119890
119897
|
});
|
|
119891
119898
|
}
|
|
119892
119899
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -119895,7 +119902,7 @@ var ts;
|
|
|
119895
119902
|
var options = program.getCompilerOptions();
|
|
119896
119903
|
if (ts.isReferencedFile(reason)) {
|
|
119897
119904
|
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) : "\""
|
|
119905
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
119899
119906
|
var message = void 0;
|
|
119900
119907
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
119901
119908
|
switch (reason.kind) {
|
|
@@ -120019,7 +120026,7 @@ var ts;
|
|
|
120019
120026
|
var currentDir_1 = program.getCurrentDirectory();
|
|
120020
120027
|
ts.forEach(emittedFiles, function (file) {
|
|
120021
120028
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
120022
|
-
write("TSFILE: "
|
|
120029
|
+
write("TSFILE: ".concat(filepath));
|
|
120023
120030
|
});
|
|
120024
120031
|
listFiles(program, write);
|
|
120025
120032
|
}
|
|
@@ -120347,7 +120354,7 @@ var ts;
|
|
|
120347
120354
|
}
|
|
120348
120355
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
120349
120356
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
120350
|
-
writeLog("Current directory: "
|
|
120357
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
120351
120358
|
var configFileWatcher;
|
|
120352
120359
|
if (configFileName) {
|
|
120353
120360
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -120496,10 +120503,10 @@ var ts;
|
|
|
120496
120503
|
function createNewProgram(hasInvalidatedResolution) {
|
|
120497
120504
|
// Compile the program
|
|
120498
120505
|
writeLog("CreatingProgramWith::");
|
|
120499
|
-
writeLog(" roots: "
|
|
120500
|
-
writeLog(" options: "
|
|
120506
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
120507
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
120501
120508
|
if (projectReferences)
|
|
120502
|
-
writeLog(" projectReferences: "
|
|
120509
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
120503
120510
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
120504
120511
|
hasChangedCompilerOptions = false;
|
|
120505
120512
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -120660,7 +120667,7 @@ var ts;
|
|
|
120660
120667
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
120661
120668
|
}
|
|
120662
120669
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
120663
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
120670
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
120664
120671
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
120665
120672
|
}
|
|
120666
120673
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -120720,7 +120727,7 @@ var ts;
|
|
|
120720
120727
|
synchronizeProgram();
|
|
120721
120728
|
}
|
|
120722
120729
|
function reloadConfigFile() {
|
|
120723
|
-
writeLog("Reloading config file: "
|
|
120730
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
120724
120731
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
120725
120732
|
if (cachedDirectoryStructureHost) {
|
|
120726
120733
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -120761,7 +120768,7 @@ var ts;
|
|
|
120761
120768
|
return config.parsedCommandLine;
|
|
120762
120769
|
}
|
|
120763
120770
|
}
|
|
120764
|
-
writeLog("Loading config file: "
|
|
120771
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
120765
120772
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
120766
120773
|
host.getParsedCommandLine(configFileName) :
|
|
120767
120774
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -121065,8 +121072,8 @@ var ts;
|
|
|
121065
121072
|
*/
|
|
121066
121073
|
function createBuilderStatusReporter(system, pretty) {
|
|
121067
121074
|
return function (diagnostic) {
|
|
121068
|
-
var output = pretty ? "["
|
|
121069
|
-
output += ""
|
|
121075
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
121076
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
121070
121077
|
system.write(output);
|
|
121071
121078
|
};
|
|
121072
121079
|
}
|
|
@@ -121841,7 +121848,7 @@ var ts;
|
|
|
121841
121848
|
function listEmittedFile(_a, proj, file) {
|
|
121842
121849
|
var write = _a.write;
|
|
121843
121850
|
if (write && proj.options.listEmittedFiles) {
|
|
121844
|
-
write("TSFILE: "
|
|
121851
|
+
write("TSFILE: ".concat(file));
|
|
121845
121852
|
}
|
|
121846
121853
|
}
|
|
121847
121854
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -121870,7 +121877,7 @@ var ts;
|
|
|
121870
121877
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
121871
121878
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
121872
121879
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
121873
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
121880
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
121874
121881
|
if (canEmitBuildInfo)
|
|
121875
121882
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
121876
121883
|
afterProgramDone(state, program, config);
|
|
@@ -121898,7 +121905,7 @@ var ts;
|
|
|
121898
121905
|
if (!host.fileExists(inputFile)) {
|
|
121899
121906
|
return {
|
|
121900
121907
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
121901
|
-
reason: inputFile
|
|
121908
|
+
reason: "".concat(inputFile, " does not exist")
|
|
121902
121909
|
};
|
|
121903
121910
|
}
|
|
121904
121911
|
if (!force) {
|
|
@@ -122257,7 +122264,7 @@ var ts;
|
|
|
122257
122264
|
}
|
|
122258
122265
|
}
|
|
122259
122266
|
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 * "
|
|
122267
|
+
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
122268
|
}
|
|
122262
122269
|
return ts.ExitStatus.Success;
|
|
122263
122270
|
}
|
|
@@ -122590,7 +122597,7 @@ var ts;
|
|
|
122590
122597
|
function nowString() {
|
|
122591
122598
|
// E.g. "12:34:56.789"
|
|
122592
122599
|
var d = new Date();
|
|
122593
|
-
return ts.padLeft(d.getHours().toString(), 2, "0")
|
|
122600
|
+
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
122601
|
}
|
|
122595
122602
|
server.nowString = nowString;
|
|
122596
122603
|
})(server = ts.server || (ts.server = {}));
|
|
@@ -122601,7 +122608,7 @@ var ts;
|
|
|
122601
122608
|
var JsTyping;
|
|
122602
122609
|
(function (JsTyping) {
|
|
122603
122610
|
function isTypingUpToDate(cachedTyping, availableTypingVersions) {
|
|
122604
|
-
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts"
|
|
122611
|
+
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
|
|
122605
122612
|
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
|
122606
122613
|
}
|
|
122607
122614
|
JsTyping.isTypingUpToDate = isTypingUpToDate;
|
|
@@ -122654,7 +122661,7 @@ var ts;
|
|
|
122654
122661
|
"worker_threads",
|
|
122655
122662
|
"zlib"
|
|
122656
122663
|
];
|
|
122657
|
-
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:"
|
|
122664
|
+
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
|
|
122658
122665
|
JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
|
|
122659
122666
|
JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
|
|
122660
122667
|
function nonRelativeModuleNameForTypingCache(moduleName) {
|
|
@@ -122733,7 +122740,7 @@ var ts;
|
|
|
122733
122740
|
var excludeTypingName = exclude_1[_i];
|
|
122734
122741
|
var didDelete = inferredTypings.delete(excludeTypingName);
|
|
122735
122742
|
if (didDelete && log)
|
|
122736
|
-
log("Typing for "
|
|
122743
|
+
log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
|
|
122737
122744
|
}
|
|
122738
122745
|
var newTypingNames = [];
|
|
122739
122746
|
var cachedTypingPaths = [];
|
|
@@ -122747,7 +122754,7 @@ var ts;
|
|
|
122747
122754
|
});
|
|
122748
122755
|
var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
|
|
122749
122756
|
if (log)
|
|
122750
|
-
log("Result: "
|
|
122757
|
+
log("Result: ".concat(JSON.stringify(result)));
|
|
122751
122758
|
return result;
|
|
122752
122759
|
function addInferredTyping(typingName) {
|
|
122753
122760
|
if (!inferredTypings.has(typingName)) {
|
|
@@ -122756,7 +122763,7 @@ var ts;
|
|
|
122756
122763
|
}
|
|
122757
122764
|
function addInferredTypings(typingNames, message) {
|
|
122758
122765
|
if (log)
|
|
122759
|
-
log(message
|
|
122766
|
+
log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
|
|
122760
122767
|
ts.forEach(typingNames, addInferredTyping);
|
|
122761
122768
|
}
|
|
122762
122769
|
/**
|
|
@@ -122769,7 +122776,7 @@ var ts;
|
|
|
122769
122776
|
filesToWatch.push(jsonPath);
|
|
122770
122777
|
var jsonConfig = ts.readConfigFile(jsonPath, function (path) { return host.readFile(path); }).config;
|
|
122771
122778
|
var jsonTypingNames = ts.flatMap([jsonConfig.dependencies, jsonConfig.devDependencies, jsonConfig.optionalDependencies, jsonConfig.peerDependencies], ts.getOwnKeys);
|
|
122772
|
-
addInferredTypings(jsonTypingNames, "Typing names in '"
|
|
122779
|
+
addInferredTypings(jsonTypingNames, "Typing names in '".concat(jsonPath, "' dependencies"));
|
|
122773
122780
|
}
|
|
122774
122781
|
/**
|
|
122775
122782
|
* Infer typing names from given file names. For example, the file name "jquery-min.2.3.4.js"
|
|
@@ -122808,7 +122815,7 @@ var ts;
|
|
|
122808
122815
|
// depth of 2, so we access `node_modules/foo` but not `node_modules/foo/bar`
|
|
122809
122816
|
var fileNames = host.readDirectory(packagesFolderPath, [".json" /* Json */], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2);
|
|
122810
122817
|
if (log)
|
|
122811
|
-
log("Searching for typing names in "
|
|
122818
|
+
log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(fileNames)));
|
|
122812
122819
|
var packageNames = [];
|
|
122813
122820
|
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) {
|
|
122814
122821
|
var fileName = fileNames_1[_i];
|
|
@@ -122835,7 +122842,7 @@ var ts;
|
|
|
122835
122842
|
if (ownTypes) {
|
|
122836
122843
|
var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
|
|
122837
122844
|
if (log)
|
|
122838
|
-
log(" Package '"
|
|
122845
|
+
log(" Package '".concat(packageJson.name, "' provides its own types."));
|
|
122839
122846
|
inferredTypings.set(packageJson.name, absolutePath);
|
|
122840
122847
|
}
|
|
122841
122848
|
else {
|
|
@@ -122907,15 +122914,15 @@ var ts;
|
|
|
122907
122914
|
var kind = isScopeName ? "Scope" : "Package";
|
|
122908
122915
|
switch (result) {
|
|
122909
122916
|
case 1 /* EmptyName */:
|
|
122910
|
-
return "'"
|
|
122917
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
|
|
122911
122918
|
case 2 /* NameTooLong */:
|
|
122912
|
-
return "'"
|
|
122919
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
|
|
122913
122920
|
case 3 /* NameStartsWithDot */:
|
|
122914
|
-
return "'"
|
|
122921
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
|
|
122915
122922
|
case 4 /* NameStartsWithUnderscore */:
|
|
122916
|
-
return "'"
|
|
122923
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
|
|
122917
122924
|
case 5 /* NameContainsNonURISafeCharacters */:
|
|
122918
|
-
return "'"
|
|
122925
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
|
|
122919
122926
|
case 0 /* Ok */:
|
|
122920
122927
|
return ts.Debug.fail(); // Shouldn't have called this.
|
|
122921
122928
|
default:
|
|
@@ -125473,7 +125480,7 @@ var ts;
|
|
|
125473
125480
|
var prefix = ts.isJSDocLink(link) ? "link"
|
|
125474
125481
|
: ts.isJSDocLinkCode(link) ? "linkcode"
|
|
125475
125482
|
: "linkplain";
|
|
125476
|
-
var parts = [linkPart("{@"
|
|
125483
|
+
var parts = [linkPart("{@".concat(prefix, " "))];
|
|
125477
125484
|
if (!link.name) {
|
|
125478
125485
|
if (link.text)
|
|
125479
125486
|
parts.push(linkTextPart(link.text));
|
|
@@ -125721,7 +125728,7 @@ var ts;
|
|
|
125721
125728
|
function getUniqueName(baseName, sourceFile) {
|
|
125722
125729
|
var nameText = baseName;
|
|
125723
125730
|
for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
|
|
125724
|
-
nameText = baseName
|
|
125731
|
+
nameText = "".concat(baseName, "_").concat(i);
|
|
125725
125732
|
}
|
|
125726
125733
|
return nameText;
|
|
125727
125734
|
}
|
|
@@ -125831,7 +125838,7 @@ var ts;
|
|
|
125831
125838
|
// Editors can pass in undefined or empty string - we want to infer the preference in those cases.
|
|
125832
125839
|
var quotePreference = getQuotePreference(sourceFile, preferences);
|
|
125833
125840
|
var quoted = JSON.stringify(text);
|
|
125834
|
-
return quotePreference === 0 /* Single */ ? "'"
|
|
125841
|
+
return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
|
|
125835
125842
|
}
|
|
125836
125843
|
ts.quote = quote;
|
|
125837
125844
|
function isEqualityOperatorKind(kind) {
|
|
@@ -126203,7 +126210,7 @@ var ts;
|
|
|
126203
126210
|
var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
|
|
126204
126211
|
// Scoped packages
|
|
126205
126212
|
if (ts.startsWith(components[0], "@")) {
|
|
126206
|
-
return components[0]
|
|
126213
|
+
return "".concat(components[0], "/").concat(components[1]);
|
|
126207
126214
|
}
|
|
126208
126215
|
return components[0];
|
|
126209
126216
|
}
|
|
@@ -126310,13 +126317,13 @@ var ts;
|
|
|
126310
126317
|
ts.getNameForExportedSymbol = getNameForExportedSymbol;
|
|
126311
126318
|
function getSymbolParentOrFail(symbol) {
|
|
126312
126319
|
var _a;
|
|
126313
|
-
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: "
|
|
126314
|
-
|
|
126320
|
+
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
|
|
126321
|
+
"Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
|
|
126315
126322
|
var kind = ts.Debug.formatSyntaxKind(d.kind);
|
|
126316
126323
|
var inJS = ts.isInJSFile(d);
|
|
126317
126324
|
var expression = d.expression;
|
|
126318
|
-
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: "
|
|
126319
|
-
}).join(", ")
|
|
126325
|
+
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
|
|
126326
|
+
}).join(", "), "."));
|
|
126320
126327
|
}
|
|
126321
126328
|
/**
|
|
126322
126329
|
* Useful to check whether a string contains another string at a specific index
|
|
@@ -126524,7 +126531,7 @@ var ts;
|
|
|
126524
126531
|
: checker.tryFindAmbientModule(info.moduleName));
|
|
126525
126532
|
var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
|
|
126526
126533
|
? checker.resolveExternalModuleSymbol(moduleSymbol)
|
|
126527
|
-
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '"
|
|
126534
|
+
: 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
126535
|
symbols.set(id, [symbol, moduleSymbol]);
|
|
126529
126536
|
return {
|
|
126530
126537
|
symbol: symbol,
|
|
@@ -126537,7 +126544,7 @@ var ts;
|
|
|
126537
126544
|
}
|
|
126538
126545
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
126539
126546
|
var moduleKey = ambientModuleName || "";
|
|
126540
|
-
return importedName
|
|
126547
|
+
return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
|
|
126541
126548
|
}
|
|
126542
126549
|
function parseKey(key) {
|
|
126543
126550
|
var symbolName = key.substring(0, key.indexOf("|"));
|
|
@@ -126617,7 +126624,7 @@ var ts;
|
|
|
126617
126624
|
if (autoImportProvider) {
|
|
126618
126625
|
var start = ts.timestamp();
|
|
126619
126626
|
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: "
|
|
126627
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
|
|
126621
126628
|
}
|
|
126622
126629
|
}
|
|
126623
126630
|
ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
|
|
@@ -126671,7 +126678,7 @@ var ts;
|
|
|
126671
126678
|
}
|
|
126672
126679
|
});
|
|
126673
126680
|
});
|
|
126674
|
-
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in "
|
|
126681
|
+
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
|
|
126675
126682
|
return cache;
|
|
126676
126683
|
}
|
|
126677
126684
|
ts.getExportInfoMap = getExportInfoMap;
|
|
@@ -127204,7 +127211,7 @@ var ts;
|
|
|
127204
127211
|
return { spans: spans, endOfLineState: 0 /* None */ };
|
|
127205
127212
|
function pushClassification(start, end, type) {
|
|
127206
127213
|
var length = end - start;
|
|
127207
|
-
ts.Debug.assert(length > 0, "Classification had non-positive length of "
|
|
127214
|
+
ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
|
|
127208
127215
|
spans.push(start);
|
|
127209
127216
|
spans.push(length);
|
|
127210
127217
|
spans.push(type);
|
|
@@ -128072,7 +128079,7 @@ var ts;
|
|
|
128072
128079
|
case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
|
|
128073
128080
|
case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
|
|
128074
128081
|
case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
|
|
128075
|
-
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension "
|
|
128082
|
+
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
|
|
128076
128083
|
case undefined: return "" /* none */;
|
|
128077
128084
|
default:
|
|
128078
128085
|
return ts.Debug.assertNever(extension);
|
|
@@ -128801,10 +128808,10 @@ var ts;
|
|
|
128801
128808
|
var resolvedFromCacheCount = 0;
|
|
128802
128809
|
var cacheAttemptCount = 0;
|
|
128803
128810
|
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
|
|
128811
|
+
var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
|
|
128812
|
+
(_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));
|
|
128813
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
|
|
128814
|
+
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
|
|
128808
128815
|
return result;
|
|
128809
128816
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
128810
128817
|
if (isFromAmbientModule) {
|
|
@@ -129107,15 +129114,15 @@ var ts;
|
|
|
129107
129114
|
var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
|
|
129108
129115
|
if (origin && originIsThisType(origin)) {
|
|
129109
129116
|
insertText = needsConvertPropertyAccess
|
|
129110
|
-
? "this"
|
|
129111
|
-
: "this"
|
|
129117
|
+
? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
|
|
129118
|
+
: "this".concat(insertQuestionDot ? "?." : ".").concat(name);
|
|
129112
129119
|
}
|
|
129113
129120
|
// We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
|
|
129114
129121
|
// 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
129122
|
else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
|
|
129116
|
-
insertText = useBraces ? needsConvertPropertyAccess ? "["
|
|
129123
|
+
insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
|
|
129117
129124
|
if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
|
|
129118
|
-
insertText = "?."
|
|
129125
|
+
insertText = "?.".concat(insertText);
|
|
129119
129126
|
}
|
|
129120
129127
|
var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
|
|
129121
129128
|
ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
|
|
@@ -129129,7 +129136,7 @@ var ts;
|
|
|
129129
129136
|
if (isJsxInitializer) {
|
|
129130
129137
|
if (insertText === undefined)
|
|
129131
129138
|
insertText = name;
|
|
129132
|
-
insertText = "{"
|
|
129139
|
+
insertText = "{".concat(insertText, "}");
|
|
129133
129140
|
if (typeof isJsxInitializer !== "boolean") {
|
|
129134
129141
|
replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
|
|
129135
129142
|
}
|
|
@@ -129142,8 +129149,8 @@ var ts;
|
|
|
129142
129149
|
if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
|
|
129143
129150
|
awaitText = ";";
|
|
129144
129151
|
}
|
|
129145
|
-
awaitText += "(await "
|
|
129146
|
-
insertText = needsConvertPropertyAccess ? ""
|
|
129152
|
+
awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
|
|
129153
|
+
insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
|
|
129147
129154
|
replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
|
|
129148
129155
|
}
|
|
129149
129156
|
if (originIsResolvedExport(origin)) {
|
|
@@ -129174,7 +129181,7 @@ var ts;
|
|
|
129174
129181
|
&& !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
|
|
129175
129182
|
if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
|
|
129176
129183
|
// If is string like or undefined use quotes
|
|
129177
|
-
insertText = ts.escapeSnippetText(name)
|
|
129184
|
+
insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
|
|
129178
129185
|
isSnippet = true;
|
|
129179
129186
|
}
|
|
129180
129187
|
else {
|
|
@@ -129183,12 +129190,9 @@ var ts;
|
|
|
129183
129190
|
}
|
|
129184
129191
|
}
|
|
129185
129192
|
if (useBraces_1) {
|
|
129186
|
-
insertText = ts.escapeSnippetText(name)
|
|
129193
|
+
insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
|
|
129187
129194
|
isSnippet = true;
|
|
129188
129195
|
}
|
|
129189
|
-
if (isSnippet) {
|
|
129190
|
-
replacementSpan = ts.createTextSpanFromNode(location, sourceFile);
|
|
129191
|
-
}
|
|
129192
129196
|
}
|
|
129193
129197
|
if (insertText !== undefined && !preferences.includeCompletionsWithInsertText) {
|
|
129194
129198
|
return undefined;
|
|
@@ -129273,7 +129277,7 @@ var ts;
|
|
|
129273
129277
|
removeComments: true,
|
|
129274
129278
|
module: options.module,
|
|
129275
129279
|
target: options.target,
|
|
129276
|
-
omitTrailingSemicolon:
|
|
129280
|
+
omitTrailingSemicolon: false,
|
|
129277
129281
|
newLine: ts.getNewLineKind(ts.getNewLineCharacter(options, ts.maybeBind(host, host.getNewLine))),
|
|
129278
129282
|
});
|
|
129279
129283
|
var importAdder = ts.codefix.createImportAdder(sourceFile, program, preferences, host);
|
|
@@ -129329,9 +129333,9 @@ var ts;
|
|
|
129329
129333
|
}
|
|
129330
129334
|
node = ts.factory.updateModifiers(node, modifiers & (~presentModifiers));
|
|
129331
129335
|
completionNodes.push(node);
|
|
129332
|
-
}, body, isAbstract);
|
|
129336
|
+
}, body, 2 /* Property */, isAbstract);
|
|
129333
129337
|
if (completionNodes.length) {
|
|
129334
|
-
insertText = printer.printSnippetList(1 /* MultiLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
129338
|
+
insertText = printer.printSnippetList(1 /* MultiLine */ | 131072 /* NoTrailingNewLine */, ts.factory.createNodeArray(completionNodes), sourceFile);
|
|
129335
129339
|
}
|
|
129336
129340
|
return { insertText: insertText, isSnippet: isSnippet, importAdder: importAdder };
|
|
129337
129341
|
}
|
|
@@ -129450,14 +129454,14 @@ var ts;
|
|
|
129450
129454
|
var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
|
|
129451
129455
|
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
129456
|
var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
|
|
129453
|
-
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " "
|
|
129454
|
-
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */)
|
|
129457
|
+
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
|
|
129458
|
+
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
|
|
129455
129459
|
var suffix = useSemicolons ? ";" : "";
|
|
129456
129460
|
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"
|
|
129461
|
+
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
|
|
129462
|
+
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129463
|
+
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129464
|
+
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
129461
129465
|
}
|
|
129462
129466
|
}
|
|
129463
129467
|
function quotePropertyName(sourceFile, preferences, name) {
|
|
@@ -132356,7 +132360,7 @@ var ts;
|
|
|
132356
132360
|
}
|
|
132357
132361
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
132358
132362
|
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:"
|
|
132363
|
+
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
132364
|
return entry;
|
|
132361
132365
|
}
|
|
132362
132366
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
@@ -133368,7 +133372,7 @@ var ts;
|
|
|
133368
133372
|
sourceFile: def.file,
|
|
133369
133373
|
name: def.reference.fileName,
|
|
133370
133374
|
kind: "string" /* string */,
|
|
133371
|
-
displayParts: [ts.displayPart("\""
|
|
133375
|
+
displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
|
|
133372
133376
|
};
|
|
133373
133377
|
}
|
|
133374
133378
|
default:
|
|
@@ -133948,7 +133952,7 @@ var ts;
|
|
|
133948
133952
|
if (symbol.flags & 33554432 /* Transient */)
|
|
133949
133953
|
return undefined;
|
|
133950
133954
|
// Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
|
|
133951
|
-
ts.Debug.fail("Unexpected symbol at "
|
|
133955
|
+
ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
|
|
133952
133956
|
}
|
|
133953
133957
|
return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
|
|
133954
133958
|
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
|
|
@@ -135232,8 +135236,8 @@ var ts;
|
|
|
135232
135236
|
var end = pos + 6; /* "static".length */
|
|
135233
135237
|
var typeChecker = program.getTypeChecker();
|
|
135234
135238
|
var symbol = typeChecker.getSymbolAtLocation(node.parent);
|
|
135235
|
-
var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent)
|
|
135236
|
-
return { text: prefix
|
|
135239
|
+
var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
|
|
135240
|
+
return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
|
|
135237
135241
|
}
|
|
135238
135242
|
var declName = isConstNamedExpression(node) ? node.parent.name :
|
|
135239
135243
|
ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
@@ -136494,7 +136498,7 @@ var ts;
|
|
|
136494
136498
|
function getJSDocTagCompletions() {
|
|
136495
136499
|
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
|
|
136496
136500
|
return {
|
|
136497
|
-
name: "@"
|
|
136501
|
+
name: "@".concat(tagName),
|
|
136498
136502
|
kind: "keyword" /* keyword */,
|
|
136499
136503
|
kindModifiers: "",
|
|
136500
136504
|
sortText: ts.Completions.SortText.LocationPriority
|
|
@@ -136626,11 +136630,11 @@ var ts;
|
|
|
136626
136630
|
var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
|
|
136627
136631
|
var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
|
|
136628
136632
|
var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
|
|
136629
|
-
return indentationStr
|
|
136633
|
+
return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
|
|
136630
136634
|
}).join("");
|
|
136631
136635
|
}
|
|
136632
136636
|
function returnsDocComment(indentationStr, newLine) {
|
|
136633
|
-
return indentationStr
|
|
136637
|
+
return "".concat(indentationStr, " * @returns").concat(newLine);
|
|
136634
136638
|
}
|
|
136635
136639
|
function getCommentOwnerInfo(tokenAtPos, options) {
|
|
136636
136640
|
return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
|
|
@@ -137470,7 +137474,7 @@ var ts;
|
|
|
137470
137474
|
}
|
|
137471
137475
|
if (name) {
|
|
137472
137476
|
var text = ts.isIdentifier(name) ? name.text
|
|
137473
|
-
: ts.isElementAccessExpression(name) ? "["
|
|
137477
|
+
: ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
|
|
137474
137478
|
: nodeText(name);
|
|
137475
137479
|
if (text.length > 0) {
|
|
137476
137480
|
return cleanText(text);
|
|
@@ -137480,7 +137484,7 @@ var ts;
|
|
|
137480
137484
|
case 303 /* SourceFile */:
|
|
137481
137485
|
var sourceFile = node;
|
|
137482
137486
|
return ts.isExternalModule(sourceFile)
|
|
137483
|
-
? "\""
|
|
137487
|
+
? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
|
|
137484
137488
|
: "<global>";
|
|
137485
137489
|
case 270 /* ExportAssignment */:
|
|
137486
137490
|
return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
|
|
@@ -137676,10 +137680,10 @@ var ts;
|
|
|
137676
137680
|
if (name !== undefined) {
|
|
137677
137681
|
name = cleanText(name);
|
|
137678
137682
|
if (name.length > maxLength) {
|
|
137679
|
-
return name
|
|
137683
|
+
return "".concat(name, " callback");
|
|
137680
137684
|
}
|
|
137681
137685
|
var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
|
|
137682
|
-
return name
|
|
137686
|
+
return "".concat(name, "(").concat(args, ") callback");
|
|
137683
137687
|
}
|
|
137684
137688
|
}
|
|
137685
137689
|
return "<function>";
|
|
@@ -137692,7 +137696,7 @@ var ts;
|
|
|
137692
137696
|
else if (ts.isPropertyAccessExpression(expr)) {
|
|
137693
137697
|
var left = getCalledExpressionName(expr.expression);
|
|
137694
137698
|
var right = expr.name.text;
|
|
137695
|
-
return left === undefined ? right : left
|
|
137699
|
+
return left === undefined ? right : "".concat(left, ".").concat(right);
|
|
137696
137700
|
}
|
|
137697
137701
|
else {
|
|
137698
137702
|
return undefined;
|
|
@@ -140124,7 +140128,7 @@ var ts;
|
|
|
140124
140128
|
var _loop_9 = function (n) {
|
|
140125
140129
|
// If the node is not a subspan of its parent, this is a big problem.
|
|
140126
140130
|
// 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: "
|
|
140131
|
+
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
140132
|
var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
|
|
140129
140133
|
if (argumentInfo) {
|
|
140130
140134
|
return { value: argumentInfo };
|
|
@@ -140296,7 +140300,7 @@ var ts;
|
|
|
140296
140300
|
(function (InlayHints) {
|
|
140297
140301
|
var maxHintsLength = 30;
|
|
140298
140302
|
var leadingParameterNameCommentRegexFactory = function (name) {
|
|
140299
|
-
return new RegExp("^\\s?/\\*\\*?\\s?"
|
|
140303
|
+
return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
|
|
140300
140304
|
};
|
|
140301
140305
|
function shouldShowParameterNameHints(preferences) {
|
|
140302
140306
|
return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
|
|
@@ -140360,7 +140364,7 @@ var ts;
|
|
|
140360
140364
|
}
|
|
140361
140365
|
function addParameterHints(text, position, isFirstVariadicArgument) {
|
|
140362
140366
|
result.push({
|
|
140363
|
-
text: ""
|
|
140367
|
+
text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
|
|
140364
140368
|
position: position,
|
|
140365
140369
|
kind: "Parameter" /* Parameter */,
|
|
140366
140370
|
whitespaceAfter: true,
|
|
@@ -140368,7 +140372,7 @@ var ts;
|
|
|
140368
140372
|
}
|
|
140369
140373
|
function addTypeHints(text, position) {
|
|
140370
140374
|
result.push({
|
|
140371
|
-
text: ": "
|
|
140375
|
+
text: ": ".concat(truncation(text, maxHintsLength)),
|
|
140372
140376
|
position: position,
|
|
140373
140377
|
kind: "Type" /* Type */,
|
|
140374
140378
|
whitespaceBefore: true,
|
|
@@ -140376,7 +140380,7 @@ var ts;
|
|
|
140376
140380
|
}
|
|
140377
140381
|
function addEnumMemberValueHints(text, position) {
|
|
140378
140382
|
result.push({
|
|
140379
|
-
text: "= "
|
|
140383
|
+
text: "= ".concat(truncation(text, maxHintsLength)),
|
|
140380
140384
|
position: position,
|
|
140381
140385
|
kind: "Enum" /* Enum */,
|
|
140382
140386
|
whitespaceBefore: true,
|
|
@@ -140911,7 +140915,7 @@ var ts;
|
|
|
140911
140915
|
}
|
|
140912
140916
|
}
|
|
140913
140917
|
function getKeyFromNode(exp) {
|
|
140914
|
-
return exp.pos.toString()
|
|
140918
|
+
return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
|
|
140915
140919
|
}
|
|
140916
140920
|
function canBeConvertedToClass(node, checker) {
|
|
140917
140921
|
var _a, _b, _c, _d;
|
|
@@ -145029,7 +145033,7 @@ var ts;
|
|
|
145029
145033
|
var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
145030
145034
|
var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
145031
145035
|
var indent = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
145032
|
-
var text = (insertAtLineStart ? "" : this.newLineCharacter
|
|
145036
|
+
var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
|
|
145033
145037
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
145034
145038
|
};
|
|
145035
145039
|
ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
|
|
@@ -145229,7 +145233,7 @@ var ts;
|
|
|
145229
145233
|
};
|
|
145230
145234
|
ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
|
|
145231
145235
|
var options = this.getInsertNodeAfterOptionsWorker(after);
|
|
145232
|
-
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n"
|
|
145236
|
+
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
|
|
145233
145237
|
};
|
|
145234
145238
|
ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
|
|
145235
145239
|
switch (node.kind) {
|
|
@@ -145263,7 +145267,7 @@ var ts;
|
|
|
145263
145267
|
}
|
|
145264
145268
|
else {
|
|
145265
145269
|
// `x => {}` -> `function f(x) {}`
|
|
145266
|
-
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function "
|
|
145270
|
+
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
|
|
145267
145271
|
// Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
|
|
145268
145272
|
this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
|
|
145269
145273
|
}
|
|
@@ -145320,7 +145324,7 @@ var ts;
|
|
|
145320
145324
|
var nextNode = containingList[index + 1];
|
|
145321
145325
|
var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
145322
145326
|
// write separator and leading trivia of the next element as suffix
|
|
145323
|
-
var suffix = ""
|
|
145327
|
+
var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
|
|
145324
145328
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
|
|
145325
145329
|
}
|
|
145326
145330
|
}
|
|
@@ -145365,7 +145369,7 @@ var ts;
|
|
|
145365
145369
|
this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
|
|
145366
145370
|
}
|
|
145367
145371
|
else {
|
|
145368
|
-
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator)
|
|
145372
|
+
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
|
|
145369
145373
|
}
|
|
145370
145374
|
}
|
|
145371
145375
|
};
|
|
@@ -145467,7 +145471,7 @@ var ts;
|
|
|
145467
145471
|
var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
|
|
145468
145472
|
var _loop_12 = function (i) {
|
|
145469
145473
|
ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
|
|
145470
|
-
return JSON.stringify(normalized[i].range)
|
|
145474
|
+
return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
|
|
145471
145475
|
});
|
|
145472
145476
|
};
|
|
145473
145477
|
// verify that change intervals do not overlap, except possibly at end points.
|
|
@@ -145564,7 +145568,7 @@ var ts;
|
|
|
145564
145568
|
function applyChanges(text, changes) {
|
|
145565
145569
|
for (var i = changes.length - 1; i >= 0; i--) {
|
|
145566
145570
|
var _a = changes[i], span = _a.span, newText = _a.newText;
|
|
145567
|
-
text = ""
|
|
145571
|
+
text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
|
|
145568
145572
|
}
|
|
145569
145573
|
return text;
|
|
145570
145574
|
}
|
|
@@ -146695,9 +146699,6 @@ var ts;
|
|
|
146695
146699
|
});
|
|
146696
146700
|
function makeChange(changeTracker, sourceFile, pos) {
|
|
146697
146701
|
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
146702
|
var param = token.parent;
|
|
146702
146703
|
if (!ts.isParameter(param)) {
|
|
146703
146704
|
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.Debug.formatSyntaxKind(token.kind));
|
|
@@ -146705,9 +146706,10 @@ var ts;
|
|
|
146705
146706
|
var i = param.parent.parameters.indexOf(param);
|
|
146706
146707
|
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
|
|
146707
146708
|
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
|
|
146709
|
+
var typeNode = ts.factory.createTypeReferenceNode(param.name, /*typeArguments*/ undefined);
|
|
146708
146710
|
var replacement = ts.factory.createParameterDeclaration(
|
|
146709
|
-
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.factory.
|
|
146710
|
-
changeTracker.replaceNode(sourceFile,
|
|
146711
|
+
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, param.dotDotDotToken ? ts.factory.createArrayTypeNode(typeNode) : typeNode, param.initializer);
|
|
146712
|
+
changeTracker.replaceNode(sourceFile, param, replacement);
|
|
146711
146713
|
}
|
|
146712
146714
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
146713
146715
|
})(ts || (ts = {}));
|
|
@@ -148038,7 +148040,7 @@ var ts;
|
|
|
148038
148040
|
if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
|
|
148039
148041
|
|| checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
|
|
148040
148042
|
// Unconditionally add an underscore in case `text` is a keyword.
|
|
148041
|
-
res.set(text, makeUniqueName("_"
|
|
148043
|
+
res.set(text, makeUniqueName("_".concat(text), identifiers));
|
|
148042
148044
|
}
|
|
148043
148045
|
});
|
|
148044
148046
|
return res;
|
|
@@ -148138,7 +148140,7 @@ var ts;
|
|
|
148138
148140
|
// `const a = require("b").c` --> `import { c as a } from "./b";
|
|
148139
148141
|
return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
|
|
148140
148142
|
default:
|
|
148141
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form "
|
|
148143
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
|
|
148142
148144
|
}
|
|
148143
148145
|
}
|
|
148144
148146
|
function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
|
|
@@ -148189,7 +148191,7 @@ var ts;
|
|
|
148189
148191
|
case 168 /* MethodDeclaration */:
|
|
148190
148192
|
return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
|
|
148191
148193
|
default:
|
|
148192
|
-
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind "
|
|
148194
|
+
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
|
|
148193
148195
|
}
|
|
148194
148196
|
});
|
|
148195
148197
|
return statements && [statements, false];
|
|
@@ -148323,7 +148325,7 @@ var ts;
|
|
|
148323
148325
|
case 79 /* Identifier */:
|
|
148324
148326
|
return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
|
|
148325
148327
|
default:
|
|
148326
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind "
|
|
148328
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
|
|
148327
148329
|
}
|
|
148328
148330
|
}
|
|
148329
148331
|
/**
|
|
@@ -148380,7 +148382,7 @@ var ts;
|
|
|
148380
148382
|
// Identifiers helpers
|
|
148381
148383
|
function makeUniqueName(name, identifiers) {
|
|
148382
148384
|
while (identifiers.original.has(name) || identifiers.additional.has(name)) {
|
|
148383
|
-
name = "_"
|
|
148385
|
+
name = "_".concat(name);
|
|
148384
148386
|
}
|
|
148385
148387
|
identifiers.additional.add(name);
|
|
148386
148388
|
return name;
|
|
@@ -148460,7 +148462,7 @@ var ts;
|
|
|
148460
148462
|
if (!qualifiedName)
|
|
148461
148463
|
return undefined;
|
|
148462
148464
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
|
|
148463
|
-
var newText = qualifiedName.left.text
|
|
148465
|
+
var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
|
|
148464
148466
|
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
148467
|
},
|
|
148466
148468
|
fixIds: [fixId],
|
|
@@ -148857,7 +148859,7 @@ var ts;
|
|
|
148857
148859
|
break;
|
|
148858
148860
|
}
|
|
148859
148861
|
default:
|
|
148860
|
-
ts.Debug.assertNever(fix, "fix wasn't never - got kind "
|
|
148862
|
+
ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
|
|
148861
148863
|
}
|
|
148862
148864
|
function reduceAddAsTypeOnlyValues(prevValue, newValue) {
|
|
148863
148865
|
// `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
|
|
@@ -148901,7 +148903,7 @@ var ts;
|
|
|
148901
148903
|
return newEntry;
|
|
148902
148904
|
}
|
|
148903
148905
|
function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
|
|
148904
|
-
return (topLevelTypeOnly ? 1 : 0
|
|
148906
|
+
return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
|
|
148905
148907
|
}
|
|
148906
148908
|
}
|
|
148907
148909
|
function writeFixes(changeTracker) {
|
|
@@ -149354,7 +149356,7 @@ var ts;
|
|
|
149354
149356
|
case ts.ModuleKind.NodeNext:
|
|
149355
149357
|
return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
|
|
149356
149358
|
default:
|
|
149357
|
-
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind "
|
|
149359
|
+
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
|
|
149358
149360
|
}
|
|
149359
149361
|
}
|
|
149360
149362
|
function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
|
|
@@ -149461,7 +149463,7 @@ var ts;
|
|
|
149461
149463
|
switch (fix.kind) {
|
|
149462
149464
|
case 0 /* UseNamespace */:
|
|
149463
149465
|
addNamespaceQualifier(changes, sourceFile, fix);
|
|
149464
|
-
return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix
|
|
149466
|
+
return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
|
|
149465
149467
|
case 1 /* JsdocTypeImport */:
|
|
149466
149468
|
addImportType(changes, sourceFile, fix, quotePreference);
|
|
149467
149469
|
return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
|
|
@@ -149485,7 +149487,7 @@ var ts;
|
|
|
149485
149487
|
return [importKind === 1 /* Default */ ? ts.Diagnostics.Import_default_0_from_module_1 : ts.Diagnostics.Import_0_from_module_1, symbolName, moduleSpecifier];
|
|
149486
149488
|
}
|
|
149487
149489
|
default:
|
|
149488
|
-
return ts.Debug.assertNever(fix, "Unexpected fix kind "
|
|
149490
|
+
return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
|
|
149489
149491
|
}
|
|
149490
149492
|
}
|
|
149491
149493
|
function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, compilerOptions) {
|
|
@@ -149581,7 +149583,7 @@ var ts;
|
|
|
149581
149583
|
}
|
|
149582
149584
|
function getImportTypePrefix(moduleSpecifier, quotePreference) {
|
|
149583
149585
|
var quote = ts.getQuoteFromPreference(quotePreference);
|
|
149584
|
-
return "import("
|
|
149586
|
+
return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
|
|
149585
149587
|
}
|
|
149586
149588
|
function needsTypeOnly(_a) {
|
|
149587
149589
|
var addAsTypeOnly = _a.addAsTypeOnly;
|
|
@@ -149674,7 +149676,7 @@ var ts;
|
|
|
149674
149676
|
lastCharWasValid = isValid;
|
|
149675
149677
|
}
|
|
149676
149678
|
// Need `|| "_"` to ensure result isn't empty.
|
|
149677
|
-
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_"
|
|
149679
|
+
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
|
|
149678
149680
|
}
|
|
149679
149681
|
codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
|
|
149680
149682
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -150874,7 +150876,7 @@ var ts;
|
|
|
150874
150876
|
break;
|
|
150875
150877
|
}
|
|
150876
150878
|
default:
|
|
150877
|
-
ts.Debug.fail("Bad fixId: "
|
|
150879
|
+
ts.Debug.fail("Bad fixId: ".concat(context.fixId));
|
|
150878
150880
|
}
|
|
150879
150881
|
});
|
|
150880
150882
|
},
|
|
@@ -151322,7 +151324,7 @@ var ts;
|
|
|
151322
151324
|
if (!isValidCharacter(character)) {
|
|
151323
151325
|
return;
|
|
151324
151326
|
}
|
|
151325
|
-
var replacement = useHtmlEntity ? htmlEntity[character] : "{"
|
|
151327
|
+
var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
|
|
151326
151328
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
151327
151329
|
}
|
|
151328
151330
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -151513,11 +151515,11 @@ var ts;
|
|
|
151513
151515
|
token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
|
|
151514
151516
|
}
|
|
151515
151517
|
if (ts.isIdentifier(token) && canPrefix(token)) {
|
|
151516
|
-
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_"
|
|
151518
|
+
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
|
|
151517
151519
|
if (ts.isParameter(token.parent)) {
|
|
151518
151520
|
ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
|
|
151519
151521
|
if (ts.isIdentifier(tag.name)) {
|
|
151520
|
-
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_"
|
|
151522
|
+
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
|
|
151521
151523
|
}
|
|
151522
151524
|
});
|
|
151523
151525
|
}
|
|
@@ -151853,7 +151855,7 @@ var ts;
|
|
|
151853
151855
|
}); }
|
|
151854
151856
|
});
|
|
151855
151857
|
function doChange(changes, sourceFile, name) {
|
|
151856
|
-
changes.replaceNodeWithText(sourceFile, name, name.text
|
|
151858
|
+
changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
|
|
151857
151859
|
}
|
|
151858
151860
|
function getCallName(sourceFile, start) {
|
|
151859
151861
|
var token = ts.getTokenAtPosition(sourceFile, start);
|
|
@@ -153002,7 +153004,7 @@ var ts;
|
|
|
153002
153004
|
var parameters = [];
|
|
153003
153005
|
var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
|
|
153004
153006
|
var _loop_16 = function (i) {
|
|
153005
|
-
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg"
|
|
153007
|
+
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
|
|
153006
153008
|
symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
|
|
153007
153009
|
if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
|
|
153008
153010
|
symbol.flags |= 16777216 /* Optional */;
|
|
@@ -153105,7 +153107,7 @@ var ts;
|
|
|
153105
153107
|
codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
|
|
153106
153108
|
ts.createTextChange(sourceFile.checkJsDirective
|
|
153107
153109
|
? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
|
|
153108
|
-
: ts.createTextSpan(0, 0), "// @ts-nocheck"
|
|
153110
|
+
: ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
|
|
153109
153111
|
])], ts.Diagnostics.Disable_checking_for_this_file),
|
|
153110
153112
|
];
|
|
153111
153113
|
if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
|
|
@@ -153161,11 +153163,18 @@ var ts;
|
|
|
153161
153163
|
};
|
|
153162
153164
|
}
|
|
153163
153165
|
codefix.getNoopSymbolTrackerWithResolver = getNoopSymbolTrackerWithResolver;
|
|
153166
|
+
var PreserveOptionalFlags;
|
|
153167
|
+
(function (PreserveOptionalFlags) {
|
|
153168
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Method"] = 1] = "Method";
|
|
153169
|
+
PreserveOptionalFlags[PreserveOptionalFlags["Property"] = 2] = "Property";
|
|
153170
|
+
PreserveOptionalFlags[PreserveOptionalFlags["All"] = 3] = "All";
|
|
153171
|
+
})(PreserveOptionalFlags = codefix.PreserveOptionalFlags || (codefix.PreserveOptionalFlags = {}));
|
|
153164
153172
|
/**
|
|
153165
153173
|
* `addClassElement` will not be called if we can't figure out a representation for `symbol` in `enclosingDeclaration`.
|
|
153166
153174
|
* @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
153175
|
*/
|
|
153168
|
-
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, isAmbient) {
|
|
153176
|
+
function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional, isAmbient) {
|
|
153177
|
+
if (preserveOptional === void 0) { preserveOptional = 3 /* All */; }
|
|
153169
153178
|
if (isAmbient === void 0) { isAmbient = false; }
|
|
153170
153179
|
var declarations = symbol.getDeclarations();
|
|
153171
153180
|
if (!(declarations && declarations.length)) {
|
|
@@ -153194,7 +153203,7 @@ var ts;
|
|
|
153194
153203
|
}
|
|
153195
153204
|
}
|
|
153196
153205
|
addClassElement(ts.factory.createPropertyDeclaration(
|
|
153197
|
-
/*decorators*/ undefined, modifiers, name, optional ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
153206
|
+
/*decorators*/ undefined, modifiers, name, optional && (preserveOptional & 2 /* Property */) ? ts.factory.createToken(57 /* QuestionToken */) : undefined, typeNode,
|
|
153198
153207
|
/*initializer*/ undefined));
|
|
153199
153208
|
break;
|
|
153200
153209
|
case 171 /* GetAccessor */:
|
|
@@ -153258,13 +153267,13 @@ var ts;
|
|
|
153258
153267
|
}
|
|
153259
153268
|
else {
|
|
153260
153269
|
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));
|
|
153270
|
+
addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body));
|
|
153262
153271
|
}
|
|
153263
153272
|
}
|
|
153264
153273
|
break;
|
|
153265
153274
|
}
|
|
153266
153275
|
function outputMethod(quotePreference, signature, modifiers, name, body) {
|
|
153267
|
-
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder);
|
|
153276
|
+
var method = createSignatureDeclarationFromSignature(168 /* MethodDeclaration */, context, quotePreference, signature, body, name, modifiers, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder);
|
|
153268
153277
|
if (method)
|
|
153269
153278
|
addClassElement(method);
|
|
153270
153279
|
}
|
|
@@ -153364,7 +153373,7 @@ var ts;
|
|
|
153364
153373
|
var typeParameters = isJs || typeArguments === undefined
|
|
153365
153374
|
? undefined
|
|
153366
153375
|
: ts.map(typeArguments, function (_, i) {
|
|
153367
|
-
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T"
|
|
153376
|
+
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
|
|
153368
153377
|
});
|
|
153369
153378
|
var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
|
|
153370
153379
|
var type = isJs || contextualType === undefined
|
|
@@ -153399,7 +153408,7 @@ var ts;
|
|
|
153399
153408
|
/*decorators*/ undefined,
|
|
153400
153409
|
/*modifiers*/ undefined,
|
|
153401
153410
|
/*dotDotDotToken*/ undefined,
|
|
153402
|
-
/*name*/ names && names[i] || "arg"
|
|
153411
|
+
/*name*/ names && names[i] || "arg".concat(i),
|
|
153403
153412
|
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
|
|
153404
153413
|
/*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
|
|
153405
153414
|
/*initializer*/ undefined);
|
|
@@ -153650,7 +153659,7 @@ var ts;
|
|
|
153650
153659
|
}
|
|
153651
153660
|
var name = declaration.name.text;
|
|
153652
153661
|
var startWithUnderscore = ts.startsWithUnderscore(name);
|
|
153653
|
-
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_"
|
|
153662
|
+
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
|
|
153654
153663
|
var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
|
|
153655
153664
|
return {
|
|
153656
153665
|
isStatic: ts.hasStaticModifier(declaration),
|
|
@@ -154674,7 +154683,7 @@ var ts;
|
|
|
154674
154683
|
changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
|
|
154675
154684
|
break;
|
|
154676
154685
|
default:
|
|
154677
|
-
ts.Debug.fail("Unexpected exportNode kind "
|
|
154686
|
+
ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
|
|
154678
154687
|
}
|
|
154679
154688
|
}
|
|
154680
154689
|
}
|
|
@@ -154762,7 +154771,7 @@ var ts;
|
|
|
154762
154771
|
break;
|
|
154763
154772
|
}
|
|
154764
154773
|
default:
|
|
154765
|
-
ts.Debug.assertNever(parent, "Unexpected parent kind "
|
|
154774
|
+
ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
|
|
154766
154775
|
}
|
|
154767
154776
|
}
|
|
154768
154777
|
function makeImportSpecifier(propertyName, name) {
|
|
@@ -155326,7 +155335,7 @@ var ts;
|
|
|
155326
155335
|
var newComment = ts.displayPartsToString(parameterDocComment);
|
|
155327
155336
|
if (newComment.length) {
|
|
155328
155337
|
ts.setSyntheticLeadingComments(result, [{
|
|
155329
|
-
text: "*\n"
|
|
155338
|
+
text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
|
|
155330
155339
|
kind: 3 /* MultiLineCommentTrivia */,
|
|
155331
155340
|
pos: -1,
|
|
155332
155341
|
end: -1,
|
|
@@ -155471,7 +155480,7 @@ var ts;
|
|
|
155471
155480
|
usedFunctionNames.set(description, true);
|
|
155472
155481
|
functionActions.push({
|
|
155473
155482
|
description: description,
|
|
155474
|
-
name: "function_scope_"
|
|
155483
|
+
name: "function_scope_".concat(i),
|
|
155475
155484
|
kind: extractFunctionAction.kind
|
|
155476
155485
|
});
|
|
155477
155486
|
}
|
|
@@ -155479,7 +155488,7 @@ var ts;
|
|
|
155479
155488
|
else if (!innermostErrorFunctionAction) {
|
|
155480
155489
|
innermostErrorFunctionAction = {
|
|
155481
155490
|
description: description,
|
|
155482
|
-
name: "function_scope_"
|
|
155491
|
+
name: "function_scope_".concat(i),
|
|
155483
155492
|
notApplicableReason: getStringError(functionExtraction.errors),
|
|
155484
155493
|
kind: extractFunctionAction.kind
|
|
155485
155494
|
};
|
|
@@ -155495,7 +155504,7 @@ var ts;
|
|
|
155495
155504
|
usedConstantNames.set(description_1, true);
|
|
155496
155505
|
constantActions.push({
|
|
155497
155506
|
description: description_1,
|
|
155498
|
-
name: "constant_scope_"
|
|
155507
|
+
name: "constant_scope_".concat(i),
|
|
155499
155508
|
kind: extractConstantAction.kind
|
|
155500
155509
|
});
|
|
155501
155510
|
}
|
|
@@ -155503,7 +155512,7 @@ var ts;
|
|
|
155503
155512
|
else if (!innermostErrorConstantAction) {
|
|
155504
155513
|
innermostErrorConstantAction = {
|
|
155505
155514
|
description: description,
|
|
155506
|
-
name: "constant_scope_"
|
|
155515
|
+
name: "constant_scope_".concat(i),
|
|
155507
155516
|
notApplicableReason: getStringError(constantExtraction.errors),
|
|
155508
155517
|
kind: extractConstantAction.kind
|
|
155509
155518
|
};
|
|
@@ -156087,28 +156096,28 @@ var ts;
|
|
|
156087
156096
|
case 212 /* FunctionExpression */:
|
|
156088
156097
|
case 255 /* FunctionDeclaration */:
|
|
156089
156098
|
return scope.name
|
|
156090
|
-
? "function '"
|
|
156099
|
+
? "function '".concat(scope.name.text, "'")
|
|
156091
156100
|
: ts.ANONYMOUS;
|
|
156092
156101
|
case 213 /* ArrowFunction */:
|
|
156093
156102
|
return "arrow function";
|
|
156094
156103
|
case 168 /* MethodDeclaration */:
|
|
156095
|
-
return "method '"
|
|
156104
|
+
return "method '".concat(scope.name.getText(), "'");
|
|
156096
156105
|
case 171 /* GetAccessor */:
|
|
156097
|
-
return "'get "
|
|
156106
|
+
return "'get ".concat(scope.name.getText(), "'");
|
|
156098
156107
|
case 172 /* SetAccessor */:
|
|
156099
|
-
return "'set "
|
|
156108
|
+
return "'set ".concat(scope.name.getText(), "'");
|
|
156100
156109
|
default:
|
|
156101
|
-
throw ts.Debug.assertNever(scope, "Unexpected scope kind "
|
|
156110
|
+
throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
|
|
156102
156111
|
}
|
|
156103
156112
|
}
|
|
156104
156113
|
function getDescriptionForClassLikeDeclaration(scope) {
|
|
156105
156114
|
return scope.kind === 256 /* ClassDeclaration */
|
|
156106
|
-
? scope.name ? "class '"
|
|
156107
|
-
: scope.name ? "class expression '"
|
|
156115
|
+
? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
|
|
156116
|
+
: scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
|
|
156108
156117
|
}
|
|
156109
156118
|
function getDescriptionForModuleLikeDeclaration(scope) {
|
|
156110
156119
|
return scope.kind === 261 /* ModuleBlock */
|
|
156111
|
-
? "namespace '"
|
|
156120
|
+
? "namespace '".concat(scope.parent.name.getText(), "'")
|
|
156112
156121
|
: scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
|
|
156113
156122
|
}
|
|
156114
156123
|
var SpecialScope;
|
|
@@ -157575,7 +157584,7 @@ var ts;
|
|
|
157575
157584
|
case 253 /* VariableDeclaration */:
|
|
157576
157585
|
return ts.tryCast(node.name, ts.isIdentifier);
|
|
157577
157586
|
default:
|
|
157578
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157587
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
157579
157588
|
}
|
|
157580
157589
|
}
|
|
157581
157590
|
function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
|
|
@@ -157612,7 +157621,7 @@ var ts;
|
|
|
157612
157621
|
case 253 /* VariableDeclaration */:
|
|
157613
157622
|
return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
|
|
157614
157623
|
default:
|
|
157615
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
157624
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
157616
157625
|
}
|
|
157617
157626
|
}
|
|
157618
157627
|
function moduleSpecifierFromImport(i) {
|
|
@@ -157699,7 +157708,7 @@ var ts;
|
|
|
157699
157708
|
deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
|
|
157700
157709
|
break;
|
|
157701
157710
|
default:
|
|
157702
|
-
ts.Debug.assertNever(importDecl, "Unexpected import decl kind "
|
|
157711
|
+
ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
|
|
157703
157712
|
}
|
|
157704
157713
|
}
|
|
157705
157714
|
function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
|
|
@@ -157799,7 +157808,7 @@ var ts;
|
|
|
157799
157808
|
var name = ts.combinePaths(inDirectory, newModuleName + extension);
|
|
157800
157809
|
if (!host.fileExists(name))
|
|
157801
157810
|
return newModuleName; // TODO: GH#18217
|
|
157802
|
-
newModuleName = moduleName
|
|
157811
|
+
newModuleName = "".concat(moduleName, ".").concat(i);
|
|
157803
157812
|
}
|
|
157804
157813
|
}
|
|
157805
157814
|
function getNewModuleName(movedSymbols) {
|
|
@@ -157906,7 +157915,7 @@ var ts;
|
|
|
157906
157915
|
return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
|
|
157907
157916
|
}
|
|
157908
157917
|
default:
|
|
157909
|
-
return ts.Debug.assertNever(i, "Unexpected import kind "
|
|
157918
|
+
return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
|
|
157910
157919
|
}
|
|
157911
157920
|
}
|
|
157912
157921
|
function filterNamedBindings(namedBindings, keep) {
|
|
@@ -158021,7 +158030,7 @@ var ts;
|
|
|
158021
158030
|
case 200 /* ObjectBindingPattern */:
|
|
158022
158031
|
return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
|
|
158023
158032
|
default:
|
|
158024
|
-
return ts.Debug.assertNever(name, "Unexpected name kind "
|
|
158033
|
+
return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
|
|
158025
158034
|
}
|
|
158026
158035
|
}
|
|
158027
158036
|
function nameOfTopLevelDeclaration(d) {
|
|
@@ -158082,7 +158091,7 @@ var ts;
|
|
|
158082
158091
|
case 237 /* ExpressionStatement */:
|
|
158083
158092
|
return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
158084
158093
|
default:
|
|
158085
|
-
return ts.Debug.assertNever(d, "Unexpected declaration kind "
|
|
158094
|
+
return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
|
|
158086
158095
|
}
|
|
158087
158096
|
}
|
|
158088
158097
|
function addCommonjsExport(decl) {
|
|
@@ -158104,7 +158113,7 @@ var ts;
|
|
|
158104
158113
|
case 237 /* ExpressionStatement */:
|
|
158105
158114
|
return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
158106
158115
|
default:
|
|
158107
|
-
return ts.Debug.assertNever(decl, "Unexpected decl kind "
|
|
158116
|
+
return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
|
|
158108
158117
|
}
|
|
158109
158118
|
}
|
|
158110
158119
|
/** Creates `exports.x = x;` */
|
|
@@ -158742,7 +158751,7 @@ var ts;
|
|
|
158742
158751
|
return [functionDeclaration.name, functionDeclaration.parent.name];
|
|
158743
158752
|
return [functionDeclaration.parent.name];
|
|
158744
158753
|
default:
|
|
158745
|
-
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind "
|
|
158754
|
+
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
|
|
158746
158755
|
}
|
|
158747
158756
|
}
|
|
158748
158757
|
})(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
|
|
@@ -159446,7 +159455,7 @@ var ts;
|
|
|
159446
159455
|
var textPos = ts.scanner.getTextPos();
|
|
159447
159456
|
if (textPos <= end) {
|
|
159448
159457
|
if (token === 79 /* Identifier */) {
|
|
159449
|
-
ts.Debug.fail("Did not expect "
|
|
159458
|
+
ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
|
|
159450
159459
|
}
|
|
159451
159460
|
nodes.push(createNode(token, pos, textPos, parent));
|
|
159452
159461
|
}
|
|
@@ -160328,7 +160337,7 @@ var ts;
|
|
|
160328
160337
|
function getValidSourceFile(fileName) {
|
|
160329
160338
|
var sourceFile = program.getSourceFile(fileName);
|
|
160330
160339
|
if (!sourceFile) {
|
|
160331
|
-
var error = new Error("Could not find source file: '"
|
|
160340
|
+
var error = new Error("Could not find source file: '".concat(fileName, "'."));
|
|
160332
160341
|
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
|
160333
160342
|
// See https://github.com/microsoft/TypeScript/issues/30180.
|
|
160334
160343
|
error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
|
|
@@ -161003,7 +161012,7 @@ var ts;
|
|
|
161003
161012
|
var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
|
|
161004
161013
|
: ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
|
|
161005
161014
|
if (element && isUnclosedTag(element)) {
|
|
161006
|
-
return { newText: "</"
|
|
161015
|
+
return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
|
|
161007
161016
|
}
|
|
161008
161017
|
var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
|
|
161009
161018
|
: ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
|
|
@@ -161109,7 +161118,7 @@ var ts;
|
|
|
161109
161118
|
pos = commentRange.end + 1;
|
|
161110
161119
|
}
|
|
161111
161120
|
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("("
|
|
161121
|
+
var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
|
|
161113
161122
|
isCommenting = insertComment !== undefined
|
|
161114
161123
|
? insertComment
|
|
161115
161124
|
: 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 +161513,14 @@ var ts;
|
|
|
161504
161513
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
161505
161514
|
invalidOperationsInPartialSemanticMode.forEach(function (key) {
|
|
161506
161515
|
return ls[key] = function () {
|
|
161507
|
-
throw new Error("LanguageService Operation: "
|
|
161516
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
161508
161517
|
};
|
|
161509
161518
|
});
|
|
161510
161519
|
break;
|
|
161511
161520
|
case ts.LanguageServiceMode.Syntactic:
|
|
161512
161521
|
invalidOperationsInSyntacticMode.forEach(function (key) {
|
|
161513
161522
|
return ls[key] = function () {
|
|
161514
|
-
throw new Error("LanguageService Operation: "
|
|
161523
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
|
|
161515
161524
|
};
|
|
161516
161525
|
});
|
|
161517
161526
|
break;
|
|
@@ -162493,13 +162502,13 @@ var ts;
|
|
|
162493
162502
|
var result = action();
|
|
162494
162503
|
if (logPerformance) {
|
|
162495
162504
|
var end = ts.timestamp();
|
|
162496
|
-
logger.log(actionDescription
|
|
162505
|
+
logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
|
|
162497
162506
|
if (ts.isString(result)) {
|
|
162498
162507
|
var str = result;
|
|
162499
162508
|
if (str.length > 128) {
|
|
162500
162509
|
str = str.substring(0, 128) + "...";
|
|
162501
162510
|
}
|
|
162502
|
-
logger.log(" result.length="
|
|
162511
|
+
logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
|
|
162503
162512
|
}
|
|
162504
162513
|
}
|
|
162505
162514
|
return result;
|
|
@@ -162581,7 +162590,7 @@ var ts;
|
|
|
162581
162590
|
* Update the list of scripts known to the compiler
|
|
162582
162591
|
*/
|
|
162583
162592
|
LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
|
|
162584
|
-
this.forwardJSONCall("refresh("
|
|
162593
|
+
this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
|
|
162585
162594
|
);
|
|
162586
162595
|
};
|
|
162587
162596
|
LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
|
|
@@ -162597,43 +162606,43 @@ var ts;
|
|
|
162597
162606
|
};
|
|
162598
162607
|
LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
|
|
162599
162608
|
var _this = this;
|
|
162600
|
-
return this.forwardJSONCall("getSyntacticClassifications('"
|
|
162609
|
+
return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162601
162610
|
};
|
|
162602
162611
|
LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
|
|
162603
162612
|
var _this = this;
|
|
162604
|
-
return this.forwardJSONCall("getSemanticClassifications('"
|
|
162613
|
+
return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
162605
162614
|
};
|
|
162606
162615
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
162607
162616
|
var _this = this;
|
|
162608
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('"
|
|
162617
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162609
162618
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162610
162619
|
// on the managed side versus a full JSON array.
|
|
162611
162620
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162612
162621
|
};
|
|
162613
162622
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
162614
162623
|
var _this = this;
|
|
162615
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('"
|
|
162624
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
162616
162625
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
162617
162626
|
// on the managed side versus a full JSON array.
|
|
162618
162627
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
162619
162628
|
};
|
|
162620
162629
|
LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
|
|
162621
162630
|
var _this = this;
|
|
162622
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('"
|
|
162631
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
|
|
162623
162632
|
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
|
|
162624
162633
|
return _this.realizeDiagnostics(diagnostics);
|
|
162625
162634
|
});
|
|
162626
162635
|
};
|
|
162627
162636
|
LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
|
|
162628
162637
|
var _this = this;
|
|
162629
|
-
return this.forwardJSONCall("getSemanticDiagnostics('"
|
|
162638
|
+
return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
|
|
162630
162639
|
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
|
|
162631
162640
|
return _this.realizeDiagnostics(diagnostics);
|
|
162632
162641
|
});
|
|
162633
162642
|
};
|
|
162634
162643
|
LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
|
|
162635
162644
|
var _this = this;
|
|
162636
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('"
|
|
162645
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
|
|
162637
162646
|
};
|
|
162638
162647
|
LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
|
|
162639
162648
|
var _this = this;
|
|
@@ -162649,7 +162658,7 @@ var ts;
|
|
|
162649
162658
|
*/
|
|
162650
162659
|
LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
|
|
162651
162660
|
var _this = this;
|
|
162652
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('"
|
|
162661
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
|
|
162653
162662
|
};
|
|
162654
162663
|
/// NAMEORDOTTEDNAMESPAN
|
|
162655
162664
|
/**
|
|
@@ -162658,7 +162667,7 @@ var ts;
|
|
|
162658
162667
|
*/
|
|
162659
162668
|
LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
|
|
162660
162669
|
var _this = this;
|
|
162661
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('"
|
|
162670
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
|
|
162662
162671
|
};
|
|
162663
162672
|
/**
|
|
162664
162673
|
* STATEMENTSPAN
|
|
@@ -162666,12 +162675,12 @@ var ts;
|
|
|
162666
162675
|
*/
|
|
162667
162676
|
LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
|
|
162668
162677
|
var _this = this;
|
|
162669
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('"
|
|
162678
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
|
|
162670
162679
|
};
|
|
162671
162680
|
/// SIGNATUREHELP
|
|
162672
162681
|
LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
|
|
162673
162682
|
var _this = this;
|
|
162674
|
-
return this.forwardJSONCall("getSignatureHelpItems('"
|
|
162683
|
+
return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
|
|
162675
162684
|
};
|
|
162676
162685
|
/// GOTO DEFINITION
|
|
162677
162686
|
/**
|
|
@@ -162680,7 +162689,7 @@ var ts;
|
|
|
162680
162689
|
*/
|
|
162681
162690
|
LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
|
|
162682
162691
|
var _this = this;
|
|
162683
|
-
return this.forwardJSONCall("getDefinitionAtPosition('"
|
|
162692
|
+
return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
|
|
162684
162693
|
};
|
|
162685
162694
|
/**
|
|
162686
162695
|
* Computes the definition location and file for the symbol
|
|
@@ -162688,7 +162697,7 @@ var ts;
|
|
|
162688
162697
|
*/
|
|
162689
162698
|
LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
|
|
162690
162699
|
var _this = this;
|
|
162691
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('"
|
|
162700
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
|
|
162692
162701
|
};
|
|
162693
162702
|
/// GOTO Type
|
|
162694
162703
|
/**
|
|
@@ -162697,7 +162706,7 @@ var ts;
|
|
|
162697
162706
|
*/
|
|
162698
162707
|
LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
|
|
162699
162708
|
var _this = this;
|
|
162700
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('"
|
|
162709
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
|
|
162701
162710
|
};
|
|
162702
162711
|
/// GOTO Implementation
|
|
162703
162712
|
/**
|
|
@@ -162706,37 +162715,37 @@ var ts;
|
|
|
162706
162715
|
*/
|
|
162707
162716
|
LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
|
|
162708
162717
|
var _this = this;
|
|
162709
|
-
return this.forwardJSONCall("getImplementationAtPosition('"
|
|
162718
|
+
return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
|
|
162710
162719
|
};
|
|
162711
162720
|
LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
|
|
162712
162721
|
var _this = this;
|
|
162713
|
-
return this.forwardJSONCall("getRenameInfo('"
|
|
162722
|
+
return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
|
|
162714
162723
|
};
|
|
162715
162724
|
LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
|
|
162716
162725
|
var _this = this;
|
|
162717
|
-
return this.forwardJSONCall("getSmartSelectionRange('"
|
|
162726
|
+
return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
|
|
162718
162727
|
};
|
|
162719
162728
|
LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
162720
162729
|
var _this = this;
|
|
162721
|
-
return this.forwardJSONCall("findRenameLocations('"
|
|
162730
|
+
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
162731
|
};
|
|
162723
162732
|
/// GET BRACE MATCHING
|
|
162724
162733
|
LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
|
|
162725
162734
|
var _this = this;
|
|
162726
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('"
|
|
162735
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
|
|
162727
162736
|
};
|
|
162728
162737
|
LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
|
|
162729
162738
|
var _this = this;
|
|
162730
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('"
|
|
162739
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
|
|
162731
162740
|
};
|
|
162732
162741
|
LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
|
|
162733
162742
|
var _this = this;
|
|
162734
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('"
|
|
162743
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
|
|
162735
162744
|
};
|
|
162736
162745
|
/// GET SMART INDENT
|
|
162737
162746
|
LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
|
|
162738
162747
|
var _this = this;
|
|
162739
|
-
return this.forwardJSONCall("getIndentationAtPosition('"
|
|
162748
|
+
return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162740
162749
|
var localOptions = JSON.parse(options);
|
|
162741
162750
|
return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
|
162742
162751
|
});
|
|
@@ -162744,23 +162753,23 @@ var ts;
|
|
|
162744
162753
|
/// GET REFERENCES
|
|
162745
162754
|
LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
|
|
162746
162755
|
var _this = this;
|
|
162747
|
-
return this.forwardJSONCall("getReferencesAtPosition('"
|
|
162756
|
+
return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
|
|
162748
162757
|
};
|
|
162749
162758
|
LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
|
|
162750
162759
|
var _this = this;
|
|
162751
|
-
return this.forwardJSONCall("findReferences('"
|
|
162760
|
+
return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
|
|
162752
162761
|
};
|
|
162753
162762
|
LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
|
|
162754
162763
|
var _this = this;
|
|
162755
|
-
return this.forwardJSONCall("getFileReferences('"
|
|
162764
|
+
return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
|
|
162756
162765
|
};
|
|
162757
162766
|
LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
|
|
162758
162767
|
var _this = this;
|
|
162759
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('"
|
|
162768
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
|
|
162760
162769
|
};
|
|
162761
162770
|
LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
|
|
162762
162771
|
var _this = this;
|
|
162763
|
-
return this.forwardJSONCall("getDocumentHighlights('"
|
|
162772
|
+
return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
162764
162773
|
var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
|
162765
162774
|
// workaround for VS document highlighting issue - keep only items from the initial file
|
|
162766
162775
|
var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
|
|
@@ -162775,108 +162784,108 @@ var ts;
|
|
|
162775
162784
|
*/
|
|
162776
162785
|
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences) {
|
|
162777
162786
|
var _this = this;
|
|
162778
|
-
return this.forwardJSONCall("getCompletionsAtPosition('"
|
|
162787
|
+
return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences); });
|
|
162779
162788
|
};
|
|
162780
162789
|
/** Get a string based representation of a completion list entry details */
|
|
162781
162790
|
LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
|
|
162782
162791
|
var _this = this;
|
|
162783
|
-
return this.forwardJSONCall("getCompletionEntryDetails('"
|
|
162792
|
+
return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
|
|
162784
162793
|
var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
|
|
162785
162794
|
return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
|
|
162786
162795
|
});
|
|
162787
162796
|
};
|
|
162788
162797
|
LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
|
|
162789
162798
|
var _this = this;
|
|
162790
|
-
return this.forwardJSONCall("getFormattingEditsForRange('"
|
|
162799
|
+
return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
|
|
162791
162800
|
var localOptions = JSON.parse(options);
|
|
162792
162801
|
return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
|
162793
162802
|
});
|
|
162794
162803
|
};
|
|
162795
162804
|
LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
|
|
162796
162805
|
var _this = this;
|
|
162797
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('"
|
|
162806
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
|
|
162798
162807
|
var localOptions = JSON.parse(options);
|
|
162799
162808
|
return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
|
162800
162809
|
});
|
|
162801
162810
|
};
|
|
162802
162811
|
LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
|
|
162803
162812
|
var _this = this;
|
|
162804
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"
|
|
162813
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
|
|
162805
162814
|
var localOptions = JSON.parse(options);
|
|
162806
162815
|
return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
|
162807
162816
|
});
|
|
162808
162817
|
};
|
|
162809
162818
|
LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
|
|
162810
162819
|
var _this = this;
|
|
162811
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('"
|
|
162820
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
|
|
162812
162821
|
};
|
|
162813
162822
|
/// NAVIGATE TO
|
|
162814
162823
|
/** Return a list of symbols that are interesting to navigate to */
|
|
162815
162824
|
LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
|
|
162816
162825
|
var _this = this;
|
|
162817
|
-
return this.forwardJSONCall("getNavigateToItems('"
|
|
162826
|
+
return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
|
|
162818
162827
|
};
|
|
162819
162828
|
LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
|
|
162820
162829
|
var _this = this;
|
|
162821
|
-
return this.forwardJSONCall("getNavigationBarItems('"
|
|
162830
|
+
return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
|
|
162822
162831
|
};
|
|
162823
162832
|
LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
|
|
162824
162833
|
var _this = this;
|
|
162825
|
-
return this.forwardJSONCall("getNavigationTree('"
|
|
162834
|
+
return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
|
|
162826
162835
|
};
|
|
162827
162836
|
LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
|
|
162828
162837
|
var _this = this;
|
|
162829
|
-
return this.forwardJSONCall("getOutliningSpans('"
|
|
162838
|
+
return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
|
|
162830
162839
|
};
|
|
162831
162840
|
LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
|
|
162832
162841
|
var _this = this;
|
|
162833
|
-
return this.forwardJSONCall("getTodoComments('"
|
|
162842
|
+
return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
|
|
162834
162843
|
};
|
|
162835
162844
|
/// CALL HIERARCHY
|
|
162836
162845
|
LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
|
|
162837
162846
|
var _this = this;
|
|
162838
|
-
return this.forwardJSONCall("prepareCallHierarchy('"
|
|
162847
|
+
return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
|
|
162839
162848
|
};
|
|
162840
162849
|
LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
|
|
162841
162850
|
var _this = this;
|
|
162842
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"
|
|
162851
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
|
|
162843
162852
|
};
|
|
162844
162853
|
LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
|
|
162845
162854
|
var _this = this;
|
|
162846
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"
|
|
162855
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
|
|
162847
162856
|
};
|
|
162848
162857
|
LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
|
|
162849
162858
|
var _this = this;
|
|
162850
|
-
return this.forwardJSONCall("provideInlayHints('"
|
|
162859
|
+
return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
|
|
162851
162860
|
};
|
|
162852
162861
|
/// Emit
|
|
162853
162862
|
LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
|
|
162854
162863
|
var _this = this;
|
|
162855
|
-
return this.forwardJSONCall("getEmitOutput('"
|
|
162864
|
+
return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
|
|
162856
162865
|
var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
162857
162866
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
162858
162867
|
});
|
|
162859
162868
|
};
|
|
162860
162869
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
162861
162870
|
var _this = this;
|
|
162862
|
-
return forwardCall(this.logger, "getEmitOutput('"
|
|
162871
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
162863
162872
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
162864
162873
|
};
|
|
162865
162874
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|
|
162866
162875
|
var _this = this;
|
|
162867
|
-
return this.forwardJSONCall("toggleLineComment('"
|
|
162876
|
+
return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
|
|
162868
162877
|
};
|
|
162869
162878
|
LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
|
|
162870
162879
|
var _this = this;
|
|
162871
|
-
return this.forwardJSONCall("toggleMultilineComment('"
|
|
162880
|
+
return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
|
|
162872
162881
|
};
|
|
162873
162882
|
LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
|
|
162874
162883
|
var _this = this;
|
|
162875
|
-
return this.forwardJSONCall("commentSelection('"
|
|
162884
|
+
return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
|
|
162876
162885
|
};
|
|
162877
162886
|
LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
|
|
162878
162887
|
var _this = this;
|
|
162879
|
-
return this.forwardJSONCall("uncommentSelection('"
|
|
162888
|
+
return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
|
|
162880
162889
|
};
|
|
162881
162890
|
return LanguageServiceShimObject;
|
|
162882
162891
|
}(ShimBase));
|
|
@@ -162926,7 +162935,7 @@ var ts;
|
|
|
162926
162935
|
};
|
|
162927
162936
|
CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
|
|
162928
162937
|
var _this = this;
|
|
162929
|
-
return this.forwardJSONCall("resolveModuleName('"
|
|
162938
|
+
return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
|
|
162930
162939
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162931
162940
|
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162932
162941
|
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
|
|
@@ -162941,7 +162950,7 @@ var ts;
|
|
|
162941
162950
|
};
|
|
162942
162951
|
CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
|
|
162943
162952
|
var _this = this;
|
|
162944
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective("
|
|
162953
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
|
|
162945
162954
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162946
162955
|
var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
162947
162956
|
return {
|
|
@@ -162953,7 +162962,7 @@ var ts;
|
|
|
162953
162962
|
};
|
|
162954
162963
|
CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162955
162964
|
var _this = this;
|
|
162956
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('"
|
|
162965
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
|
|
162957
162966
|
// for now treat files as JavaScript
|
|
162958
162967
|
var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
|
162959
162968
|
return {
|
|
@@ -162968,7 +162977,7 @@ var ts;
|
|
|
162968
162977
|
};
|
|
162969
162978
|
CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
|
|
162970
162979
|
var _this = this;
|
|
162971
|
-
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"
|
|
162980
|
+
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
|
|
162972
162981
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
162973
162982
|
return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
|
|
162974
162983
|
});
|
|
@@ -162990,7 +162999,7 @@ var ts;
|
|
|
162990
162999
|
};
|
|
162991
163000
|
CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
|
|
162992
163001
|
var _this = this;
|
|
162993
|
-
return this.forwardJSONCall("getTSConfigFileInfo('"
|
|
163002
|
+
return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
|
|
162994
163003
|
var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
|
|
162995
163004
|
var normalizedFileName = ts.normalizeSlashes(fileName);
|
|
162996
163005
|
var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
|