typescript 4.6.0-dev.20220211 → 4.6.1-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/tsc.js +263 -263
- package/lib/tsserver.js +551 -551
- package/lib/tsserverlibrary.js +526 -526
- package/lib/typescript.js +431 -431
- package/lib/typescriptServices.js +431 -431
- package/lib/typingsInstaller.js +318 -318
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -21,7 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
ar[i] = from[i];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
return to.concat(ar || from);
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
25
|
};
|
|
26
26
|
var __assign = (this && this.__assign) || function () {
|
|
27
27
|
__assign = Object.assign || function(t) {
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor
|
|
297
|
+
ts.version = "".concat(ts.versionMajorMinor, ".1-rc");
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -341,7 +341,7 @@ var ts;
|
|
|
341
341
|
var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
|
|
342
342
|
if (constructor)
|
|
343
343
|
return constructor;
|
|
344
|
-
throw new Error("TypeScript requires an environment that provides a compatible native "
|
|
344
|
+
throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
|
|
345
345
|
}
|
|
346
346
|
})(ts || (ts = {}));
|
|
347
347
|
/* @internal */
|
|
@@ -1691,7 +1691,7 @@ var ts;
|
|
|
1691
1691
|
function cast(value, test) {
|
|
1692
1692
|
if (value !== undefined && test(value))
|
|
1693
1693
|
return value;
|
|
1694
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1694
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1695
1695
|
}
|
|
1696
1696
|
ts.cast = cast;
|
|
1697
1697
|
/** Does nothing. */
|
|
@@ -1782,7 +1782,7 @@ var ts;
|
|
|
1782
1782
|
function memoizeOne(callback) {
|
|
1783
1783
|
var map = new ts.Map();
|
|
1784
1784
|
return function (arg) {
|
|
1785
|
-
var key = typeof arg
|
|
1785
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1786
1786
|
var value = map.get(key);
|
|
1787
1787
|
if (value === undefined && !map.has(key)) {
|
|
1788
1788
|
value = callback(arg);
|
|
@@ -2232,7 +2232,7 @@ var ts;
|
|
|
2232
2232
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
2233
2233
|
function patternText(_a) {
|
|
2234
2234
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
2235
|
-
return prefix
|
|
2235
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
2236
2236
|
}
|
|
2237
2237
|
ts.patternText = patternText;
|
|
2238
2238
|
/**
|
|
@@ -2545,7 +2545,7 @@ var ts;
|
|
|
2545
2545
|
}
|
|
2546
2546
|
function fail(message, stackCrawlMark) {
|
|
2547
2547
|
debugger;
|
|
2548
|
-
var e = new Error(message ? "Debug Failure. "
|
|
2548
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
2549
2549
|
if (Error.captureStackTrace) {
|
|
2550
2550
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
2551
2551
|
}
|
|
@@ -2553,12 +2553,12 @@ var ts;
|
|
|
2553
2553
|
}
|
|
2554
2554
|
Debug.fail = fail;
|
|
2555
2555
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
2556
|
-
return fail((message || "Unexpected node."
|
|
2556
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
2557
2557
|
}
|
|
2558
2558
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
2559
2559
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
2560
2560
|
if (!expression) {
|
|
2561
|
-
message = message ? "False expression: "
|
|
2561
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
2562
2562
|
if (verboseDebugInfo) {
|
|
2563
2563
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
2564
2564
|
}
|
|
@@ -2568,26 +2568,26 @@ var ts;
|
|
|
2568
2568
|
Debug.assert = assert;
|
|
2569
2569
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
2570
2570
|
if (a !== b) {
|
|
2571
|
-
var message = msg ? msg2 ? msg
|
|
2572
|
-
fail("Expected "
|
|
2571
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
2572
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
2575
|
Debug.assertEqual = assertEqual;
|
|
2576
2576
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
2577
2577
|
if (a >= b) {
|
|
2578
|
-
fail("Expected "
|
|
2578
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
2579
2579
|
}
|
|
2580
2580
|
}
|
|
2581
2581
|
Debug.assertLessThan = assertLessThan;
|
|
2582
2582
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
2583
2583
|
if (a > b) {
|
|
2584
|
-
fail("Expected "
|
|
2584
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
2585
2585
|
}
|
|
2586
2586
|
}
|
|
2587
2587
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
2588
2588
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
2589
2589
|
if (a < b) {
|
|
2590
|
-
fail("Expected "
|
|
2590
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2618,42 +2618,42 @@ var ts;
|
|
|
2618
2618
|
function assertNever(member, message, stackCrawlMark) {
|
|
2619
2619
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2620
2620
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2621
|
-
return fail(message
|
|
2621
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2622
2622
|
}
|
|
2623
2623
|
Debug.assertNever = assertNever;
|
|
2624
2624
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2625
2625
|
if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) {
|
|
2626
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2626
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2627
2627
|
}
|
|
2628
2628
|
}
|
|
2629
2629
|
Debug.assertEachNode = assertEachNode;
|
|
2630
2630
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2631
2631
|
if (shouldAssertFunction(1 /* Normal */, "assertNode")) {
|
|
2632
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2632
|
+
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);
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
2635
|
Debug.assertNode = assertNode;
|
|
2636
2636
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2637
2637
|
if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) {
|
|
2638
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2638
|
+
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);
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
2641
|
Debug.assertNotNode = assertNotNode;
|
|
2642
2642
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2643
2643
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) {
|
|
2644
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2644
|
+
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);
|
|
2645
2645
|
}
|
|
2646
2646
|
}
|
|
2647
2647
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2648
2648
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2649
2649
|
if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) {
|
|
2650
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2650
|
+
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);
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
2653
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2654
2654
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2655
2655
|
if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) {
|
|
2656
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2656
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2657
2657
|
}
|
|
2658
2658
|
}
|
|
2659
2659
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2674,7 +2674,7 @@ var ts;
|
|
|
2674
2674
|
}
|
|
2675
2675
|
Debug.getFunctionName = getFunctionName;
|
|
2676
2676
|
function formatSymbol(symbol) {
|
|
2677
|
-
return "{ name: "
|
|
2677
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2678
2678
|
}
|
|
2679
2679
|
Debug.formatSymbol = formatSymbol;
|
|
2680
2680
|
/**
|
|
@@ -2695,7 +2695,7 @@ var ts;
|
|
|
2695
2695
|
break;
|
|
2696
2696
|
}
|
|
2697
2697
|
if (enumValue !== 0 && enumValue & value) {
|
|
2698
|
-
result = ""
|
|
2698
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2699
2699
|
remainingFlags &= ~enumValue;
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
@@ -2805,7 +2805,7 @@ var ts;
|
|
|
2805
2805
|
this.flags & 1 /* Unreachable */ ? "FlowUnreachable" :
|
|
2806
2806
|
"UnknownFlow";
|
|
2807
2807
|
var remainingFlags = this.flags & ~(2048 /* Referenced */ - 1);
|
|
2808
|
-
return ""
|
|
2808
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2809
2809
|
}
|
|
2810
2810
|
},
|
|
2811
2811
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, /*isFlags*/ true); } },
|
|
@@ -2844,7 +2844,7 @@ var ts;
|
|
|
2844
2844
|
// We don't care, this is debug code that's only enabled with a debugger attached -
|
|
2845
2845
|
// we're just taking note of it for anyone checking regex performance in the future.
|
|
2846
2846
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2847
|
-
return "NodeArray "
|
|
2847
|
+
return "NodeArray ".concat(defaultValue);
|
|
2848
2848
|
}
|
|
2849
2849
|
}
|
|
2850
2850
|
});
|
|
@@ -2899,7 +2899,7 @@ var ts;
|
|
|
2899
2899
|
var symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" :
|
|
2900
2900
|
"Symbol";
|
|
2901
2901
|
var remainingSymbolFlags = this.flags & ~33554432 /* Transient */;
|
|
2902
|
-
return symbolHeader
|
|
2902
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2903
2903
|
}
|
|
2904
2904
|
},
|
|
2905
2905
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2909,11 +2909,11 @@ var ts;
|
|
|
2909
2909
|
__tsDebuggerDisplay: {
|
|
2910
2910
|
value: function () {
|
|
2911
2911
|
var typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" :
|
|
2912
|
-
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType "
|
|
2913
|
-
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType "
|
|
2912
|
+
this.flags & 384 /* StringOrNumberLiteral */ ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2913
|
+
this.flags & 2048 /* BigIntLiteral */ ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2914
2914
|
this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" :
|
|
2915
2915
|
this.flags & 32 /* Enum */ ? "EnumType" :
|
|
2916
|
-
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType "
|
|
2916
|
+
this.flags & 67359327 /* Intrinsic */ ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2917
2917
|
this.flags & 1048576 /* Union */ ? "UnionType" :
|
|
2918
2918
|
this.flags & 2097152 /* Intersection */ ? "IntersectionType" :
|
|
2919
2919
|
this.flags & 4194304 /* Index */ ? "IndexType" :
|
|
@@ -2932,7 +2932,7 @@ var ts;
|
|
|
2932
2932
|
"ObjectType" :
|
|
2933
2933
|
"Type";
|
|
2934
2934
|
var remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
|
|
2935
|
-
return ""
|
|
2935
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2936
2936
|
}
|
|
2937
2937
|
},
|
|
2938
2938
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2968,11 +2968,11 @@ var ts;
|
|
|
2968
2968
|
__tsDebuggerDisplay: {
|
|
2969
2969
|
value: function () {
|
|
2970
2970
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2971
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2972
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2973
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2974
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2975
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2971
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2972
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2973
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2974
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2975
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2976
2976
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2977
2977
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2978
2978
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -3004,7 +3004,7 @@ var ts;
|
|
|
3004
3004
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
3005
3005
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
3006
3006
|
formatSyntaxKind(this.kind);
|
|
3007
|
-
return ""
|
|
3007
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
3008
3008
|
}
|
|
3009
3009
|
},
|
|
3010
3010
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -3051,10 +3051,10 @@ var ts;
|
|
|
3051
3051
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
3052
3052
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
3053
3053
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
3054
|
-
deprecationMessage += "'"
|
|
3055
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
3056
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
3057
|
-
deprecationMessage += message ? " "
|
|
3054
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
3055
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
3056
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
3057
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
3058
3058
|
return deprecationMessage;
|
|
3059
3059
|
}
|
|
3060
3060
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -3185,11 +3185,11 @@ var ts;
|
|
|
3185
3185
|
}
|
|
3186
3186
|
};
|
|
3187
3187
|
Version.prototype.toString = function () {
|
|
3188
|
-
var result = this.major
|
|
3188
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
3189
3189
|
if (ts.some(this.prerelease))
|
|
3190
|
-
result += "-"
|
|
3190
|
+
result += "-".concat(this.prerelease.join("."));
|
|
3191
3191
|
if (ts.some(this.build))
|
|
3192
|
-
result += "+"
|
|
3192
|
+
result += "+".concat(this.build.join("."));
|
|
3193
3193
|
return result;
|
|
3194
3194
|
};
|
|
3195
3195
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -3456,7 +3456,7 @@ var ts;
|
|
|
3456
3456
|
return ts.map(comparators, formatComparator).join(" ");
|
|
3457
3457
|
}
|
|
3458
3458
|
function formatComparator(comparator) {
|
|
3459
|
-
return ""
|
|
3459
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
3460
3460
|
}
|
|
3461
3461
|
})(ts || (ts = {}));
|
|
3462
3462
|
/*@internal*/
|
|
@@ -3754,7 +3754,7 @@ var ts;
|
|
|
3754
3754
|
fs = require("fs");
|
|
3755
3755
|
}
|
|
3756
3756
|
catch (e) {
|
|
3757
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
3757
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
3758
3758
|
}
|
|
3759
3759
|
}
|
|
3760
3760
|
mode = tracingMode;
|
|
@@ -3766,11 +3766,11 @@ var ts;
|
|
|
3766
3766
|
if (!fs.existsSync(traceDir)) {
|
|
3767
3767
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
3768
3768
|
}
|
|
3769
|
-
var countPart = mode === "build" ? "."
|
|
3770
|
-
: mode === "server" ? "."
|
|
3769
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
3770
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
3771
3771
|
: "";
|
|
3772
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
3773
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
3772
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
3773
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
3774
3774
|
legend.push({
|
|
3775
3775
|
configFilePath: configFilePath,
|
|
3776
3776
|
tracePath: tracePath,
|
|
@@ -3860,7 +3860,7 @@ var ts;
|
|
|
3860
3860
|
}
|
|
3861
3861
|
// test if [time,endTime) straddles a sampling point
|
|
3862
3862
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3863
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3863
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3864
3864
|
}
|
|
3865
3865
|
}
|
|
3866
3866
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3869,11 +3869,11 @@ var ts;
|
|
|
3869
3869
|
if (mode === "server" && phase === "checkTypes" /* CheckTypes */)
|
|
3870
3870
|
return;
|
|
3871
3871
|
ts.performance.mark("beginTracing");
|
|
3872
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3872
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3873
3873
|
if (extras)
|
|
3874
|
-
fs.writeSync(traceFd, ","
|
|
3874
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3875
3875
|
if (args)
|
|
3876
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3876
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3877
3877
|
fs.writeSync(traceFd, "}");
|
|
3878
3878
|
ts.performance.mark("endTracing");
|
|
3879
3879
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -5986,7 +5986,7 @@ var ts;
|
|
|
5986
5986
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
5987
5987
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
5988
5988
|
function getLevel(envVar, level) {
|
|
5989
|
-
return system.getEnvironmentVariable(envVar
|
|
5989
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
5990
5990
|
}
|
|
5991
5991
|
function getCustomLevels(baseVariable) {
|
|
5992
5992
|
var customLevels;
|
|
@@ -6455,7 +6455,7 @@ var ts;
|
|
|
6455
6455
|
}
|
|
6456
6456
|
function onTimerToUpdateChildWatches() {
|
|
6457
6457
|
timerToUpdateChildWatches = undefined;
|
|
6458
|
-
sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
6458
|
+
sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
6459
6459
|
var start = ts.timestamp();
|
|
6460
6460
|
var invokeMap = new ts.Map();
|
|
6461
6461
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -6468,7 +6468,7 @@ var ts;
|
|
|
6468
6468
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
6469
6469
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
6470
6470
|
}
|
|
6471
|
-
sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
6471
|
+
sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
6472
6472
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
6473
6473
|
var existing = invokeMap.get(rootDirName);
|
|
6474
6474
|
if (existing) {
|
|
@@ -6484,7 +6484,7 @@ var ts;
|
|
|
6484
6484
|
}
|
|
6485
6485
|
});
|
|
6486
6486
|
var elapsed = ts.timestamp() - start;
|
|
6487
|
-
sysLog("sysLog:: Elapsed:: "
|
|
6487
|
+
sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
6488
6488
|
}
|
|
6489
6489
|
function removeChildWatches(parentWatcher) {
|
|
6490
6490
|
if (!parentWatcher)
|
|
@@ -6944,7 +6944,7 @@ var ts;
|
|
|
6944
6944
|
var remappedPaths = new ts.Map();
|
|
6945
6945
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
6946
6946
|
// Windows rooted dir names need an extra `/` prepended to be valid file:/// urls
|
|
6947
|
-
var fileUrlRoot = "file://"
|
|
6947
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
6948
6948
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
6949
6949
|
var node = _a[_i];
|
|
6950
6950
|
if (node.callFrame.url) {
|
|
@@ -6953,7 +6953,7 @@ var ts;
|
|
|
6953
6953
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), /*isAbsolutePathAnUrl*/ true);
|
|
6954
6954
|
}
|
|
6955
6955
|
else if (!nativePattern.test(url)) {
|
|
6956
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
6956
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
6957
6957
|
externalFileCounter++;
|
|
6958
6958
|
}
|
|
6959
6959
|
}
|
|
@@ -6969,7 +6969,7 @@ var ts;
|
|
|
6969
6969
|
if (!err) {
|
|
6970
6970
|
try {
|
|
6971
6971
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
6972
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
6972
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
6973
6973
|
}
|
|
6974
6974
|
}
|
|
6975
6975
|
catch (_c) {
|
|
@@ -7071,7 +7071,7 @@ var ts;
|
|
|
7071
7071
|
* @param createWatcher
|
|
7072
7072
|
*/
|
|
7073
7073
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
7074
|
-
sysLog("sysLog:: "
|
|
7074
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
7075
7075
|
// Call the callback for current directory
|
|
7076
7076
|
callback("rename", "");
|
|
7077
7077
|
// If watcher is not closed, update it
|
|
@@ -7096,7 +7096,7 @@ var ts;
|
|
|
7096
7096
|
}
|
|
7097
7097
|
}
|
|
7098
7098
|
if (hitSystemWatcherLimit) {
|
|
7099
|
-
sysLog("sysLog:: "
|
|
7099
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
7100
7100
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7101
7101
|
}
|
|
7102
7102
|
try {
|
|
@@ -7112,7 +7112,7 @@ var ts;
|
|
|
7112
7112
|
// 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
|
|
7113
7113
|
// so instead of throwing error, use fs.watchFile
|
|
7114
7114
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
7115
|
-
sysLog("sysLog:: "
|
|
7115
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
7116
7116
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
7117
7117
|
}
|
|
7118
7118
|
}
|
|
@@ -10127,7 +10127,7 @@ var ts;
|
|
|
10127
10127
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
10128
10128
|
}
|
|
10129
10129
|
else {
|
|
10130
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
10130
|
+
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"));
|
|
10131
10131
|
}
|
|
10132
10132
|
}
|
|
10133
10133
|
var res = lineStarts[line] + character;
|
|
@@ -13017,7 +13017,7 @@ var ts;
|
|
|
13017
13017
|
: "linkplain";
|
|
13018
13018
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
13019
13019
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
13020
|
-
return "{@"
|
|
13020
|
+
return "{@".concat(kind, " ").concat(name).concat(space).concat(link.text, "}");
|
|
13021
13021
|
}
|
|
13022
13022
|
/**
|
|
13023
13023
|
* Gets the effective type parameters. If the node was parsed in a
|
|
@@ -14274,11 +14274,11 @@ var ts;
|
|
|
14274
14274
|
}
|
|
14275
14275
|
function packageIdToPackageName(_a) {
|
|
14276
14276
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
14277
|
-
return subModuleName ? name
|
|
14277
|
+
return subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
14278
14278
|
}
|
|
14279
14279
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
14280
14280
|
function packageIdToString(packageId) {
|
|
14281
|
-
return packageIdToPackageName(packageId)
|
|
14281
|
+
return "".concat(packageIdToPackageName(packageId), "@").concat(packageId.version);
|
|
14282
14282
|
}
|
|
14283
14283
|
ts.packageIdToString = packageIdToString;
|
|
14284
14284
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -14361,7 +14361,7 @@ var ts;
|
|
|
14361
14361
|
function nodePosToString(node) {
|
|
14362
14362
|
var file = getSourceFileOfNode(node);
|
|
14363
14363
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
14364
|
-
return file.fileName
|
|
14364
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
14365
14365
|
}
|
|
14366
14366
|
ts.nodePosToString = nodePosToString;
|
|
14367
14367
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -14500,7 +14500,7 @@ var ts;
|
|
|
14500
14500
|
ts.isPinnedComment = isPinnedComment;
|
|
14501
14501
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
14502
14502
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
14503
|
-
""
|
|
14503
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
14504
14504
|
commentDirective,
|
|
14505
14505
|
]); }));
|
|
14506
14506
|
var usedLines = new ts.Map();
|
|
@@ -14517,10 +14517,10 @@ var ts;
|
|
|
14517
14517
|
});
|
|
14518
14518
|
}
|
|
14519
14519
|
function markUsed(line) {
|
|
14520
|
-
if (!directivesByLine.has(""
|
|
14520
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
14521
14521
|
return false;
|
|
14522
14522
|
}
|
|
14523
|
-
usedLines.set(""
|
|
14523
|
+
usedLines.set("".concat(line), true);
|
|
14524
14524
|
return true;
|
|
14525
14525
|
}
|
|
14526
14526
|
}
|
|
@@ -14750,7 +14750,7 @@ var ts;
|
|
|
14750
14750
|
}
|
|
14751
14751
|
return node.text;
|
|
14752
14752
|
}
|
|
14753
|
-
return ts.Debug.fail("Literal kind '"
|
|
14753
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
14754
14754
|
}
|
|
14755
14755
|
ts.getLiteralText = getLiteralText;
|
|
14756
14756
|
function canUseOriginalText(node, flags) {
|
|
@@ -17331,11 +17331,11 @@ var ts;
|
|
|
17331
17331
|
}
|
|
17332
17332
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
17333
17333
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
17334
|
-
return "__@"
|
|
17334
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
17335
17335
|
}
|
|
17336
17336
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
17337
17337
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
17338
|
-
return "__#"
|
|
17338
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
17339
17339
|
}
|
|
17340
17340
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
17341
17341
|
function isKnownSymbol(symbol) {
|
|
@@ -20037,7 +20037,7 @@ var ts;
|
|
|
20037
20037
|
}
|
|
20038
20038
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
20039
20039
|
function getJSXRuntimeImport(base, options) {
|
|
20040
|
-
return base ? base
|
|
20040
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
20041
20041
|
}
|
|
20042
20042
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
20043
20043
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -20144,7 +20144,7 @@ var ts;
|
|
|
20144
20144
|
}
|
|
20145
20145
|
var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
20146
20146
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
20147
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
20147
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
20148
20148
|
var filesMatcher = {
|
|
20149
20149
|
/**
|
|
20150
20150
|
* Matches any single directory segment unless it is the last segment and a .min.js file
|
|
@@ -20157,7 +20157,7 @@ var ts;
|
|
|
20157
20157
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
20158
20158
|
* files or directories, does not match subdirectories that start with a . character
|
|
20159
20159
|
*/
|
|
20160
|
-
doubleAsteriskRegexFragment: "(/"
|
|
20160
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
20161
20161
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
20162
20162
|
};
|
|
20163
20163
|
var directoriesMatcher = {
|
|
@@ -20166,7 +20166,7 @@ var ts;
|
|
|
20166
20166
|
* Regex for the ** wildcard. Matches any number of subdirectories. When used for including
|
|
20167
20167
|
* files or directories, does not match subdirectories that start with a . character
|
|
20168
20168
|
*/
|
|
20169
|
-
doubleAsteriskRegexFragment: "(/"
|
|
20169
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
20170
20170
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
20171
20171
|
};
|
|
20172
20172
|
var excludeMatcher = {
|
|
@@ -20184,10 +20184,10 @@ var ts;
|
|
|
20184
20184
|
if (!patterns || !patterns.length) {
|
|
20185
20185
|
return undefined;
|
|
20186
20186
|
}
|
|
20187
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
20187
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
20188
20188
|
// If excluding, match "foo/bar/baz...", but if including, only allow "foo".
|
|
20189
20189
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
20190
|
-
return "^("
|
|
20190
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
20191
20191
|
}
|
|
20192
20192
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
20193
20193
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -20209,7 +20209,7 @@ var ts;
|
|
|
20209
20209
|
ts.isImplicitGlob = isImplicitGlob;
|
|
20210
20210
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
20211
20211
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
20212
|
-
return pattern && "^("
|
|
20212
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
20213
20213
|
}
|
|
20214
20214
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
20215
20215
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -20287,7 +20287,7 @@ var ts;
|
|
|
20287
20287
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
20288
20288
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
20289
20289
|
return {
|
|
20290
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
20290
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
20291
20291
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
20292
20292
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
20293
20293
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -20568,7 +20568,7 @@ var ts;
|
|
|
20568
20568
|
*/
|
|
20569
20569
|
function extensionFromPath(path) {
|
|
20570
20570
|
var ext = tryGetExtensionFromPath(path);
|
|
20571
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
20571
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
20572
20572
|
}
|
|
20573
20573
|
ts.extensionFromPath = extensionFromPath;
|
|
20574
20574
|
function isAnySupportedFileExtension(path) {
|
|
@@ -26651,7 +26651,7 @@ var ts;
|
|
|
26651
26651
|
case 326 /* JSDocAugmentsTag */: return "augments";
|
|
26652
26652
|
case 327 /* JSDocImplementsTag */: return "implements";
|
|
26653
26653
|
default:
|
|
26654
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
26654
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
26655
26655
|
}
|
|
26656
26656
|
}
|
|
26657
26657
|
var rawTextScanner;
|
|
@@ -26979,7 +26979,7 @@ var ts;
|
|
|
26979
26979
|
};
|
|
26980
26980
|
var definedTextGetter_1 = function (path) {
|
|
26981
26981
|
var result = textGetter_1(path);
|
|
26982
|
-
return result !== undefined ? result : "/* Input file "
|
|
26982
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
26983
26983
|
};
|
|
26984
26984
|
var buildInfo_1;
|
|
26985
26985
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -31517,7 +31517,7 @@ var ts;
|
|
|
31517
31517
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
31518
31518
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
31519
31519
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
31520
|
-
return keyword
|
|
31520
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
31521
31521
|
}
|
|
31522
31522
|
}
|
|
31523
31523
|
return undefined;
|
|
@@ -38287,7 +38287,7 @@ var ts;
|
|
|
38287
38287
|
if (namedArgRegExCache.has(name)) {
|
|
38288
38288
|
return namedArgRegExCache.get(name);
|
|
38289
38289
|
}
|
|
38290
|
-
var result = new RegExp("(\\s"
|
|
38290
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
38291
38291
|
namedArgRegExCache.set(name, result);
|
|
38292
38292
|
return result;
|
|
38293
38293
|
}
|
|
@@ -39765,8 +39765,8 @@ var ts;
|
|
|
39765
39765
|
}
|
|
39766
39766
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
39767
39767
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
39768
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
39769
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
39768
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
39769
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
39770
39770
|
}
|
|
39771
39771
|
/* @internal */
|
|
39772
39772
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -40560,10 +40560,10 @@ var ts;
|
|
|
40560
40560
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
40561
40561
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
40562
40562
|
if (newValue !== defaultValue) {
|
|
40563
|
-
result.push(""
|
|
40563
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
40564
40564
|
}
|
|
40565
40565
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
40566
|
-
result.push(""
|
|
40566
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
40567
40567
|
}
|
|
40568
40568
|
});
|
|
40569
40569
|
return result.join(newLine) + newLine;
|
|
@@ -40614,19 +40614,19 @@ var ts;
|
|
|
40614
40614
|
if (entries.length !== 0) {
|
|
40615
40615
|
entries.push({ value: "" });
|
|
40616
40616
|
}
|
|
40617
|
-
entries.push({ value: "/* "
|
|
40617
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
40618
40618
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
40619
40619
|
var option = options_1[_i];
|
|
40620
40620
|
var optionName = void 0;
|
|
40621
40621
|
if (compilerOptionsMap.has(option.name)) {
|
|
40622
|
-
optionName = "\""
|
|
40622
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
40623
40623
|
}
|
|
40624
40624
|
else {
|
|
40625
|
-
optionName = "// \""
|
|
40625
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
40626
40626
|
}
|
|
40627
40627
|
entries.push({
|
|
40628
40628
|
value: optionName,
|
|
40629
|
-
description: "/* "
|
|
40629
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
40630
40630
|
});
|
|
40631
40631
|
marginLength = Math.max(optionName.length, marginLength);
|
|
40632
40632
|
}
|
|
@@ -40635,25 +40635,25 @@ var ts;
|
|
|
40635
40635
|
var tab = makePadding(2);
|
|
40636
40636
|
var result = [];
|
|
40637
40637
|
result.push("{");
|
|
40638
|
-
result.push(tab
|
|
40639
|
-
result.push(""
|
|
40638
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
40639
|
+
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), " */"));
|
|
40640
40640
|
result.push("");
|
|
40641
40641
|
// Print out each row, aligning all the descriptions on the same column.
|
|
40642
40642
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
40643
40643
|
var entry = entries_2[_a];
|
|
40644
40644
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
40645
|
-
result.push(value && ""
|
|
40645
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
40646
40646
|
}
|
|
40647
40647
|
if (fileNames.length) {
|
|
40648
|
-
result.push(tab
|
|
40649
|
-
result.push(tab
|
|
40648
|
+
result.push("".concat(tab, "},"));
|
|
40649
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
40650
40650
|
for (var i = 0; i < fileNames.length; i++) {
|
|
40651
|
-
result.push(""
|
|
40651
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
40652
40652
|
}
|
|
40653
|
-
result.push(tab
|
|
40653
|
+
result.push("".concat(tab, "]"));
|
|
40654
40654
|
}
|
|
40655
40655
|
else {
|
|
40656
|
-
result.push(tab
|
|
40656
|
+
result.push("".concat(tab, "}"));
|
|
40657
40657
|
}
|
|
40658
40658
|
result.push("}");
|
|
40659
40659
|
return result.join(newLine) + newLine;
|
|
@@ -41051,7 +41051,7 @@ var ts;
|
|
|
41051
41051
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
41052
41052
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
41053
41053
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json" /* Json */)) {
|
|
41054
|
-
extendedConfigPath = extendedConfigPath
|
|
41054
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
41055
41055
|
if (!host.fileExists(extendedConfigPath)) {
|
|
41056
41056
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
41057
41057
|
return undefined;
|
|
@@ -41296,7 +41296,7 @@ var ts;
|
|
|
41296
41296
|
// Valid only if *.json specified
|
|
41297
41297
|
if (!jsonOnlyIncludeRegexes) {
|
|
41298
41298
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json" /* Json */); });
|
|
41299
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
41299
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
41300
41300
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
41301
41301
|
}
|
|
41302
41302
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -41732,7 +41732,7 @@ var ts;
|
|
|
41732
41732
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
41733
41733
|
if (typeof bestVersionPaths !== "object") {
|
|
41734
41734
|
if (state.traceEnabled) {
|
|
41735
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
41735
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
41736
41736
|
}
|
|
41737
41737
|
return;
|
|
41738
41738
|
}
|
|
@@ -42139,7 +42139,7 @@ var ts;
|
|
|
42139
42139
|
};
|
|
42140
42140
|
return cache;
|
|
42141
42141
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
42142
|
-
var result = mode === undefined ? specifier : mode
|
|
42142
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
42143
42143
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
42144
42144
|
return result;
|
|
42145
42145
|
}
|
|
@@ -42170,7 +42170,7 @@ var ts;
|
|
|
42170
42170
|
}
|
|
42171
42171
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
42172
42172
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
42173
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
42173
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
42174
42174
|
}
|
|
42175
42175
|
function createPerModuleNameCache() {
|
|
42176
42176
|
var directoryPathMap = new ts.Map();
|
|
@@ -42317,10 +42317,10 @@ var ts;
|
|
|
42317
42317
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
42318
42318
|
break;
|
|
42319
42319
|
default:
|
|
42320
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
42320
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
42321
42321
|
}
|
|
42322
42322
|
if (result && result.resolvedModule)
|
|
42323
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
42323
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
42324
42324
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
42325
42325
|
if (perFolderCache) {
|
|
42326
42326
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -42523,7 +42523,7 @@ var ts;
|
|
|
42523
42523
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
42524
42524
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
42525
42525
|
if (!resolvedModule) {
|
|
42526
|
-
throw new Error("Could not resolve JS module '"
|
|
42526
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
42527
42527
|
}
|
|
42528
42528
|
return resolvedModule.resolvedFileName;
|
|
42529
42529
|
}
|
|
@@ -42633,7 +42633,7 @@ var ts;
|
|
|
42633
42633
|
if (traceEnabled) {
|
|
42634
42634
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
42635
42635
|
}
|
|
42636
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
42636
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
42637
42637
|
return real;
|
|
42638
42638
|
}
|
|
42639
42639
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -43110,7 +43110,7 @@ var ts;
|
|
|
43110
43110
|
return undefined;
|
|
43111
43111
|
}
|
|
43112
43112
|
var trailingParts = parts.slice(nameParts.length);
|
|
43113
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
43113
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
43114
43114
|
}
|
|
43115
43115
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
43116
43116
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -43438,7 +43438,7 @@ var ts;
|
|
|
43438
43438
|
}
|
|
43439
43439
|
/* @internal */
|
|
43440
43440
|
function getTypesPackageName(packageName) {
|
|
43441
|
-
return "@types/"
|
|
43441
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
43442
43442
|
}
|
|
43443
43443
|
ts.getTypesPackageName = getTypesPackageName;
|
|
43444
43444
|
/* @internal */
|
|
@@ -43839,7 +43839,7 @@ var ts;
|
|
|
43839
43839
|
if (name) {
|
|
43840
43840
|
if (ts.isAmbientModule(node)) {
|
|
43841
43841
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
43842
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
43842
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
43843
43843
|
}
|
|
43844
43844
|
if (name.kind === 161 /* ComputedPropertyName */) {
|
|
43845
43845
|
var nameExpression = name.expression;
|
|
@@ -43896,7 +43896,7 @@ var ts;
|
|
|
43896
43896
|
case 163 /* Parameter */:
|
|
43897
43897
|
// Parameters with names are handled at the top of this function. Parameters
|
|
43898
43898
|
// without names can only come from JSDocFunctionTypes.
|
|
43899
|
-
ts.Debug.assert(node.parent.kind === 315 /* JSDocFunctionType */, "Impossible parameter parent kind", function () { return "parent is: "
|
|
43899
|
+
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"); });
|
|
43900
43900
|
var functionType = node.parent;
|
|
43901
43901
|
var index = functionType.parameters.indexOf(node);
|
|
43902
43902
|
return "arg" + index;
|
|
@@ -44008,7 +44008,7 @@ var ts;
|
|
|
44008
44008
|
var relatedInformation_1 = [];
|
|
44009
44009
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) {
|
|
44010
44010
|
// export type T; - may have meant export type { T }?
|
|
44011
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
44011
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
44012
44012
|
}
|
|
44013
44013
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
44014
44014
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -46084,7 +46084,7 @@ var ts;
|
|
|
46084
46084
|
}
|
|
46085
46085
|
}
|
|
46086
46086
|
function bindSourceFileAsExternalModule() {
|
|
46087
|
-
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\""
|
|
46087
|
+
bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
46088
46088
|
}
|
|
46089
46089
|
function bindExportAssignment(node) {
|
|
46090
46090
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -48184,7 +48184,7 @@ var ts;
|
|
|
48184
48184
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
48185
48185
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile;
|
|
48186
48186
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
48187
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
48187
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
48188
48188
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
48189
48189
|
});
|
|
48190
48190
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -50837,7 +50837,7 @@ var ts;
|
|
|
50837
50837
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
50838
50838
|
// Go from enclosingDeclaration to the first scope we check, so the cache is keyed off the scope and thus shared more
|
|
50839
50839
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
50840
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
50840
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
50841
50841
|
if (cache.has(key)) {
|
|
50842
50842
|
return cache.get(key);
|
|
50843
50843
|
}
|
|
@@ -51686,7 +51686,7 @@ var ts;
|
|
|
51686
51686
|
context.symbolDepth = new ts.Map();
|
|
51687
51687
|
}
|
|
51688
51688
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
51689
|
-
var key = getTypeId(type)
|
|
51689
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
51690
51690
|
if (links) {
|
|
51691
51691
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
51692
51692
|
}
|
|
@@ -51955,7 +51955,7 @@ var ts;
|
|
|
51955
51955
|
}
|
|
51956
51956
|
}
|
|
51957
51957
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
51958
|
-
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... "
|
|
51958
|
+
typeElements.push(ts.factory.createPropertySignature(/*modifiers*/ undefined, "... ".concat(properties.length - i, " more ..."), /*questionToken*/ undefined, /*type*/ undefined));
|
|
51959
51959
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
51960
51960
|
break;
|
|
51961
51961
|
}
|
|
@@ -52070,7 +52070,7 @@ var ts;
|
|
|
52070
52070
|
else if (types.length > 2) {
|
|
52071
52071
|
return [
|
|
52072
52072
|
typeToTypeNodeHelper(types[0], context),
|
|
52073
|
-
ts.factory.createTypeReferenceNode("... "
|
|
52073
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), /*typeArguments*/ undefined),
|
|
52074
52074
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
52075
52075
|
];
|
|
52076
52076
|
}
|
|
@@ -52084,7 +52084,7 @@ var ts;
|
|
|
52084
52084
|
var type = types_2[_i];
|
|
52085
52085
|
i++;
|
|
52086
52086
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
52087
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
52087
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), /*typeArguments*/ undefined));
|
|
52088
52088
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
52089
52089
|
if (typeNode_1) {
|
|
52090
52090
|
result_5.push(typeNode_1);
|
|
@@ -52607,7 +52607,7 @@ var ts;
|
|
|
52607
52607
|
var text = rawtext;
|
|
52608
52608
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
52609
52609
|
i++;
|
|
52610
|
-
text = rawtext
|
|
52610
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
52611
52611
|
}
|
|
52612
52612
|
if (text !== rawtext) {
|
|
52613
52613
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -52927,7 +52927,7 @@ var ts;
|
|
|
52927
52927
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
52928
52928
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
52929
52929
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
52930
|
-
: "arg"
|
|
52930
|
+
: "arg".concat(index);
|
|
52931
52931
|
}
|
|
52932
52932
|
function rewriteModuleSpecifier(parent, lit) {
|
|
52933
52933
|
if (bundled) {
|
|
@@ -54012,7 +54012,7 @@ var ts;
|
|
|
54012
54012
|
return results_1;
|
|
54013
54013
|
}
|
|
54014
54014
|
// The `Constructor`'s symbol isn't in the class's properties lists, obviously, since it's a signature on the static
|
|
54015
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
54015
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
54016
54016
|
};
|
|
54017
54017
|
}
|
|
54018
54018
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -54087,7 +54087,7 @@ var ts;
|
|
|
54087
54087
|
if (ref) {
|
|
54088
54088
|
return ref;
|
|
54089
54089
|
}
|
|
54090
|
-
var tempName = getUnusedName(rootName
|
|
54090
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
54091
54091
|
var statement = ts.factory.createVariableStatement(/*modifiers*/ undefined, ts.factory.createVariableDeclarationList([
|
|
54092
54092
|
ts.factory.createVariableDeclaration(tempName, /*exclamationToken*/ undefined, typeToTypeNodeHelper(staticType, context))
|
|
54093
54093
|
], 2 /* Const */));
|
|
@@ -54134,7 +54134,7 @@ var ts;
|
|
|
54134
54134
|
var original = input;
|
|
54135
54135
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
54136
54136
|
i++;
|
|
54137
|
-
input = original
|
|
54137
|
+
input = "".concat(original, "_").concat(i);
|
|
54138
54138
|
}
|
|
54139
54139
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
54140
54140
|
if (id) {
|
|
@@ -54242,15 +54242,15 @@ var ts;
|
|
|
54242
54242
|
if (nameType.flags & 384 /* StringOrNumberLiteral */) {
|
|
54243
54243
|
var name = "" + nameType.value;
|
|
54244
54244
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
54245
|
-
return "\""
|
|
54245
|
+
return "\"".concat(ts.escapeString(name, 34 /* doubleQuote */), "\"");
|
|
54246
54246
|
}
|
|
54247
54247
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
54248
|
-
return "["
|
|
54248
|
+
return "[".concat(name, "]");
|
|
54249
54249
|
}
|
|
54250
54250
|
return name;
|
|
54251
54251
|
}
|
|
54252
54252
|
if (nameType.flags & 8192 /* UniqueESSymbol */) {
|
|
54253
|
-
return "["
|
|
54253
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
54254
54254
|
}
|
|
54255
54255
|
}
|
|
54256
54256
|
}
|
|
@@ -57081,7 +57081,7 @@ var ts;
|
|
|
57081
57081
|
!leftName ? rightName :
|
|
57082
57082
|
!rightName ? leftName :
|
|
57083
57083
|
undefined;
|
|
57084
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
57084
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
57085
57085
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
57086
57086
|
params[i] = paramSymbol;
|
|
57087
57087
|
}
|
|
@@ -59032,7 +59032,7 @@ var ts;
|
|
|
59032
59032
|
return result;
|
|
59033
59033
|
}
|
|
59034
59034
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
59035
|
-
return aliasSymbol ? "@"
|
|
59035
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
59036
59036
|
}
|
|
59037
59037
|
// This function is used to propagate certain flags when creating new object type references and union types.
|
|
59038
59038
|
// It is only necessary to do so if a constituent type might be the undefined type, the null type, the type
|
|
@@ -59218,7 +59218,7 @@ var ts;
|
|
|
59218
59218
|
return undefined;
|
|
59219
59219
|
}
|
|
59220
59220
|
function getSymbolPath(symbol) {
|
|
59221
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
59221
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
59222
59222
|
}
|
|
59223
59223
|
function getUnresolvedSymbolForEntityName(name) {
|
|
59224
59224
|
var identifier = name.kind === 160 /* QualifiedName */ ? name.right :
|
|
@@ -59229,7 +59229,7 @@ var ts;
|
|
|
59229
59229
|
var parentSymbol = name.kind === 160 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) :
|
|
59230
59230
|
name.kind === 205 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
59231
59231
|
undefined;
|
|
59232
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
59232
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
59233
59233
|
var result = unresolvedSymbols.get(path);
|
|
59234
59234
|
if (!result) {
|
|
59235
59235
|
unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */));
|
|
@@ -59302,7 +59302,7 @@ var ts;
|
|
|
59302
59302
|
if (substitute.flags & 3 /* AnyOrUnknown */ || substitute === baseType) {
|
|
59303
59303
|
return baseType;
|
|
59304
59304
|
}
|
|
59305
|
-
var id = getTypeId(baseType)
|
|
59305
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
59306
59306
|
var cached = substitutionTypes.get(id);
|
|
59307
59307
|
if (cached) {
|
|
59308
59308
|
return cached;
|
|
@@ -60226,9 +60226,9 @@ var ts;
|
|
|
60226
60226
|
return types[0];
|
|
60227
60227
|
}
|
|
60228
60228
|
var typeKey = !origin ? getTypeListId(types) :
|
|
60229
|
-
origin.flags & 1048576 /* Union */ ? "|"
|
|
60230
|
-
origin.flags & 2097152 /* Intersection */ ? "&"
|
|
60231
|
-
"#"
|
|
60229
|
+
origin.flags & 1048576 /* Union */ ? "|".concat(getTypeListId(origin.types)) :
|
|
60230
|
+
origin.flags & 2097152 /* Intersection */ ? "&".concat(getTypeListId(origin.types)) :
|
|
60231
|
+
"#".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
|
|
60232
60232
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
60233
60233
|
var type = unionTypes.get(id);
|
|
60234
60234
|
if (!type) {
|
|
@@ -60750,7 +60750,7 @@ var ts;
|
|
|
60750
60750
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4 /* String */); })) {
|
|
60751
60751
|
return stringType;
|
|
60752
60752
|
}
|
|
60753
|
-
var id = getTypeListId(newTypes)
|
|
60753
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
60754
60754
|
var type = templateLiteralTypes.get(id);
|
|
60755
60755
|
if (!type) {
|
|
60756
60756
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -60810,7 +60810,7 @@ var ts;
|
|
|
60810
60810
|
return str;
|
|
60811
60811
|
}
|
|
60812
60812
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
60813
|
-
var id = getSymbolId(symbol)
|
|
60813
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
60814
60814
|
var result = stringMappingTypes.get(id);
|
|
60815
60815
|
if (!result) {
|
|
60816
60816
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -61827,7 +61827,7 @@ var ts;
|
|
|
61827
61827
|
function createUniqueESSymbolType(symbol) {
|
|
61828
61828
|
var type = createType(8192 /* UniqueESSymbol */);
|
|
61829
61829
|
type.symbol = symbol;
|
|
61830
|
-
type.escapedName = "__@"
|
|
61830
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
61831
61831
|
return type;
|
|
61832
61832
|
}
|
|
61833
61833
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -63516,24 +63516,24 @@ var ts;
|
|
|
63516
63516
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
63517
63517
|
// Parenthesize a `new` if there is one
|
|
63518
63518
|
if (path.indexOf("new ") === 0) {
|
|
63519
|
-
path = "("
|
|
63519
|
+
path = "(".concat(path, ")");
|
|
63520
63520
|
}
|
|
63521
63521
|
var str = "" + args[0];
|
|
63522
63522
|
// If leading, just print back the arg (irrespective of if it's a valid identifier)
|
|
63523
63523
|
if (path.length === 0) {
|
|
63524
|
-
path = ""
|
|
63524
|
+
path = "".concat(str);
|
|
63525
63525
|
}
|
|
63526
63526
|
// Otherwise write a dotted name if possible
|
|
63527
63527
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
63528
|
-
path = path
|
|
63528
|
+
path = "".concat(path, ".").concat(str);
|
|
63529
63529
|
}
|
|
63530
63530
|
// Failing that, check if the name is already a computed name
|
|
63531
63531
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
63532
|
-
path = ""
|
|
63532
|
+
path = "".concat(path).concat(str);
|
|
63533
63533
|
}
|
|
63534
63534
|
// And finally write out a computed name as a last resort
|
|
63535
63535
|
else {
|
|
63536
|
-
path = path
|
|
63536
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
63537
63537
|
}
|
|
63538
63538
|
break;
|
|
63539
63539
|
}
|
|
@@ -63562,7 +63562,7 @@ var ts;
|
|
|
63562
63562
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
63563
63563
|
? ""
|
|
63564
63564
|
: "...";
|
|
63565
|
-
path = ""
|
|
63565
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
63566
63566
|
}
|
|
63567
63567
|
break;
|
|
63568
63568
|
}
|
|
@@ -63575,7 +63575,7 @@ var ts;
|
|
|
63575
63575
|
break;
|
|
63576
63576
|
}
|
|
63577
63577
|
default:
|
|
63578
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
63578
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
63579
63579
|
}
|
|
63580
63580
|
}
|
|
63581
63581
|
if (path) {
|
|
@@ -65777,7 +65777,7 @@ var ts;
|
|
|
65777
65777
|
var constraintMarker = "";
|
|
65778
65778
|
var sourceId = getTypeReferenceId(source, 0);
|
|
65779
65779
|
var targetId = getTypeReferenceId(target, 0);
|
|
65780
|
-
return ""
|
|
65780
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
65781
65781
|
// getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
|
|
65782
65782
|
// where A.id=111 and number.id=12
|
|
65783
65783
|
function getTypeReferenceId(type, depth) {
|
|
@@ -65821,7 +65821,7 @@ var ts;
|
|
|
65821
65821
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
65822
65822
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
65823
65823
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
65824
|
-
source.id
|
|
65824
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
65825
65825
|
}
|
|
65826
65826
|
// Invoke the callback for each underlying property symbol of the given symbol and return the first
|
|
65827
65827
|
// value that isn't undefined.
|
|
@@ -67948,11 +67948,11 @@ var ts;
|
|
|
67948
67948
|
case 79 /* Identifier */:
|
|
67949
67949
|
if (!ts.isThisInTypeQuery(node)) {
|
|
67950
67950
|
var symbol = getResolvedSymbol(node);
|
|
67951
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
67951
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
67952
67952
|
}
|
|
67953
67953
|
// falls through
|
|
67954
67954
|
case 108 /* ThisKeyword */:
|
|
67955
|
-
return "0|"
|
|
67955
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
67956
67956
|
case 229 /* NonNullExpression */:
|
|
67957
67957
|
case 211 /* ParenthesizedExpression */:
|
|
67958
67958
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -71841,7 +71841,7 @@ var ts;
|
|
|
71841
71841
|
!leftName ? rightName :
|
|
71842
71842
|
!rightName ? leftName :
|
|
71843
71843
|
undefined;
|
|
71844
|
-
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg"
|
|
71844
|
+
var paramSymbol = createSymbol(1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), paramName || "arg".concat(i));
|
|
71845
71845
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
71846
71846
|
params[i] = paramSymbol;
|
|
71847
71847
|
}
|
|
@@ -81708,7 +81708,7 @@ var ts;
|
|
|
81708
81708
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
81709
81709
|
var ctorType = getGlobalESSymbolConstructorSymbol(/*reportErrors*/ false);
|
|
81710
81710
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
81711
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
81711
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
81712
81712
|
}
|
|
81713
81713
|
/**
|
|
81714
81714
|
* Gets the *yield*, *return*, and *next* types of an `Iterable`-like or `AsyncIterable`-like
|
|
@@ -88760,7 +88760,7 @@ var ts;
|
|
|
88760
88760
|
value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 :
|
|
88761
88761
|
value === 62 ? 43 /* plus */ :
|
|
88762
88762
|
value === 63 ? 47 /* slash */ :
|
|
88763
|
-
ts.Debug.fail(value
|
|
88763
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
88764
88764
|
}
|
|
88765
88765
|
function base64FormatDecode(ch) {
|
|
88766
88766
|
return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ :
|
|
@@ -88835,7 +88835,7 @@ var ts;
|
|
|
88835
88835
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
88836
88836
|
if (decoder.error !== undefined) {
|
|
88837
88837
|
if (host.log) {
|
|
88838
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
88838
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
88839
88839
|
}
|
|
88840
88840
|
decodedMappings = ts.emptyArray;
|
|
88841
88841
|
}
|
|
@@ -92510,7 +92510,7 @@ var ts;
|
|
|
92510
92510
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
92511
92511
|
? ts.declarationNameToString(originalNode.name)
|
|
92512
92512
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
92513
|
-
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " "
|
|
92513
|
+
ts.addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, " ".concat(propertyName, " "));
|
|
92514
92514
|
}
|
|
92515
92515
|
return substitute;
|
|
92516
92516
|
}
|
|
@@ -93986,8 +93986,8 @@ var ts;
|
|
|
93986
93986
|
}
|
|
93987
93987
|
function createHoistedVariableForClass(name, node) {
|
|
93988
93988
|
var className = getPrivateIdentifierEnvironment().className;
|
|
93989
|
-
var prefix = className ? "_"
|
|
93990
|
-
var identifier = factory.createUniqueName(prefix
|
|
93989
|
+
var prefix = className ? "_".concat(className) : "";
|
|
93990
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16 /* Optimistic */);
|
|
93991
93991
|
if (resolver.getNodeCheckFlags(node) & 524288 /* BlockScopedBindingInLoop */) {
|
|
93992
93992
|
addBlockScopedVariable(identifier);
|
|
93993
93993
|
}
|
|
@@ -95992,7 +95992,7 @@ var ts;
|
|
|
95992
95992
|
specifierSourceImports = new ts.Map();
|
|
95993
95993
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
95994
95994
|
}
|
|
95995
|
-
var generatedName = factory.createUniqueName("_"
|
|
95995
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */);
|
|
95996
95996
|
var specifier = factory.createImportSpecifier(/*isTypeOnly*/ false, factory.createIdentifier(name), generatedName);
|
|
95997
95997
|
generatedName.generatedImportReference = specifier;
|
|
95998
95998
|
specifierSourceImports.set(name, specifier);
|
|
@@ -97140,11 +97140,11 @@ var ts;
|
|
|
97140
97140
|
}
|
|
97141
97141
|
else {
|
|
97142
97142
|
if (node.kind === 245 /* BreakStatement */) {
|
|
97143
|
-
labelMarker = "break-"
|
|
97143
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
97144
97144
|
setLabeledJump(convertedLoopState, /*isBreak*/ true, ts.idText(label), labelMarker);
|
|
97145
97145
|
}
|
|
97146
97146
|
else {
|
|
97147
|
-
labelMarker = "continue-"
|
|
97147
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
97148
97148
|
setLabeledJump(convertedLoopState, /*isBreak*/ false, ts.idText(label), labelMarker);
|
|
97149
97149
|
}
|
|
97150
97150
|
}
|
|
@@ -106001,7 +106001,7 @@ var ts;
|
|
|
106001
106001
|
return getTypeAliasDeclarationVisibilityError;
|
|
106002
106002
|
}
|
|
106003
106003
|
else {
|
|
106004
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
106004
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
106005
106005
|
}
|
|
106006
106006
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
106007
106007
|
if (node.kind === 253 /* VariableDeclaration */ || node.kind === 202 /* BindingElement */) {
|
|
@@ -106212,7 +106212,7 @@ var ts;
|
|
|
106212
106212
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
106213
106213
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
106214
106214
|
default:
|
|
106215
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
106215
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
106216
106216
|
}
|
|
106217
106217
|
}
|
|
106218
106218
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -106970,7 +106970,7 @@ var ts;
|
|
|
106970
106970
|
while (ts.length(lateMarkedStatements)) {
|
|
106971
106971
|
var i = lateMarkedStatements.shift();
|
|
106972
106972
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
106973
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
106973
|
+
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));
|
|
106974
106974
|
}
|
|
106975
106975
|
var priorNeedsDeclare = needsDeclare;
|
|
106976
106976
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -107159,7 +107159,7 @@ var ts;
|
|
|
107159
107159
|
return cleanup(input);
|
|
107160
107160
|
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));
|
|
107161
107161
|
}
|
|
107162
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
107162
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
107163
107163
|
}
|
|
107164
107164
|
}
|
|
107165
107165
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -107450,7 +107450,7 @@ var ts;
|
|
|
107450
107450
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* NullKeyword */) {
|
|
107451
107451
|
// We must add a temporary declaration for the extends clause expression
|
|
107452
107452
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
107453
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
107453
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16 /* Optimistic */);
|
|
107454
107454
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
107455
107455
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
107456
107456
|
errorNode: extendsClause_1,
|
|
@@ -107491,7 +107491,7 @@ var ts;
|
|
|
107491
107491
|
}
|
|
107492
107492
|
}
|
|
107493
107493
|
// Anything left unhandled is an error, so this should be unreachable
|
|
107494
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
107494
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
107495
107495
|
function cleanup(node) {
|
|
107496
107496
|
if (isEnclosingDeclaration(input)) {
|
|
107497
107497
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -108383,13 +108383,13 @@ var ts;
|
|
|
108383
108383
|
if (ts.fileExtensionIs(inputFileName, ".json" /* Json */))
|
|
108384
108384
|
return;
|
|
108385
108385
|
if (js && configFile.options.sourceMap) {
|
|
108386
|
-
addOutput(js
|
|
108386
|
+
addOutput("".concat(js, ".map"));
|
|
108387
108387
|
}
|
|
108388
108388
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
108389
108389
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
108390
108390
|
addOutput(dts);
|
|
108391
108391
|
if (configFile.options.declarationMap) {
|
|
108392
|
-
addOutput(dts
|
|
108392
|
+
addOutput("".concat(dts, ".map"));
|
|
108393
108393
|
}
|
|
108394
108394
|
}
|
|
108395
108395
|
}
|
|
@@ -108458,7 +108458,7 @@ var ts;
|
|
|
108458
108458
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
108459
108459
|
if (ts.outFile(configFile.options)) {
|
|
108460
108460
|
var jsFilePath = getOutputPathsForBundle(configFile.options, /*forceDtsPaths*/ false).jsFilePath;
|
|
108461
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
108461
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
108462
108462
|
}
|
|
108463
108463
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
108464
108464
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -108477,7 +108477,7 @@ var ts;
|
|
|
108477
108477
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
108478
108478
|
if (buildInfoPath)
|
|
108479
108479
|
return buildInfoPath;
|
|
108480
|
-
return ts.Debug.fail("project "
|
|
108480
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
108481
108481
|
}
|
|
108482
108482
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
108483
108483
|
/*@internal*/
|
|
@@ -108703,7 +108703,7 @@ var ts;
|
|
|
108703
108703
|
if (sourceMappingURL) {
|
|
108704
108704
|
if (!writer.isAtStartOfLine())
|
|
108705
108705
|
writer.rawWrite(newLine);
|
|
108706
|
-
writer.writeComment("//# "
|
|
108706
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL)); // Tools can sometimes see this line as a source mapping url comment
|
|
108707
108707
|
}
|
|
108708
108708
|
// Write the source map
|
|
108709
108709
|
if (sourceMapFilePath) {
|
|
@@ -108752,7 +108752,7 @@ var ts;
|
|
|
108752
108752
|
// Encode the sourceMap into the sourceMap url
|
|
108753
108753
|
var sourceMapText = sourceMapGenerator.toString();
|
|
108754
108754
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
108755
|
-
return "data:application/json;base64,"
|
|
108755
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
108756
108756
|
}
|
|
108757
108757
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
108758
108758
|
if (mapOptions.mapRoot) {
|
|
@@ -108932,7 +108932,7 @@ var ts;
|
|
|
108932
108932
|
return;
|
|
108933
108933
|
break;
|
|
108934
108934
|
default:
|
|
108935
|
-
ts.Debug.fail("Unexpected path: "
|
|
108935
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
108936
108936
|
}
|
|
108937
108937
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
108938
108938
|
},
|
|
@@ -109792,7 +109792,7 @@ var ts;
|
|
|
109792
109792
|
return writeTokenNode(node, writeKeyword);
|
|
109793
109793
|
if (ts.isTokenKind(node.kind))
|
|
109794
109794
|
return writeTokenNode(node, writePunctuation);
|
|
109795
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
109795
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
109796
109796
|
}
|
|
109797
109797
|
function emitMappedTypeParameter(node) {
|
|
109798
109798
|
emit(node.name);
|
|
@@ -109962,16 +109962,16 @@ var ts;
|
|
|
109962
109962
|
}
|
|
109963
109963
|
}
|
|
109964
109964
|
function emitPlaceholder(hint, node, snippet) {
|
|
109965
|
-
nonEscapingWrite("${"
|
|
109965
|
+
nonEscapingWrite("${".concat(snippet.order, ":")); // `${2:`
|
|
109966
109966
|
pipelineEmitWithHintWorker(hint, node, /*allowSnippets*/ false); // `...`
|
|
109967
109967
|
nonEscapingWrite("}"); // `}`
|
|
109968
109968
|
// `${2:...}`
|
|
109969
109969
|
}
|
|
109970
109970
|
function emitTabStop(hint, node, snippet) {
|
|
109971
109971
|
// A tab stop should only be attached to an empty node, i.e. a node that doesn't emit any text.
|
|
109972
|
-
ts.Debug.assert(node.kind === 235 /* EmptyStatement */, "A tab stop cannot be attached to a node of kind "
|
|
109972
|
+
ts.Debug.assert(node.kind === 235 /* EmptyStatement */, "A tab stop cannot be attached to a node of kind ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
109973
109973
|
ts.Debug.assert(hint !== 5 /* EmbeddedStatement */, "A tab stop cannot be attached to an embedded statement.");
|
|
109974
|
-
nonEscapingWrite("$"
|
|
109974
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
109975
109975
|
}
|
|
109976
109976
|
//
|
|
109977
109977
|
// Identifiers
|
|
@@ -111733,17 +111733,17 @@ var ts;
|
|
|
111733
111733
|
writeLine();
|
|
111734
111734
|
}
|
|
111735
111735
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
111736
|
-
writeComment("/// <amd-module name=\""
|
|
111736
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
111737
111737
|
writeLine();
|
|
111738
111738
|
}
|
|
111739
111739
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
111740
111740
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
111741
111741
|
var dep = _b[_a];
|
|
111742
111742
|
if (dep.name) {
|
|
111743
|
-
writeComment("/// <amd-dependency name=\""
|
|
111743
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
111744
111744
|
}
|
|
111745
111745
|
else {
|
|
111746
|
-
writeComment("/// <amd-dependency path=\""
|
|
111746
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
111747
111747
|
}
|
|
111748
111748
|
writeLine();
|
|
111749
111749
|
}
|
|
@@ -111751,7 +111751,7 @@ var ts;
|
|
|
111751
111751
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
111752
111752
|
var directive = files_2[_c];
|
|
111753
111753
|
var pos = writer.getTextPos();
|
|
111754
|
-
writeComment("/// <reference path=\""
|
|
111754
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
111755
111755
|
if (bundleFileInfo)
|
|
111756
111756
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName });
|
|
111757
111757
|
writeLine();
|
|
@@ -111759,7 +111759,7 @@ var ts;
|
|
|
111759
111759
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
111760
111760
|
var directive = types_24[_d];
|
|
111761
111761
|
var pos = writer.getTextPos();
|
|
111762
|
-
writeComment("/// <reference types=\""
|
|
111762
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
111763
111763
|
if (bundleFileInfo)
|
|
111764
111764
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type" /* Type */, data: directive.fileName });
|
|
111765
111765
|
writeLine();
|
|
@@ -111767,7 +111767,7 @@ var ts;
|
|
|
111767
111767
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
111768
111768
|
var directive = libs_1[_e];
|
|
111769
111769
|
var pos = writer.getTextPos();
|
|
111770
|
-
writeComment("/// <reference lib=\""
|
|
111770
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
111771
111771
|
if (bundleFileInfo)
|
|
111772
111772
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName });
|
|
111773
111773
|
writeLine();
|
|
@@ -112547,9 +112547,9 @@ var ts;
|
|
|
112547
112547
|
var textSourceNode = node.textSourceNode;
|
|
112548
112548
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
112549
112549
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
112550
|
-
return jsxAttributeEscape ? "\""
|
|
112551
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\""
|
|
112552
|
-
"\""
|
|
112550
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
112551
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216 /* NoAsciiEscaping */) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
112552
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
112553
112553
|
}
|
|
112554
112554
|
else {
|
|
112555
112555
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -113026,8 +113026,8 @@ var ts;
|
|
|
113026
113026
|
}
|
|
113027
113027
|
function formatSynthesizedComment(comment) {
|
|
113028
113028
|
return comment.kind === 3 /* MultiLineCommentTrivia */
|
|
113029
|
-
? "/*"
|
|
113030
|
-
: "//"
|
|
113029
|
+
? "/*".concat(comment.text, "*/")
|
|
113030
|
+
: "//".concat(comment.text);
|
|
113031
113031
|
}
|
|
113032
113032
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
113033
113033
|
enterComment();
|
|
@@ -113748,7 +113748,7 @@ var ts;
|
|
|
113748
113748
|
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;
|
|
113749
113749
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
113750
113750
|
if (!newPath) {
|
|
113751
|
-
writeLog("Project: "
|
|
113751
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
113752
113752
|
return true;
|
|
113753
113753
|
}
|
|
113754
113754
|
fileOrDirectoryPath = newPath;
|
|
@@ -113757,11 +113757,11 @@ var ts;
|
|
|
113757
113757
|
// If the the added or created file or directory is not supported file name, ignore the file
|
|
113758
113758
|
// But when watched directory is added/removed, we need to reload the file list
|
|
113759
113759
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
113760
|
-
writeLog("Project: "
|
|
113760
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
113761
113761
|
return true;
|
|
113762
113762
|
}
|
|
113763
113763
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
113764
|
-
writeLog("Project: "
|
|
113764
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
113765
113765
|
return true;
|
|
113766
113766
|
}
|
|
113767
113767
|
if (!program)
|
|
@@ -113785,7 +113785,7 @@ var ts;
|
|
|
113785
113785
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
113786
113786
|
if (hasSourceFile((filePathWithoutExtension + ".ts" /* Ts */)) ||
|
|
113787
113787
|
hasSourceFile((filePathWithoutExtension + ".tsx" /* Tsx */))) {
|
|
113788
|
-
writeLog("Project: "
|
|
113788
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
113789
113789
|
return true;
|
|
113790
113790
|
}
|
|
113791
113791
|
return false;
|
|
@@ -113853,36 +113853,36 @@ var ts;
|
|
|
113853
113853
|
host.useCaseSensitiveFileNames();
|
|
113854
113854
|
}
|
|
113855
113855
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
113856
|
-
log("ExcludeWatcher:: Added:: "
|
|
113856
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113857
113857
|
return {
|
|
113858
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
113858
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
113859
113859
|
};
|
|
113860
113860
|
}
|
|
113861
113861
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
113862
|
-
log("FileWatcher:: Added:: "
|
|
113862
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113863
113863
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
113864
113864
|
return {
|
|
113865
113865
|
close: function () {
|
|
113866
|
-
log("FileWatcher:: Close:: "
|
|
113866
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
113867
113867
|
watcher.close();
|
|
113868
113868
|
}
|
|
113869
113869
|
};
|
|
113870
113870
|
}
|
|
113871
113871
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
113872
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
113872
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
113873
113873
|
log(watchInfo);
|
|
113874
113874
|
var start = ts.timestamp();
|
|
113875
113875
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
113876
113876
|
var elapsed = ts.timestamp() - start;
|
|
113877
|
-
log("Elapsed:: "
|
|
113877
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
113878
113878
|
return {
|
|
113879
113879
|
close: function () {
|
|
113880
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
113880
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
113881
113881
|
log(watchInfo);
|
|
113882
113882
|
var start = ts.timestamp();
|
|
113883
113883
|
watcher.close();
|
|
113884
113884
|
var elapsed = ts.timestamp() - start;
|
|
113885
|
-
log("Elapsed:: "
|
|
113885
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
113886
113886
|
}
|
|
113887
113887
|
};
|
|
113888
113888
|
}
|
|
@@ -113892,16 +113892,16 @@ var ts;
|
|
|
113892
113892
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
113893
113893
|
args[_i] = arguments[_i];
|
|
113894
113894
|
}
|
|
113895
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
113895
|
+
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));
|
|
113896
113896
|
log(triggerredInfo);
|
|
113897
113897
|
var start = ts.timestamp();
|
|
113898
113898
|
cb.call.apply(cb, __spreadArray([/*thisArg*/ undefined], args, false));
|
|
113899
113899
|
var elapsed = ts.timestamp() - start;
|
|
113900
|
-
log("Elapsed:: "
|
|
113900
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
113901
113901
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
113902
113902
|
}
|
|
113903
113903
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
113904
|
-
return "WatchInfo: "
|
|
113904
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
113905
113905
|
}
|
|
113906
113906
|
}
|
|
113907
113907
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -114208,12 +114208,12 @@ var ts;
|
|
|
114208
114208
|
}
|
|
114209
114209
|
ts.formatDiagnostics = formatDiagnostics;
|
|
114210
114210
|
function formatDiagnostic(diagnostic, host) {
|
|
114211
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
114211
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
114212
114212
|
if (diagnostic.file) {
|
|
114213
114213
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; // TODO: GH#18217
|
|
114214
114214
|
var fileName = diagnostic.file.fileName;
|
|
114215
114215
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
114216
|
-
return relativeFileName
|
|
114216
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
114217
114217
|
}
|
|
114218
114218
|
return errorMessage;
|
|
114219
114219
|
}
|
|
@@ -114301,9 +114301,9 @@ var ts;
|
|
|
114301
114301
|
var output = "";
|
|
114302
114302
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
114303
114303
|
output += ":";
|
|
114304
|
-
output += color(""
|
|
114304
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
114305
114305
|
output += ":";
|
|
114306
|
-
output += color(""
|
|
114306
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
114307
114307
|
return output;
|
|
114308
114308
|
}
|
|
114309
114309
|
ts.formatLocation = formatLocation;
|
|
@@ -114317,7 +114317,7 @@ var ts;
|
|
|
114317
114317
|
output += " - ";
|
|
114318
114318
|
}
|
|
114319
114319
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
114320
|
-
output += formatColorAndReset(" TS"
|
|
114320
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
114321
114321
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
114322
114322
|
if (diagnostic.file) {
|
|
114323
114323
|
output += host.getNewLine();
|
|
@@ -114426,7 +114426,7 @@ var ts;
|
|
|
114426
114426
|
var result = void 0;
|
|
114427
114427
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
114428
114428
|
i++;
|
|
114429
|
-
var cacheKey = mode !== undefined ? mode
|
|
114429
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
114430
114430
|
if (cache.has(cacheKey)) {
|
|
114431
114431
|
result = cache.get(cacheKey);
|
|
114432
114432
|
}
|
|
@@ -116615,7 +116615,7 @@ var ts;
|
|
|
116615
116615
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
116616
116616
|
i++;
|
|
116617
116617
|
}
|
|
116618
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
116618
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
116619
116619
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
116620
116620
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
116621
116621
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -117436,12 +117436,12 @@ var ts;
|
|
|
117436
117436
|
}
|
|
117437
117437
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
117438
117438
|
var dirPath = host.toPath(dir);
|
|
117439
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
117439
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
117440
117440
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
117441
117441
|
// Any parent directory of declaration dir
|
|
117442
117442
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
117443
117443
|
// Any directory inside declaration dir
|
|
117444
|
-
ts.startsWith(dirPath, declDirPath
|
|
117444
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
117445
117445
|
}
|
|
117446
117446
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
117447
117447
|
var _a;
|
|
@@ -117494,7 +117494,7 @@ var ts;
|
|
|
117494
117494
|
if (isFile && result) {
|
|
117495
117495
|
// Store the real path for the file'
|
|
117496
117496
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
117497
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
117497
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
117498
117498
|
}
|
|
117499
117499
|
return result;
|
|
117500
117500
|
}) || false;
|
|
@@ -117952,7 +117952,7 @@ var ts;
|
|
|
117952
117952
|
/*forceDtsEmit*/ true);
|
|
117953
117953
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
117954
117954
|
if (firstDts_1) {
|
|
117955
|
-
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: "
|
|
117955
|
+
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; }))); });
|
|
117956
117956
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
117957
117957
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
117958
117958
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -118460,7 +118460,7 @@ var ts;
|
|
|
118460
118460
|
return;
|
|
118461
118461
|
}
|
|
118462
118462
|
else {
|
|
118463
|
-
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: "
|
|
118463
|
+
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));
|
|
118464
118464
|
}
|
|
118465
118465
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
118466
118466
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -119605,7 +119605,7 @@ var ts;
|
|
|
119605
119605
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
119606
119606
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
119607
119607
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
119608
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
119608
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
119609
119609
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
119610
119610
|
// Instead of watching root, watch directory in root to avoid watching excluded directories not needed for module resolution
|
|
119611
119611
|
return {
|
|
@@ -120687,7 +120687,7 @@ var ts;
|
|
|
120687
120687
|
}
|
|
120688
120688
|
function getJSExtensionForFile(fileName, options) {
|
|
120689
120689
|
var _a;
|
|
120690
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
120690
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
120691
120691
|
}
|
|
120692
120692
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
120693
120693
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -120790,8 +120790,8 @@ var ts;
|
|
|
120790
120790
|
return pretty ?
|
|
120791
120791
|
function (diagnostic, newLine, options) {
|
|
120792
120792
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
120793
|
-
var output = "["
|
|
120794
|
-
output += ""
|
|
120793
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
120794
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
120795
120795
|
system.write(output);
|
|
120796
120796
|
} :
|
|
120797
120797
|
function (diagnostic, newLine, options) {
|
|
@@ -120799,8 +120799,8 @@ var ts;
|
|
|
120799
120799
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
120800
120800
|
output += newLine;
|
|
120801
120801
|
}
|
|
120802
|
-
output += getLocaleTimeString(system)
|
|
120803
|
-
output += ""
|
|
120802
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
120803
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
120804
120804
|
system.write(output);
|
|
120805
120805
|
};
|
|
120806
120806
|
}
|
|
@@ -120823,7 +120823,7 @@ var ts;
|
|
|
120823
120823
|
.map(function (errorDiagnostic) {
|
|
120824
120824
|
if (errorDiagnostic.file === undefined)
|
|
120825
120825
|
return;
|
|
120826
|
-
return ""
|
|
120826
|
+
return "".concat(errorDiagnostic.file.fileName);
|
|
120827
120827
|
});
|
|
120828
120828
|
return filesInError.map(function (fileName) {
|
|
120829
120829
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -120856,7 +120856,7 @@ var ts;
|
|
|
120856
120856
|
if (errorCount === 0)
|
|
120857
120857
|
return "";
|
|
120858
120858
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
120859
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName
|
|
120859
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return "".concat(fileInError.fileName, ":").concat(fileInError.line); })
|
|
120860
120860
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
120861
120861
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
120862
120862
|
var d = errorCount === 1 ?
|
|
@@ -120869,7 +120869,7 @@ var ts;
|
|
|
120869
120869
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
120870
120870
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
120871
120871
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
120872
|
-
return ""
|
|
120872
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine).concat(suffix);
|
|
120873
120873
|
}
|
|
120874
120874
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
120875
120875
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -120892,7 +120892,7 @@ var ts;
|
|
|
120892
120892
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
120893
120893
|
: "";
|
|
120894
120894
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
120895
|
-
tabularData += ""
|
|
120895
|
+
tabularData += "".concat(leftPadding).concat(errorCount, " ").concat(fileRef, "\n");
|
|
120896
120896
|
});
|
|
120897
120897
|
return tabularData;
|
|
120898
120898
|
}
|
|
@@ -120919,9 +120919,9 @@ var ts;
|
|
|
120919
120919
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
120920
120920
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
120921
120921
|
var file = _c[_i];
|
|
120922
|
-
write(""
|
|
120923
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
120924
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
120922
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
120923
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
120924
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
120925
120925
|
}
|
|
120926
120926
|
}
|
|
120927
120927
|
ts.explainFiles = explainFiles;
|
|
@@ -120961,7 +120961,7 @@ var ts;
|
|
|
120961
120961
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json" /* Json */))
|
|
120962
120962
|
return false;
|
|
120963
120963
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
120964
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
120964
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
120965
120965
|
});
|
|
120966
120966
|
}
|
|
120967
120967
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -120970,7 +120970,7 @@ var ts;
|
|
|
120970
120970
|
var options = program.getCompilerOptions();
|
|
120971
120971
|
if (ts.isReferencedFile(reason)) {
|
|
120972
120972
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
120973
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
120973
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
120974
120974
|
var message = void 0;
|
|
120975
120975
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
120976
120976
|
switch (reason.kind) {
|
|
@@ -121094,7 +121094,7 @@ var ts;
|
|
|
121094
121094
|
var currentDir_1 = program.getCurrentDirectory();
|
|
121095
121095
|
ts.forEach(emittedFiles, function (file) {
|
|
121096
121096
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
121097
|
-
write("TSFILE: "
|
|
121097
|
+
write("TSFILE: ".concat(filepath));
|
|
121098
121098
|
});
|
|
121099
121099
|
listFiles(program, write);
|
|
121100
121100
|
}
|
|
@@ -121423,7 +121423,7 @@ var ts;
|
|
|
121423
121423
|
}
|
|
121424
121424
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
121425
121425
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
121426
|
-
writeLog("Current directory: "
|
|
121426
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
121427
121427
|
var configFileWatcher;
|
|
121428
121428
|
if (configFileName) {
|
|
121429
121429
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -121579,10 +121579,10 @@ var ts;
|
|
|
121579
121579
|
function createNewProgram(hasInvalidatedResolution) {
|
|
121580
121580
|
// Compile the program
|
|
121581
121581
|
writeLog("CreatingProgramWith::");
|
|
121582
|
-
writeLog(" roots: "
|
|
121583
|
-
writeLog(" options: "
|
|
121582
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
121583
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
121584
121584
|
if (projectReferences)
|
|
121585
|
-
writeLog(" projectReferences: "
|
|
121585
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
121586
121586
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
121587
121587
|
hasChangedCompilerOptions = false;
|
|
121588
121588
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -121743,7 +121743,7 @@ var ts;
|
|
|
121743
121743
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
121744
121744
|
}
|
|
121745
121745
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
121746
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
121746
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
121747
121747
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
121748
121748
|
}
|
|
121749
121749
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -121803,7 +121803,7 @@ var ts;
|
|
|
121803
121803
|
synchronizeProgram();
|
|
121804
121804
|
}
|
|
121805
121805
|
function reloadConfigFile() {
|
|
121806
|
-
writeLog("Reloading config file: "
|
|
121806
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
121807
121807
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
121808
121808
|
if (cachedDirectoryStructureHost) {
|
|
121809
121809
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -121844,7 +121844,7 @@ var ts;
|
|
|
121844
121844
|
return config.parsedCommandLine;
|
|
121845
121845
|
}
|
|
121846
121846
|
}
|
|
121847
|
-
writeLog("Loading config file: "
|
|
121847
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
121848
121848
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
121849
121849
|
host.getParsedCommandLine(configFileName) :
|
|
121850
121850
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -122148,8 +122148,8 @@ var ts;
|
|
|
122148
122148
|
*/
|
|
122149
122149
|
function createBuilderStatusReporter(system, pretty) {
|
|
122150
122150
|
return function (diagnostic) {
|
|
122151
|
-
var output = pretty ? "["
|
|
122152
|
-
output += ""
|
|
122151
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
122152
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
122153
122153
|
system.write(output);
|
|
122154
122154
|
};
|
|
122155
122155
|
}
|
|
@@ -122924,7 +122924,7 @@ var ts;
|
|
|
122924
122924
|
function listEmittedFile(_a, proj, file) {
|
|
122925
122925
|
var write = _a.write;
|
|
122926
122926
|
if (write && proj.options.listEmittedFiles) {
|
|
122927
|
-
write("TSFILE: "
|
|
122927
|
+
write("TSFILE: ".concat(file));
|
|
122928
122928
|
}
|
|
122929
122929
|
}
|
|
122930
122930
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -122953,7 +122953,7 @@ var ts;
|
|
|
122953
122953
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
122954
122954
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
122955
122955
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
122956
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
122956
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
122957
122957
|
if (canEmitBuildInfo)
|
|
122958
122958
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
122959
122959
|
afterProgramDone(state, program, config);
|
|
@@ -122981,7 +122981,7 @@ var ts;
|
|
|
122981
122981
|
if (!host.fileExists(inputFile)) {
|
|
122982
122982
|
return {
|
|
122983
122983
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
122984
|
-
reason: inputFile
|
|
122984
|
+
reason: "".concat(inputFile, " does not exist")
|
|
122985
122985
|
};
|
|
122986
122986
|
}
|
|
122987
122987
|
if (!force) {
|
|
@@ -123340,7 +123340,7 @@ var ts;
|
|
|
123340
123340
|
}
|
|
123341
123341
|
}
|
|
123342
123342
|
if (filesToDelete) {
|
|
123343
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
123343
|
+
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(""));
|
|
123344
123344
|
}
|
|
123345
123345
|
return ts.ExitStatus.Success;
|
|
123346
123346
|
}
|
|
@@ -123678,7 +123678,7 @@ var ts;
|
|
|
123678
123678
|
function nowString() {
|
|
123679
123679
|
// E.g. "12:34:56.789"
|
|
123680
123680
|
var d = new Date();
|
|
123681
|
-
return ts.padLeft(d.getHours().toString(), 2, "0")
|
|
123681
|
+
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"));
|
|
123682
123682
|
}
|
|
123683
123683
|
server.nowString = nowString;
|
|
123684
123684
|
})(server = ts.server || (ts.server = {}));
|
|
@@ -123689,7 +123689,7 @@ var ts;
|
|
|
123689
123689
|
var JsTyping;
|
|
123690
123690
|
(function (JsTyping) {
|
|
123691
123691
|
function isTypingUpToDate(cachedTyping, availableTypingVersions) {
|
|
123692
|
-
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts"
|
|
123692
|
+
var availableVersion = new ts.Version(ts.getProperty(availableTypingVersions, "ts".concat(ts.versionMajorMinor)) || ts.getProperty(availableTypingVersions, "latest"));
|
|
123693
123693
|
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
|
123694
123694
|
}
|
|
123695
123695
|
JsTyping.isTypingUpToDate = isTypingUpToDate;
|
|
@@ -123742,7 +123742,7 @@ var ts;
|
|
|
123742
123742
|
"worker_threads",
|
|
123743
123743
|
"zlib"
|
|
123744
123744
|
];
|
|
123745
|
-
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:"
|
|
123745
|
+
JsTyping.prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map(function (name) { return "node:".concat(name); });
|
|
123746
123746
|
JsTyping.nodeCoreModuleList = __spreadArray(__spreadArray([], unprefixedNodeCoreModuleList, true), JsTyping.prefixedNodeCoreModuleList, true);
|
|
123747
123747
|
JsTyping.nodeCoreModules = new ts.Set(JsTyping.nodeCoreModuleList);
|
|
123748
123748
|
function nonRelativeModuleNameForTypingCache(moduleName) {
|
|
@@ -123815,7 +123815,7 @@ var ts;
|
|
|
123815
123815
|
var excludeTypingName = exclude_1[_i];
|
|
123816
123816
|
var didDelete = inferredTypings.delete(excludeTypingName);
|
|
123817
123817
|
if (didDelete && log)
|
|
123818
|
-
log("Typing for "
|
|
123818
|
+
log("Typing for ".concat(excludeTypingName, " is in exclude list, will be ignored."));
|
|
123819
123819
|
}
|
|
123820
123820
|
var newTypingNames = [];
|
|
123821
123821
|
var cachedTypingPaths = [];
|
|
@@ -123829,7 +123829,7 @@ var ts;
|
|
|
123829
123829
|
});
|
|
123830
123830
|
var result = { cachedTypingPaths: cachedTypingPaths, newTypingNames: newTypingNames, filesToWatch: filesToWatch };
|
|
123831
123831
|
if (log)
|
|
123832
|
-
log("Result: "
|
|
123832
|
+
log("Result: ".concat(JSON.stringify(result)));
|
|
123833
123833
|
return result;
|
|
123834
123834
|
function addInferredTyping(typingName) {
|
|
123835
123835
|
if (!inferredTypings.has(typingName)) {
|
|
@@ -123838,7 +123838,7 @@ var ts;
|
|
|
123838
123838
|
}
|
|
123839
123839
|
function addInferredTypings(typingNames, message) {
|
|
123840
123840
|
if (log)
|
|
123841
|
-
log(message
|
|
123841
|
+
log("".concat(message, ": ").concat(JSON.stringify(typingNames)));
|
|
123842
123842
|
ts.forEach(typingNames, addInferredTyping);
|
|
123843
123843
|
}
|
|
123844
123844
|
/**
|
|
@@ -123860,7 +123860,7 @@ var ts;
|
|
|
123860
123860
|
filesToWatch.push(manifestPath);
|
|
123861
123861
|
manifest = ts.readConfigFile(manifestPath, function (path) { return host.readFile(path); }).config;
|
|
123862
123862
|
manifestTypingNames = ts.flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], ts.getOwnKeys);
|
|
123863
|
-
addInferredTypings(manifestTypingNames, "Typing names in '"
|
|
123863
|
+
addInferredTypings(manifestTypingNames, "Typing names in '".concat(manifestPath, "' dependencies"));
|
|
123864
123864
|
}
|
|
123865
123865
|
// Now we scan the directories for typing information in
|
|
123866
123866
|
// already-installed dependencies (if present). Note that this
|
|
@@ -123904,7 +123904,7 @@ var ts;
|
|
|
123904
123904
|
!isScoped && pathComponents[pathComponents.length - 3].toLowerCase() === modulesDirName; // `node_modules/foo`
|
|
123905
123905
|
});
|
|
123906
123906
|
if (log)
|
|
123907
|
-
log("Searching for typing names in "
|
|
123907
|
+
log("Searching for typing names in ".concat(packagesFolderPath, "; all files: ").concat(JSON.stringify(dependencyManifestNames)));
|
|
123908
123908
|
// Once we have the names of things to look up, we iterate over
|
|
123909
123909
|
// and either collect their included typings, or add them to the
|
|
123910
123910
|
// list of typings we need to look up separately.
|
|
@@ -123923,12 +123923,12 @@ var ts;
|
|
|
123923
123923
|
var absolutePath = ts.getNormalizedAbsolutePath(ownTypes, ts.getDirectoryPath(normalizedFileName));
|
|
123924
123924
|
if (host.fileExists(absolutePath)) {
|
|
123925
123925
|
if (log)
|
|
123926
|
-
log(" Package '"
|
|
123926
|
+
log(" Package '".concat(manifest_1.name, "' provides its own types."));
|
|
123927
123927
|
inferredTypings.set(manifest_1.name, absolutePath);
|
|
123928
123928
|
}
|
|
123929
123929
|
else {
|
|
123930
123930
|
if (log)
|
|
123931
|
-
log(" Package '"
|
|
123931
|
+
log(" Package '".concat(manifest_1.name, "' provides its own types but they are missing."));
|
|
123932
123932
|
}
|
|
123933
123933
|
}
|
|
123934
123934
|
else {
|
|
@@ -124024,15 +124024,15 @@ var ts;
|
|
|
124024
124024
|
var kind = isScopeName ? "Scope" : "Package";
|
|
124025
124025
|
switch (result) {
|
|
124026
124026
|
case 1 /* EmptyName */:
|
|
124027
|
-
return "'"
|
|
124027
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot be empty");
|
|
124028
124028
|
case 2 /* NameTooLong */:
|
|
124029
|
-
return "'"
|
|
124029
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' should be less than ").concat(maxPackageNameLength, " characters");
|
|
124030
124030
|
case 3 /* NameStartsWithDot */:
|
|
124031
|
-
return "'"
|
|
124031
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '.'");
|
|
124032
124032
|
case 4 /* NameStartsWithUnderscore */:
|
|
124033
|
-
return "'"
|
|
124033
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' cannot start with '_'");
|
|
124034
124034
|
case 5 /* NameContainsNonURISafeCharacters */:
|
|
124035
|
-
return "'"
|
|
124035
|
+
return "'".concat(typing, "':: ").concat(kind, " name '").concat(name, "' contains non URI safe characters");
|
|
124036
124036
|
case 0 /* Ok */:
|
|
124037
124037
|
return ts.Debug.fail(); // Shouldn't have called this.
|
|
124038
124038
|
default:
|
|
@@ -126587,7 +126587,7 @@ var ts;
|
|
|
126587
126587
|
var prefix = ts.isJSDocLink(link) ? "link"
|
|
126588
126588
|
: ts.isJSDocLinkCode(link) ? "linkcode"
|
|
126589
126589
|
: "linkplain";
|
|
126590
|
-
var parts = [linkPart("{@"
|
|
126590
|
+
var parts = [linkPart("{@".concat(prefix, " "))];
|
|
126591
126591
|
if (!link.name) {
|
|
126592
126592
|
if (link.text)
|
|
126593
126593
|
parts.push(linkTextPart(link.text));
|
|
@@ -126835,7 +126835,7 @@ var ts;
|
|
|
126835
126835
|
function getUniqueName(baseName, sourceFile) {
|
|
126836
126836
|
var nameText = baseName;
|
|
126837
126837
|
for (var i = 1; !ts.isFileLevelUniqueName(sourceFile, nameText); i++) {
|
|
126838
|
-
nameText = baseName
|
|
126838
|
+
nameText = "".concat(baseName, "_").concat(i);
|
|
126839
126839
|
}
|
|
126840
126840
|
return nameText;
|
|
126841
126841
|
}
|
|
@@ -126945,7 +126945,7 @@ var ts;
|
|
|
126945
126945
|
// Editors can pass in undefined or empty string - we want to infer the preference in those cases.
|
|
126946
126946
|
var quotePreference = getQuotePreference(sourceFile, preferences);
|
|
126947
126947
|
var quoted = JSON.stringify(text);
|
|
126948
|
-
return quotePreference === 0 /* Single */ ? "'"
|
|
126948
|
+
return quotePreference === 0 /* Single */ ? "'".concat(ts.stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"'), "'") : quoted;
|
|
126949
126949
|
}
|
|
126950
126950
|
ts.quote = quote;
|
|
126951
126951
|
function isEqualityOperatorKind(kind) {
|
|
@@ -127329,7 +127329,7 @@ var ts;
|
|
|
127329
127329
|
var components = ts.getPathComponents(ts.getPackageNameFromTypesPackageName(fullSpecifier)).slice(1);
|
|
127330
127330
|
// Scoped packages
|
|
127331
127331
|
if (ts.startsWith(components[0], "@")) {
|
|
127332
|
-
return components[0]
|
|
127332
|
+
return "".concat(components[0], "/").concat(components[1]);
|
|
127333
127333
|
}
|
|
127334
127334
|
return components[0];
|
|
127335
127335
|
}
|
|
@@ -127456,13 +127456,13 @@ var ts;
|
|
|
127456
127456
|
}
|
|
127457
127457
|
function getSymbolParentOrFail(symbol) {
|
|
127458
127458
|
var _a;
|
|
127459
|
-
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: "
|
|
127460
|
-
|
|
127459
|
+
return ts.Debug.checkDefined(symbol.parent, "Symbol parent was undefined. Flags: ".concat(ts.Debug.formatSymbolFlags(symbol.flags), ". ") +
|
|
127460
|
+
"Declarations: ".concat((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.map(function (d) {
|
|
127461
127461
|
var kind = ts.Debug.formatSyntaxKind(d.kind);
|
|
127462
127462
|
var inJS = ts.isInJSFile(d);
|
|
127463
127463
|
var expression = d.expression;
|
|
127464
|
-
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: "
|
|
127465
|
-
}).join(", ")
|
|
127464
|
+
return (inJS ? "[JS]" : "") + kind + (expression ? " (expression: ".concat(ts.Debug.formatSyntaxKind(expression.kind), ")") : "");
|
|
127465
|
+
}).join(", "), "."));
|
|
127466
127466
|
}
|
|
127467
127467
|
/**
|
|
127468
127468
|
* Useful to check whether a string contains another string at a specific index
|
|
@@ -127723,7 +127723,7 @@ var ts;
|
|
|
127723
127723
|
: checker.tryFindAmbientModule(info.moduleName));
|
|
127724
127724
|
var symbol = info.symbol || cachedSymbol || ts.Debug.checkDefined(exportKind === 2 /* ExportEquals */
|
|
127725
127725
|
? checker.resolveExternalModuleSymbol(moduleSymbol)
|
|
127726
|
-
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '"
|
|
127726
|
+
: checker.tryGetMemberInModuleExportsAndProperties(ts.unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), "Could not find symbol '".concat(info.symbolName, "' by key '").concat(info.symbolTableKey, "' in module ").concat(moduleSymbol.name));
|
|
127727
127727
|
symbols.set(id, [symbol, moduleSymbol]);
|
|
127728
127728
|
return {
|
|
127729
127729
|
symbol: symbol,
|
|
@@ -127736,7 +127736,7 @@ var ts;
|
|
|
127736
127736
|
}
|
|
127737
127737
|
function key(importedName, symbol, ambientModuleName, checker) {
|
|
127738
127738
|
var moduleKey = ambientModuleName || "";
|
|
127739
|
-
return importedName
|
|
127739
|
+
return "".concat(importedName, "|").concat(ts.getSymbolId(ts.skipAlias(symbol, checker)), "|").concat(moduleKey);
|
|
127740
127740
|
}
|
|
127741
127741
|
function parseKey(key) {
|
|
127742
127742
|
var symbolName = key.substring(0, key.indexOf("|"));
|
|
@@ -127822,7 +127822,7 @@ var ts;
|
|
|
127822
127822
|
if (autoImportProvider) {
|
|
127823
127823
|
var start = ts.timestamp();
|
|
127824
127824
|
forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), function (module, file) { return cb(module, file, autoImportProvider, /*isFromPackageJson*/ true); });
|
|
127825
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: "
|
|
127825
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "forEachExternalModuleToImportFrom autoImportProvider: ".concat(ts.timestamp() - start));
|
|
127826
127826
|
}
|
|
127827
127827
|
}
|
|
127828
127828
|
ts.forEachExternalModuleToImportFrom = forEachExternalModuleToImportFrom;
|
|
@@ -127875,7 +127875,7 @@ var ts;
|
|
|
127875
127875
|
}
|
|
127876
127876
|
});
|
|
127877
127877
|
});
|
|
127878
|
-
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in "
|
|
127878
|
+
(_e = host.log) === null || _e === void 0 ? void 0 : _e.call(host, "getExportInfoMap: done in ".concat(ts.timestamp() - start, " ms"));
|
|
127879
127879
|
return cache;
|
|
127880
127880
|
}
|
|
127881
127881
|
ts.getExportInfoMap = getExportInfoMap;
|
|
@@ -128408,7 +128408,7 @@ var ts;
|
|
|
128408
128408
|
return { spans: spans, endOfLineState: 0 /* None */ };
|
|
128409
128409
|
function pushClassification(start, end, type) {
|
|
128410
128410
|
var length = end - start;
|
|
128411
|
-
ts.Debug.assert(length > 0, "Classification had non-positive length of "
|
|
128411
|
+
ts.Debug.assert(length > 0, "Classification had non-positive length of ".concat(length));
|
|
128412
128412
|
spans.push(start);
|
|
128413
128413
|
spans.push(length);
|
|
128414
128414
|
spans.push(type);
|
|
@@ -129280,7 +129280,7 @@ var ts;
|
|
|
129280
129280
|
case ".d.cts" /* Dcts */: return ".d.cts" /* dctsModifier */;
|
|
129281
129281
|
case ".cjs" /* Cjs */: return ".cjs" /* cjsModifier */;
|
|
129282
129282
|
case ".cts" /* Cts */: return ".cts" /* ctsModifier */;
|
|
129283
|
-
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension "
|
|
129283
|
+
case ".tsbuildinfo" /* TsBuildInfo */: return ts.Debug.fail("Extension ".concat(".tsbuildinfo" /* TsBuildInfo */, " is unsupported."));
|
|
129284
129284
|
case undefined: return "" /* none */;
|
|
129285
129285
|
default:
|
|
129286
129286
|
return ts.Debug.assertNever(extension);
|
|
@@ -130016,10 +130016,10 @@ var ts;
|
|
|
130016
130016
|
var resolvedFromCacheCount = 0;
|
|
130017
130017
|
var cacheAttemptCount = 0;
|
|
130018
130018
|
var result = cb({ tryResolve: tryResolve, resolutionLimitExceeded: function () { return resolutionLimitExceeded; } });
|
|
130019
|
-
var hitRateMessage = cacheAttemptCount ? " ("
|
|
130020
|
-
(_a = host.log) === null || _a === void 0 ? void 0 : _a.call(host, logPrefix
|
|
130021
|
-
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, logPrefix
|
|
130022
|
-
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, logPrefix
|
|
130019
|
+
var hitRateMessage = cacheAttemptCount ? " (".concat((resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1), "% hit rate)") : "";
|
|
130020
|
+
(_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));
|
|
130021
|
+
(_b = host.log) === null || _b === void 0 ? void 0 : _b.call(host, "".concat(logPrefix, ": response is ").concat(resolutionLimitExceeded ? "incomplete" : "complete"));
|
|
130022
|
+
(_c = host.log) === null || _c === void 0 ? void 0 : _c.call(host, "".concat(logPrefix, ": ").concat(ts.timestamp() - start));
|
|
130023
130023
|
return result;
|
|
130024
130024
|
function tryResolve(exportInfo, isFromAmbientModule) {
|
|
130025
130025
|
if (isFromAmbientModule) {
|
|
@@ -130352,15 +130352,15 @@ var ts;
|
|
|
130352
130352
|
var useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess;
|
|
130353
130353
|
if (origin && originIsThisType(origin)) {
|
|
130354
130354
|
insertText = needsConvertPropertyAccess
|
|
130355
|
-
? "this"
|
|
130356
|
-
: "this"
|
|
130355
|
+
? "this".concat(insertQuestionDot ? "?." : "", "[").concat(quotePropertyName(sourceFile, preferences, name), "]")
|
|
130356
|
+
: "this".concat(insertQuestionDot ? "?." : ".").concat(name);
|
|
130357
130357
|
}
|
|
130358
130358
|
// We should only have needsConvertPropertyAccess if there's a property access to convert. But see #21790.
|
|
130359
130359
|
// 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.
|
|
130360
130360
|
else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) {
|
|
130361
|
-
insertText = useBraces ? needsConvertPropertyAccess ? "["
|
|
130361
|
+
insertText = useBraces ? needsConvertPropertyAccess ? "[".concat(quotePropertyName(sourceFile, preferences, name), "]") : "[".concat(name, "]") : name;
|
|
130362
130362
|
if (insertQuestionDot || propertyAccessToConvert.questionDotToken) {
|
|
130363
|
-
insertText = "?."
|
|
130363
|
+
insertText = "?.".concat(insertText);
|
|
130364
130364
|
}
|
|
130365
130365
|
var dot = ts.findChildOfKind(propertyAccessToConvert, 24 /* DotToken */, sourceFile) ||
|
|
130366
130366
|
ts.findChildOfKind(propertyAccessToConvert, 28 /* QuestionDotToken */, sourceFile);
|
|
@@ -130374,7 +130374,7 @@ var ts;
|
|
|
130374
130374
|
if (isJsxInitializer) {
|
|
130375
130375
|
if (insertText === undefined)
|
|
130376
130376
|
insertText = name;
|
|
130377
|
-
insertText = "{"
|
|
130377
|
+
insertText = "{".concat(insertText, "}");
|
|
130378
130378
|
if (typeof isJsxInitializer !== "boolean") {
|
|
130379
130379
|
replacementSpan = ts.createTextSpanFromNode(isJsxInitializer, sourceFile);
|
|
130380
130380
|
}
|
|
@@ -130387,8 +130387,8 @@ var ts;
|
|
|
130387
130387
|
if (precedingToken && ts.positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) {
|
|
130388
130388
|
awaitText = ";";
|
|
130389
130389
|
}
|
|
130390
|
-
awaitText += "(await "
|
|
130391
|
-
insertText = needsConvertPropertyAccess ? ""
|
|
130390
|
+
awaitText += "(await ".concat(propertyAccessToConvert.expression.getText(), ")");
|
|
130391
|
+
insertText = needsConvertPropertyAccess ? "".concat(awaitText).concat(insertText) : "".concat(awaitText).concat(insertQuestionDot ? "?." : ".").concat(insertText);
|
|
130392
130392
|
replacementSpan = ts.createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
|
|
130393
130393
|
}
|
|
130394
130394
|
if (originIsResolvedExport(origin)) {
|
|
@@ -130421,7 +130421,7 @@ var ts;
|
|
|
130421
130421
|
&& !(type.flags & 1048576 /* Union */ && ts.find(type.types, function (type) { return !!(type.flags & 528 /* BooleanLike */); }))) {
|
|
130422
130422
|
if (type.flags & 402653316 /* StringLike */ || (type.flags & 1048576 /* Union */ && ts.every(type.types, function (type) { return !!(type.flags & (402653316 /* StringLike */ | 32768 /* Undefined */)); }))) {
|
|
130423
130423
|
// If is string like or undefined use quotes
|
|
130424
|
-
insertText = ts.escapeSnippetText(name)
|
|
130424
|
+
insertText = "".concat(ts.escapeSnippetText(name), "=").concat(ts.quote(sourceFile, preferences, "$1"));
|
|
130425
130425
|
isSnippet = true;
|
|
130426
130426
|
}
|
|
130427
130427
|
else {
|
|
@@ -130430,7 +130430,7 @@ var ts;
|
|
|
130430
130430
|
}
|
|
130431
130431
|
}
|
|
130432
130432
|
if (useBraces_1) {
|
|
130433
|
-
insertText = ts.escapeSnippetText(name)
|
|
130433
|
+
insertText = "".concat(ts.escapeSnippetText(name), "={$1}");
|
|
130434
130434
|
isSnippet = true;
|
|
130435
130435
|
}
|
|
130436
130436
|
}
|
|
@@ -130715,14 +130715,14 @@ var ts;
|
|
|
130715
130715
|
var importKind = ts.codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true);
|
|
130716
130716
|
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);
|
|
130717
130717
|
var isImportSpecifierTypeOnly = couldBeTypeOnlyImportSpecifier(importCompletionNode, contextToken);
|
|
130718
|
-
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " "
|
|
130719
|
-
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? ts.tokenToString(151 /* TypeKeyword */)
|
|
130718
|
+
var topLevelTypeOnlyText = isTopLevelTypeOnly ? " ".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : " ";
|
|
130719
|
+
var importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? "".concat(ts.tokenToString(151 /* TypeKeyword */), " ") : "";
|
|
130720
130720
|
var suffix = useSemicolons ? ";" : "";
|
|
130721
130721
|
switch (importKind) {
|
|
130722
|
-
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130723
|
-
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130724
|
-
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130725
|
-
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import"
|
|
130722
|
+
case 3 /* CommonJS */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " = require(").concat(quotedModuleSpecifier, ")").concat(suffix) };
|
|
130723
|
+
case 1 /* Default */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130724
|
+
case 2 /* Namespace */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "* as ").concat(ts.escapeSnippetText(name), " from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130725
|
+
case 0 /* Named */: return { replacementSpan: replacementSpan, insertText: "import".concat(topLevelTypeOnlyText, "{ ").concat(importSpecifierTypeOnlyText).concat(ts.escapeSnippetText(name)).concat(tabStop, " } from ").concat(quotedModuleSpecifier).concat(suffix) };
|
|
130726
130726
|
}
|
|
130727
130727
|
}
|
|
130728
130728
|
function quotePropertyName(sourceFile, preferences, name) {
|
|
@@ -133684,7 +133684,7 @@ var ts;
|
|
|
133684
133684
|
}
|
|
133685
133685
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
133686
133686
|
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"));
|
|
133687
|
-
ts.Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:"
|
|
133687
|
+
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));
|
|
133688
133688
|
return entry;
|
|
133689
133689
|
}
|
|
133690
133690
|
function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
@@ -134713,7 +134713,7 @@ var ts;
|
|
|
134713
134713
|
sourceFile: def.file,
|
|
134714
134714
|
name: def.reference.fileName,
|
|
134715
134715
|
kind: "string" /* string */,
|
|
134716
|
-
displayParts: [ts.displayPart("\""
|
|
134716
|
+
displayParts: [ts.displayPart("\"".concat(def.reference.fileName, "\""), ts.SymbolDisplayPartKind.stringLiteral)]
|
|
134717
134717
|
};
|
|
134718
134718
|
}
|
|
134719
134719
|
default:
|
|
@@ -135293,7 +135293,7 @@ var ts;
|
|
|
135293
135293
|
if (symbol.flags & 33554432 /* Transient */)
|
|
135294
135294
|
return undefined;
|
|
135295
135295
|
// Assertions for GH#21814. We should be handling SourceFile symbols in `getReferencedSymbolsForModule` instead of getting here.
|
|
135296
|
-
ts.Debug.fail("Unexpected symbol at "
|
|
135296
|
+
ts.Debug.fail("Unexpected symbol at ".concat(ts.Debug.formatSyntaxKind(node.kind), ": ").concat(ts.Debug.formatSymbol(symbol)));
|
|
135297
135297
|
}
|
|
135298
135298
|
return ts.isTypeLiteralNode(decl.parent) && ts.isUnionTypeNode(decl.parent.parent)
|
|
135299
135299
|
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
|
|
@@ -136578,8 +136578,8 @@ var ts;
|
|
|
136578
136578
|
var end = pos + 6; /* "static".length */
|
|
136579
136579
|
var typeChecker = program.getTypeChecker();
|
|
136580
136580
|
var symbol = typeChecker.getSymbolAtLocation(node.parent);
|
|
136581
|
-
var prefix = symbol ? typeChecker.symbolToString(symbol, node.parent)
|
|
136582
|
-
return { text: prefix
|
|
136581
|
+
var prefix = symbol ? "".concat(typeChecker.symbolToString(symbol, node.parent), " ") : "";
|
|
136582
|
+
return { text: "".concat(prefix, "static {}"), pos: pos, end: end };
|
|
136583
136583
|
}
|
|
136584
136584
|
var declName = isConstNamedExpression(node) ? node.parent.name :
|
|
136585
136585
|
ts.Debug.checkDefined(ts.getNameOfDeclaration(node), "Expected call hierarchy item to have a name");
|
|
@@ -137863,7 +137863,7 @@ var ts;
|
|
|
137863
137863
|
function getJSDocTagCompletions() {
|
|
137864
137864
|
return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = ts.map(jsDocTagNames, function (tagName) {
|
|
137865
137865
|
return {
|
|
137866
|
-
name: "@"
|
|
137866
|
+
name: "@".concat(tagName),
|
|
137867
137867
|
kind: "keyword" /* keyword */,
|
|
137868
137868
|
kindModifiers: "",
|
|
137869
137869
|
sortText: ts.Completions.SortText.LocationPriority
|
|
@@ -137995,11 +137995,11 @@ var ts;
|
|
|
137995
137995
|
var name = _a.name, dotDotDotToken = _a.dotDotDotToken;
|
|
137996
137996
|
var paramName = name.kind === 79 /* Identifier */ ? name.text : "param" + i;
|
|
137997
137997
|
var type = isJavaScriptFile ? (dotDotDotToken ? "{...any} " : "{any} ") : "";
|
|
137998
|
-
return indentationStr
|
|
137998
|
+
return "".concat(indentationStr, " * @param ").concat(type).concat(paramName).concat(newLine);
|
|
137999
137999
|
}).join("");
|
|
138000
138000
|
}
|
|
138001
138001
|
function returnsDocComment(indentationStr, newLine) {
|
|
138002
|
-
return indentationStr
|
|
138002
|
+
return "".concat(indentationStr, " * @returns").concat(newLine);
|
|
138003
138003
|
}
|
|
138004
138004
|
function getCommentOwnerInfo(tokenAtPos, options) {
|
|
138005
138005
|
return ts.forEachAncestor(tokenAtPos, function (n) { return getCommentOwnerInfoWorker(n, options); });
|
|
@@ -138842,7 +138842,7 @@ var ts;
|
|
|
138842
138842
|
}
|
|
138843
138843
|
if (name) {
|
|
138844
138844
|
var text = ts.isIdentifier(name) ? name.text
|
|
138845
|
-
: ts.isElementAccessExpression(name) ? "["
|
|
138845
|
+
: ts.isElementAccessExpression(name) ? "[".concat(nodeText(name.argumentExpression), "]")
|
|
138846
138846
|
: nodeText(name);
|
|
138847
138847
|
if (text.length > 0) {
|
|
138848
138848
|
return cleanText(text);
|
|
@@ -138852,7 +138852,7 @@ var ts;
|
|
|
138852
138852
|
case 303 /* SourceFile */:
|
|
138853
138853
|
var sourceFile = node;
|
|
138854
138854
|
return ts.isExternalModule(sourceFile)
|
|
138855
|
-
? "\""
|
|
138855
|
+
? "\"".concat(ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))), "\"")
|
|
138856
138856
|
: "<global>";
|
|
138857
138857
|
case 270 /* ExportAssignment */:
|
|
138858
138858
|
return ts.isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */;
|
|
@@ -139048,10 +139048,10 @@ var ts;
|
|
|
139048
139048
|
if (name !== undefined) {
|
|
139049
139049
|
name = cleanText(name);
|
|
139050
139050
|
if (name.length > maxLength) {
|
|
139051
|
-
return name
|
|
139051
|
+
return "".concat(name, " callback");
|
|
139052
139052
|
}
|
|
139053
139053
|
var args = cleanText(ts.mapDefined(parent.arguments, function (a) { return ts.isStringLiteralLike(a) ? a.getText(curSourceFile) : undefined; }).join(", "));
|
|
139054
|
-
return name
|
|
139054
|
+
return "".concat(name, "(").concat(args, ") callback");
|
|
139055
139055
|
}
|
|
139056
139056
|
}
|
|
139057
139057
|
return "<function>";
|
|
@@ -139064,7 +139064,7 @@ var ts;
|
|
|
139064
139064
|
else if (ts.isPropertyAccessExpression(expr)) {
|
|
139065
139065
|
var left = getCalledExpressionName(expr.expression);
|
|
139066
139066
|
var right = expr.name.text;
|
|
139067
|
-
return left === undefined ? right : left
|
|
139067
|
+
return left === undefined ? right : "".concat(left, ".").concat(right);
|
|
139068
139068
|
}
|
|
139069
139069
|
else {
|
|
139070
139070
|
return undefined;
|
|
@@ -141511,7 +141511,7 @@ var ts;
|
|
|
141511
141511
|
var _loop_9 = function (n) {
|
|
141512
141512
|
// If the node is not a subspan of its parent, this is a big problem.
|
|
141513
141513
|
// There have been crashes that might be caused by this violation.
|
|
141514
|
-
ts.Debug.assert(ts.rangeContainsRange(n.parent, n), "Not a subspan", function () { return "Child: "
|
|
141514
|
+
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)); });
|
|
141515
141515
|
var argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker);
|
|
141516
141516
|
if (argumentInfo) {
|
|
141517
141517
|
return { value: argumentInfo };
|
|
@@ -141683,7 +141683,7 @@ var ts;
|
|
|
141683
141683
|
(function (InlayHints) {
|
|
141684
141684
|
var maxHintsLength = 30;
|
|
141685
141685
|
var leadingParameterNameCommentRegexFactory = function (name) {
|
|
141686
|
-
return new RegExp("^\\s?/\\*\\*?\\s?"
|
|
141686
|
+
return new RegExp("^\\s?/\\*\\*?\\s?".concat(name, "\\s?\\*\\/\\s?$"));
|
|
141687
141687
|
};
|
|
141688
141688
|
function shouldShowParameterNameHints(preferences) {
|
|
141689
141689
|
return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all";
|
|
@@ -141747,7 +141747,7 @@ var ts;
|
|
|
141747
141747
|
}
|
|
141748
141748
|
function addParameterHints(text, position, isFirstVariadicArgument) {
|
|
141749
141749
|
result.push({
|
|
141750
|
-
text: ""
|
|
141750
|
+
text: "".concat(isFirstVariadicArgument ? "..." : "").concat(truncation(text, maxHintsLength), ":"),
|
|
141751
141751
|
position: position,
|
|
141752
141752
|
kind: "Parameter" /* Parameter */,
|
|
141753
141753
|
whitespaceAfter: true,
|
|
@@ -141755,7 +141755,7 @@ var ts;
|
|
|
141755
141755
|
}
|
|
141756
141756
|
function addTypeHints(text, position) {
|
|
141757
141757
|
result.push({
|
|
141758
|
-
text: ": "
|
|
141758
|
+
text: ": ".concat(truncation(text, maxHintsLength)),
|
|
141759
141759
|
position: position,
|
|
141760
141760
|
kind: "Type" /* Type */,
|
|
141761
141761
|
whitespaceBefore: true,
|
|
@@ -141763,7 +141763,7 @@ var ts;
|
|
|
141763
141763
|
}
|
|
141764
141764
|
function addEnumMemberValueHints(text, position) {
|
|
141765
141765
|
result.push({
|
|
141766
|
-
text: "= "
|
|
141766
|
+
text: "= ".concat(truncation(text, maxHintsLength)),
|
|
141767
141767
|
position: position,
|
|
141768
141768
|
kind: "Enum" /* Enum */,
|
|
141769
141769
|
whitespaceBefore: true,
|
|
@@ -142298,7 +142298,7 @@ var ts;
|
|
|
142298
142298
|
}
|
|
142299
142299
|
}
|
|
142300
142300
|
function getKeyFromNode(exp) {
|
|
142301
|
-
return exp.pos.toString()
|
|
142301
|
+
return "".concat(exp.pos.toString(), ":").concat(exp.end.toString());
|
|
142302
142302
|
}
|
|
142303
142303
|
function canBeConvertedToClass(node, checker) {
|
|
142304
142304
|
var _a, _b, _c, _d;
|
|
@@ -146447,7 +146447,7 @@ var ts;
|
|
|
146447
146447
|
var insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition);
|
|
146448
146448
|
var token = ts.getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position);
|
|
146449
146449
|
var indent = sourceFile.text.slice(lineStartPosition, startPosition);
|
|
146450
|
-
var text = (insertAtLineStart ? "" : this.newLineCharacter
|
|
146450
|
+
var text = "".concat(insertAtLineStart ? "" : this.newLineCharacter, "//").concat(commentText).concat(this.newLineCharacter).concat(indent);
|
|
146451
146451
|
this.insertText(sourceFile, token.getStart(sourceFile), text);
|
|
146452
146452
|
};
|
|
146453
146453
|
ChangeTracker.prototype.insertJsdocCommentBefore = function (sourceFile, node, tag) {
|
|
@@ -146671,7 +146671,7 @@ var ts;
|
|
|
146671
146671
|
};
|
|
146672
146672
|
ChangeTracker.prototype.getInsertNodeAfterOptions = function (sourceFile, after) {
|
|
146673
146673
|
var options = this.getInsertNodeAfterOptionsWorker(after);
|
|
146674
|
-
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n"
|
|
146674
|
+
return __assign(__assign({}, options), { prefix: after.end === sourceFile.end && ts.isStatement(after) ? (options.prefix ? "\n".concat(options.prefix) : "\n") : options.prefix });
|
|
146675
146675
|
};
|
|
146676
146676
|
ChangeTracker.prototype.getInsertNodeAfterOptionsWorker = function (node) {
|
|
146677
146677
|
switch (node.kind) {
|
|
@@ -146705,7 +146705,7 @@ var ts;
|
|
|
146705
146705
|
}
|
|
146706
146706
|
else {
|
|
146707
146707
|
// `x => {}` -> `function f(x) {}`
|
|
146708
|
-
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function "
|
|
146708
|
+
this.insertText(sourceFile, ts.first(node.parameters).getStart(sourceFile), "function ".concat(name, "("));
|
|
146709
146709
|
// Replacing full range of arrow to get rid of the leading space -- replace ` =>` with `)`
|
|
146710
146710
|
this.replaceRange(sourceFile, arrow, ts.factory.createToken(21 /* CloseParenToken */));
|
|
146711
146711
|
}
|
|
@@ -146771,7 +146771,7 @@ var ts;
|
|
|
146771
146771
|
var nextNode = containingList[index + 1];
|
|
146772
146772
|
var startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart());
|
|
146773
146773
|
// write separator and leading trivia of the next element as suffix
|
|
146774
|
-
var suffix = ""
|
|
146774
|
+
var suffix = "".concat(ts.tokenToString(nextToken.kind)).concat(sourceFile.text.substring(nextToken.end, startPos));
|
|
146775
146775
|
this.insertNodesAt(sourceFile, startPos, [newNode], { suffix: suffix });
|
|
146776
146776
|
}
|
|
146777
146777
|
}
|
|
@@ -146816,7 +146816,7 @@ var ts;
|
|
|
146816
146816
|
this.replaceRange(sourceFile, ts.createRange(insertPos), newNode, { indentation: indentation, prefix: this.newLineCharacter });
|
|
146817
146817
|
}
|
|
146818
146818
|
else {
|
|
146819
|
-
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: ts.tokenToString(separator)
|
|
146819
|
+
this.replaceRange(sourceFile, ts.createRange(end), newNode, { prefix: "".concat(ts.tokenToString(separator), " ") });
|
|
146820
146820
|
}
|
|
146821
146821
|
}
|
|
146822
146822
|
};
|
|
@@ -146947,7 +146947,7 @@ var ts;
|
|
|
146947
146947
|
var normalized = ts.stableSort(changesInFile, function (a, b) { return (a.range.pos - b.range.pos) || (a.range.end - b.range.end); });
|
|
146948
146948
|
var _loop_12 = function (i) {
|
|
146949
146949
|
ts.Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", function () {
|
|
146950
|
-
return JSON.stringify(normalized[i].range)
|
|
146950
|
+
return "".concat(JSON.stringify(normalized[i].range), " and ").concat(JSON.stringify(normalized[i + 1].range));
|
|
146951
146951
|
});
|
|
146952
146952
|
};
|
|
146953
146953
|
// verify that change intervals do not overlap, except possibly at end points.
|
|
@@ -147038,7 +147038,7 @@ var ts;
|
|
|
147038
147038
|
function applyChanges(text, changes) {
|
|
147039
147039
|
for (var i = changes.length - 1; i >= 0; i--) {
|
|
147040
147040
|
var _a = changes[i], span = _a.span, newText = _a.newText;
|
|
147041
|
-
text = ""
|
|
147041
|
+
text = "".concat(text.substring(0, span.start)).concat(newText).concat(text.substring(ts.textSpanEnd(span)));
|
|
147042
147042
|
}
|
|
147043
147043
|
return text;
|
|
147044
147044
|
}
|
|
@@ -149523,7 +149523,7 @@ var ts;
|
|
|
149523
149523
|
if (!res.has(text) && (originalKeywordKind !== undefined && ts.isNonContextualKeyword(originalKeywordKind)
|
|
149524
149524
|
|| checker.resolveName(text, node, 111551 /* Value */, /*excludeGlobals*/ true))) {
|
|
149525
149525
|
// Unconditionally add an underscore in case `text` is a keyword.
|
|
149526
|
-
res.set(text, makeUniqueName("_"
|
|
149526
|
+
res.set(text, makeUniqueName("_".concat(text), identifiers));
|
|
149527
149527
|
}
|
|
149528
149528
|
});
|
|
149529
149529
|
return res;
|
|
@@ -149623,7 +149623,7 @@ var ts;
|
|
|
149623
149623
|
// `const a = require("b").c` --> `import { c as a } from "./b";
|
|
149624
149624
|
return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]);
|
|
149625
149625
|
default:
|
|
149626
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form "
|
|
149626
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid syntax form ".concat(name.kind));
|
|
149627
149627
|
}
|
|
149628
149628
|
}
|
|
149629
149629
|
function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) {
|
|
@@ -149674,7 +149674,7 @@ var ts;
|
|
|
149674
149674
|
case 168 /* MethodDeclaration */:
|
|
149675
149675
|
return !ts.isIdentifier(prop.name) ? undefined : functionExpressionToDeclaration(prop.name.text, [ts.factory.createToken(93 /* ExportKeyword */)], prop, useSitesToUnqualify);
|
|
149676
149676
|
default:
|
|
149677
|
-
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind "
|
|
149677
|
+
ts.Debug.assertNever(prop, "Convert to ES6 got invalid prop kind ".concat(prop.kind));
|
|
149678
149678
|
}
|
|
149679
149679
|
});
|
|
149680
149680
|
return statements && [statements, false];
|
|
@@ -149806,7 +149806,7 @@ var ts;
|
|
|
149806
149806
|
case 79 /* Identifier */:
|
|
149807
149807
|
return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference);
|
|
149808
149808
|
default:
|
|
149809
|
-
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind "
|
|
149809
|
+
return ts.Debug.assertNever(name, "Convert to ES module got invalid name kind ".concat(name.kind));
|
|
149810
149810
|
}
|
|
149811
149811
|
}
|
|
149812
149812
|
/**
|
|
@@ -149863,7 +149863,7 @@ var ts;
|
|
|
149863
149863
|
// Identifiers helpers
|
|
149864
149864
|
function makeUniqueName(name, identifiers) {
|
|
149865
149865
|
while (identifiers.original.has(name) || identifiers.additional.has(name)) {
|
|
149866
|
-
name = "_"
|
|
149866
|
+
name = "_".concat(name);
|
|
149867
149867
|
}
|
|
149868
149868
|
identifiers.additional.add(name);
|
|
149869
149869
|
return name;
|
|
@@ -149943,7 +149943,7 @@ var ts;
|
|
|
149943
149943
|
if (!qualifiedName)
|
|
149944
149944
|
return undefined;
|
|
149945
149945
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, context.sourceFile, qualifiedName); });
|
|
149946
|
-
var newText = qualifiedName.left.text
|
|
149946
|
+
var newText = "".concat(qualifiedName.left.text, "[\"").concat(qualifiedName.right.text, "\"]");
|
|
149947
149947
|
return [codefix.createCodeFixAction(fixId, changes, [ts.Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId, ts.Diagnostics.Rewrite_all_as_indexed_access_types)];
|
|
149948
149948
|
},
|
|
149949
149949
|
fixIds: [fixId],
|
|
@@ -150345,7 +150345,7 @@ var ts;
|
|
|
150345
150345
|
// Excluding from fix-all
|
|
150346
150346
|
break;
|
|
150347
150347
|
default:
|
|
150348
|
-
ts.Debug.assertNever(fix, "fix wasn't never - got kind "
|
|
150348
|
+
ts.Debug.assertNever(fix, "fix wasn't never - got kind ".concat(fix.kind));
|
|
150349
150349
|
}
|
|
150350
150350
|
function reduceAddAsTypeOnlyValues(prevValue, newValue) {
|
|
150351
150351
|
// `NotAllowed` overrides `Required` because one addition of a new import might be required to be type-only
|
|
@@ -150389,7 +150389,7 @@ var ts;
|
|
|
150389
150389
|
return newEntry;
|
|
150390
150390
|
}
|
|
150391
150391
|
function newImportsKey(moduleSpecifier, topLevelTypeOnly) {
|
|
150392
|
-
return (topLevelTypeOnly ? 1 : 0
|
|
150392
|
+
return "".concat(topLevelTypeOnly ? 1 : 0, "|").concat(moduleSpecifier);
|
|
150393
150393
|
}
|
|
150394
150394
|
}
|
|
150395
150395
|
function writeFixes(changeTracker) {
|
|
@@ -150887,7 +150887,7 @@ var ts;
|
|
|
150887
150887
|
case ts.ModuleKind.NodeNext:
|
|
150888
150888
|
return importingFile.impliedNodeFormat === ts.ModuleKind.ESNext ? 2 /* Namespace */ : 3 /* CommonJS */;
|
|
150889
150889
|
default:
|
|
150890
|
-
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind "
|
|
150890
|
+
return ts.Debug.assertNever(moduleKind, "Unexpected moduleKind ".concat(moduleKind));
|
|
150891
150891
|
}
|
|
150892
150892
|
}
|
|
150893
150893
|
function getFixesInfoForNonUMDImport(_a, symbolToken, useAutoImportProvider) {
|
|
@@ -151010,7 +151010,7 @@ var ts;
|
|
|
151010
151010
|
switch (fix.kind) {
|
|
151011
151011
|
case 0 /* UseNamespace */:
|
|
151012
151012
|
addNamespaceQualifier(changes, sourceFile, fix);
|
|
151013
|
-
return [ts.Diagnostics.Change_0_to_1, symbolName, fix.namespacePrefix
|
|
151013
|
+
return [ts.Diagnostics.Change_0_to_1, symbolName, "".concat(fix.namespacePrefix, ".").concat(symbolName)];
|
|
151014
151014
|
case 1 /* JsdocTypeImport */:
|
|
151015
151015
|
addImportType(changes, sourceFile, fix, quotePreference);
|
|
151016
151016
|
return [ts.Diagnostics.Change_0_to_1, symbolName, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName];
|
|
@@ -151041,7 +151041,7 @@ var ts;
|
|
|
151041
151041
|
: [ts.Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)];
|
|
151042
151042
|
}
|
|
151043
151043
|
default:
|
|
151044
|
-
return ts.Debug.assertNever(fix, "Unexpected fix kind "
|
|
151044
|
+
return ts.Debug.assertNever(fix, "Unexpected fix kind ".concat(fix.kind));
|
|
151045
151045
|
}
|
|
151046
151046
|
}
|
|
151047
151047
|
function getModuleSpecifierText(promotedDeclaration) {
|
|
@@ -151194,7 +151194,7 @@ var ts;
|
|
|
151194
151194
|
}
|
|
151195
151195
|
function getImportTypePrefix(moduleSpecifier, quotePreference) {
|
|
151196
151196
|
var quote = ts.getQuoteFromPreference(quotePreference);
|
|
151197
|
-
return "import("
|
|
151197
|
+
return "import(".concat(quote).concat(moduleSpecifier).concat(quote, ").");
|
|
151198
151198
|
}
|
|
151199
151199
|
function needsTypeOnly(_a) {
|
|
151200
151200
|
var addAsTypeOnly = _a.addAsTypeOnly;
|
|
@@ -151290,7 +151290,7 @@ var ts;
|
|
|
151290
151290
|
lastCharWasValid = isValid;
|
|
151291
151291
|
}
|
|
151292
151292
|
// Need `|| "_"` to ensure result isn't empty.
|
|
151293
|
-
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_"
|
|
151293
|
+
return !ts.isStringANonContextualKeyword(res) ? res || "_" : "_".concat(res);
|
|
151294
151294
|
}
|
|
151295
151295
|
codefix.moduleSpecifierToValidIdentifier = moduleSpecifierToValidIdentifier;
|
|
151296
151296
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -152546,7 +152546,7 @@ var ts;
|
|
|
152546
152546
|
break;
|
|
152547
152547
|
}
|
|
152548
152548
|
default:
|
|
152549
|
-
ts.Debug.fail("Bad fixId: "
|
|
152549
|
+
ts.Debug.fail("Bad fixId: ".concat(context.fixId));
|
|
152550
152550
|
}
|
|
152551
152551
|
});
|
|
152552
152552
|
},
|
|
@@ -152994,7 +152994,7 @@ var ts;
|
|
|
152994
152994
|
if (!isValidCharacter(character)) {
|
|
152995
152995
|
return;
|
|
152996
152996
|
}
|
|
152997
|
-
var replacement = useHtmlEntity ? htmlEntity[character] : "{"
|
|
152997
|
+
var replacement = useHtmlEntity ? htmlEntity[character] : "{".concat(ts.quote(sourceFile, preferences, character), "}");
|
|
152998
152998
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
152999
152999
|
}
|
|
153000
153000
|
})(codefix = ts.codefix || (ts.codefix = {}));
|
|
@@ -153274,11 +153274,11 @@ var ts;
|
|
|
153274
153274
|
token = ts.cast(token.parent, ts.isInferTypeNode).typeParameter.name;
|
|
153275
153275
|
}
|
|
153276
153276
|
if (ts.isIdentifier(token) && canPrefix(token)) {
|
|
153277
|
-
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_"
|
|
153277
|
+
changes.replaceNode(sourceFile, token, ts.factory.createIdentifier("_".concat(token.text)));
|
|
153278
153278
|
if (ts.isParameter(token.parent)) {
|
|
153279
153279
|
ts.getJSDocParameterTags(token.parent).forEach(function (tag) {
|
|
153280
153280
|
if (ts.isIdentifier(tag.name)) {
|
|
153281
|
-
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_"
|
|
153281
|
+
changes.replaceNode(sourceFile, tag.name, ts.factory.createIdentifier("_".concat(tag.name.text)));
|
|
153282
153282
|
}
|
|
153283
153283
|
});
|
|
153284
153284
|
}
|
|
@@ -153620,7 +153620,7 @@ var ts;
|
|
|
153620
153620
|
}); }
|
|
153621
153621
|
});
|
|
153622
153622
|
function doChange(changes, sourceFile, name) {
|
|
153623
|
-
changes.replaceNodeWithText(sourceFile, name, name.text
|
|
153623
|
+
changes.replaceNodeWithText(sourceFile, name, "".concat(name.text, "()"));
|
|
153624
153624
|
}
|
|
153625
153625
|
function getCallName(sourceFile, start) {
|
|
153626
153626
|
var token = ts.getTokenAtPosition(sourceFile, start);
|
|
@@ -154744,7 +154744,7 @@ var ts;
|
|
|
154744
154744
|
var parameters = [];
|
|
154745
154745
|
var length = Math.max.apply(Math, calls.map(function (c) { return c.argumentTypes.length; }));
|
|
154746
154746
|
var _loop_16 = function (i) {
|
|
154747
|
-
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg"
|
|
154747
|
+
var symbol = checker.createSymbol(1 /* FunctionScopedVariable */, ts.escapeLeadingUnderscores("arg".concat(i)));
|
|
154748
154748
|
symbol.type = combineTypes(calls.map(function (call) { return call.argumentTypes[i] || checker.getUndefinedType(); }));
|
|
154749
154749
|
if (calls.some(function (call) { return call.argumentTypes[i] === undefined; })) {
|
|
154750
154750
|
symbol.flags |= 16777216 /* Optional */;
|
|
@@ -154847,7 +154847,7 @@ var ts;
|
|
|
154847
154847
|
codefix.createCodeFixActionWithoutFixAll(fixName, [codefix.createFileTextChanges(sourceFile.fileName, [
|
|
154848
154848
|
ts.createTextChange(sourceFile.checkJsDirective
|
|
154849
154849
|
? ts.createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end)
|
|
154850
|
-
: ts.createTextSpan(0, 0), "// @ts-nocheck"
|
|
154850
|
+
: ts.createTextSpan(0, 0), "// @ts-nocheck".concat(newLineCharacter)),
|
|
154851
154851
|
])], ts.Diagnostics.Disable_checking_for_this_file),
|
|
154852
154852
|
];
|
|
154853
154853
|
if (ts.textChanges.isValidLocationToAddComment(sourceFile, span.start)) {
|
|
@@ -155113,7 +155113,7 @@ var ts;
|
|
|
155113
155113
|
var typeParameters = isJs || typeArguments === undefined
|
|
155114
155114
|
? undefined
|
|
155115
155115
|
: ts.map(typeArguments, function (_, i) {
|
|
155116
|
-
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T"
|
|
155116
|
+
return ts.factory.createTypeParameterDeclaration(84 /* T */ + typeArguments.length - 1 <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + i) : "T".concat(i));
|
|
155117
155117
|
});
|
|
155118
155118
|
var parameters = createDummyParameters(args.length, names, types, /*minArgumentCount*/ undefined, isJs);
|
|
155119
155119
|
var type = isJs || contextualType === undefined
|
|
@@ -155148,7 +155148,7 @@ var ts;
|
|
|
155148
155148
|
/*decorators*/ undefined,
|
|
155149
155149
|
/*modifiers*/ undefined,
|
|
155150
155150
|
/*dotDotDotToken*/ undefined,
|
|
155151
|
-
/*name*/ names && names[i] || "arg"
|
|
155151
|
+
/*name*/ names && names[i] || "arg".concat(i),
|
|
155152
155152
|
/*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
|
|
155153
155153
|
/*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
|
|
155154
155154
|
/*initializer*/ undefined);
|
|
@@ -155399,7 +155399,7 @@ var ts;
|
|
|
155399
155399
|
}
|
|
155400
155400
|
var name = declaration.name.text;
|
|
155401
155401
|
var startWithUnderscore = ts.startsWithUnderscore(name);
|
|
155402
|
-
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_"
|
|
155402
|
+
var fieldName = createPropertyName(startWithUnderscore ? name : ts.getUniqueName("_".concat(name), file), declaration.name);
|
|
155403
155403
|
var accessorName = createPropertyName(startWithUnderscore ? ts.getUniqueName(name.substring(1), file) : name, declaration.name);
|
|
155404
155404
|
return {
|
|
155405
155405
|
isStatic: ts.hasStaticModifier(declaration),
|
|
@@ -156438,7 +156438,7 @@ var ts;
|
|
|
156438
156438
|
changes.insertNodeAfter(exportingSourceFile, exportNode, ts.factory.createExportDefault(ts.factory.createIdentifier(exportName.text)));
|
|
156439
156439
|
break;
|
|
156440
156440
|
default:
|
|
156441
|
-
ts.Debug.fail("Unexpected exportNode kind "
|
|
156441
|
+
ts.Debug.fail("Unexpected exportNode kind ".concat(exportNode.kind));
|
|
156442
156442
|
}
|
|
156443
156443
|
}
|
|
156444
156444
|
}
|
|
@@ -156526,7 +156526,7 @@ var ts;
|
|
|
156526
156526
|
break;
|
|
156527
156527
|
}
|
|
156528
156528
|
default:
|
|
156529
|
-
ts.Debug.assertNever(parent, "Unexpected parent kind "
|
|
156529
|
+
ts.Debug.assertNever(parent, "Unexpected parent kind ".concat(parent.kind));
|
|
156530
156530
|
}
|
|
156531
156531
|
}
|
|
156532
156532
|
function makeImportSpecifier(propertyName, name) {
|
|
@@ -157109,7 +157109,7 @@ var ts;
|
|
|
157109
157109
|
var newComment = ts.displayPartsToString(parameterDocComment);
|
|
157110
157110
|
if (newComment.length) {
|
|
157111
157111
|
ts.setSyntheticLeadingComments(result, [{
|
|
157112
|
-
text: "*\n"
|
|
157112
|
+
text: "*\n".concat(newComment.split("\n").map(function (c) { return " * ".concat(c); }).join("\n"), "\n "),
|
|
157113
157113
|
kind: 3 /* MultiLineCommentTrivia */,
|
|
157114
157114
|
pos: -1,
|
|
157115
157115
|
end: -1,
|
|
@@ -157254,7 +157254,7 @@ var ts;
|
|
|
157254
157254
|
usedFunctionNames.set(description, true);
|
|
157255
157255
|
functionActions.push({
|
|
157256
157256
|
description: description,
|
|
157257
|
-
name: "function_scope_"
|
|
157257
|
+
name: "function_scope_".concat(i),
|
|
157258
157258
|
kind: extractFunctionAction.kind
|
|
157259
157259
|
});
|
|
157260
157260
|
}
|
|
@@ -157262,7 +157262,7 @@ var ts;
|
|
|
157262
157262
|
else if (!innermostErrorFunctionAction) {
|
|
157263
157263
|
innermostErrorFunctionAction = {
|
|
157264
157264
|
description: description,
|
|
157265
|
-
name: "function_scope_"
|
|
157265
|
+
name: "function_scope_".concat(i),
|
|
157266
157266
|
notApplicableReason: getStringError(functionExtraction.errors),
|
|
157267
157267
|
kind: extractFunctionAction.kind
|
|
157268
157268
|
};
|
|
@@ -157278,7 +157278,7 @@ var ts;
|
|
|
157278
157278
|
usedConstantNames.set(description_1, true);
|
|
157279
157279
|
constantActions.push({
|
|
157280
157280
|
description: description_1,
|
|
157281
|
-
name: "constant_scope_"
|
|
157281
|
+
name: "constant_scope_".concat(i),
|
|
157282
157282
|
kind: extractConstantAction.kind
|
|
157283
157283
|
});
|
|
157284
157284
|
}
|
|
@@ -157286,7 +157286,7 @@ var ts;
|
|
|
157286
157286
|
else if (!innermostErrorConstantAction) {
|
|
157287
157287
|
innermostErrorConstantAction = {
|
|
157288
157288
|
description: description,
|
|
157289
|
-
name: "constant_scope_"
|
|
157289
|
+
name: "constant_scope_".concat(i),
|
|
157290
157290
|
notApplicableReason: getStringError(constantExtraction.errors),
|
|
157291
157291
|
kind: extractConstantAction.kind
|
|
157292
157292
|
};
|
|
@@ -157870,28 +157870,28 @@ var ts;
|
|
|
157870
157870
|
case 212 /* FunctionExpression */:
|
|
157871
157871
|
case 255 /* FunctionDeclaration */:
|
|
157872
157872
|
return scope.name
|
|
157873
|
-
? "function '"
|
|
157873
|
+
? "function '".concat(scope.name.text, "'")
|
|
157874
157874
|
: ts.ANONYMOUS;
|
|
157875
157875
|
case 213 /* ArrowFunction */:
|
|
157876
157876
|
return "arrow function";
|
|
157877
157877
|
case 168 /* MethodDeclaration */:
|
|
157878
|
-
return "method '"
|
|
157878
|
+
return "method '".concat(scope.name.getText(), "'");
|
|
157879
157879
|
case 171 /* GetAccessor */:
|
|
157880
|
-
return "'get "
|
|
157880
|
+
return "'get ".concat(scope.name.getText(), "'");
|
|
157881
157881
|
case 172 /* SetAccessor */:
|
|
157882
|
-
return "'set "
|
|
157882
|
+
return "'set ".concat(scope.name.getText(), "'");
|
|
157883
157883
|
default:
|
|
157884
|
-
throw ts.Debug.assertNever(scope, "Unexpected scope kind "
|
|
157884
|
+
throw ts.Debug.assertNever(scope, "Unexpected scope kind ".concat(scope.kind));
|
|
157885
157885
|
}
|
|
157886
157886
|
}
|
|
157887
157887
|
function getDescriptionForClassLikeDeclaration(scope) {
|
|
157888
157888
|
return scope.kind === 256 /* ClassDeclaration */
|
|
157889
|
-
? scope.name ? "class '"
|
|
157890
|
-
: scope.name ? "class expression '"
|
|
157889
|
+
? scope.name ? "class '".concat(scope.name.text, "'") : "anonymous class declaration"
|
|
157890
|
+
: scope.name ? "class expression '".concat(scope.name.text, "'") : "anonymous class expression";
|
|
157891
157891
|
}
|
|
157892
157892
|
function getDescriptionForModuleLikeDeclaration(scope) {
|
|
157893
157893
|
return scope.kind === 261 /* ModuleBlock */
|
|
157894
|
-
? "namespace '"
|
|
157894
|
+
? "namespace '".concat(scope.parent.name.getText(), "'")
|
|
157895
157895
|
: scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */;
|
|
157896
157896
|
}
|
|
157897
157897
|
var SpecialScope;
|
|
@@ -159367,7 +159367,7 @@ var ts;
|
|
|
159367
159367
|
case 253 /* VariableDeclaration */:
|
|
159368
159368
|
return ts.tryCast(node.name, ts.isIdentifier);
|
|
159369
159369
|
default:
|
|
159370
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
159370
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
159371
159371
|
}
|
|
159372
159372
|
}
|
|
159373
159373
|
function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleName, newModuleSpecifier, oldImportId, oldImportNode) {
|
|
@@ -159404,7 +159404,7 @@ var ts;
|
|
|
159404
159404
|
case 253 /* VariableDeclaration */:
|
|
159405
159405
|
return ts.factory.createVariableDeclaration(newNamespaceId, /*exclamationToken*/ undefined, /*type*/ undefined, createRequireCall(newModuleString));
|
|
159406
159406
|
default:
|
|
159407
|
-
return ts.Debug.assertNever(node, "Unexpected node kind "
|
|
159407
|
+
return ts.Debug.assertNever(node, "Unexpected node kind ".concat(node.kind));
|
|
159408
159408
|
}
|
|
159409
159409
|
}
|
|
159410
159410
|
function moduleSpecifierFromImport(i) {
|
|
@@ -159491,7 +159491,7 @@ var ts;
|
|
|
159491
159491
|
deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
|
|
159492
159492
|
break;
|
|
159493
159493
|
default:
|
|
159494
|
-
ts.Debug.assertNever(importDecl, "Unexpected import decl kind "
|
|
159494
|
+
ts.Debug.assertNever(importDecl, "Unexpected import decl kind ".concat(importDecl.kind));
|
|
159495
159495
|
}
|
|
159496
159496
|
}
|
|
159497
159497
|
function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) {
|
|
@@ -159591,7 +159591,7 @@ var ts;
|
|
|
159591
159591
|
var name = ts.combinePaths(inDirectory, newModuleName + extension);
|
|
159592
159592
|
if (!host.fileExists(name))
|
|
159593
159593
|
return newModuleName; // TODO: GH#18217
|
|
159594
|
-
newModuleName = moduleName
|
|
159594
|
+
newModuleName = "".concat(moduleName, ".").concat(i);
|
|
159595
159595
|
}
|
|
159596
159596
|
}
|
|
159597
159597
|
function getNewModuleName(movedSymbols) {
|
|
@@ -159698,7 +159698,7 @@ var ts;
|
|
|
159698
159698
|
return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : undefined;
|
|
159699
159699
|
}
|
|
159700
159700
|
default:
|
|
159701
|
-
return ts.Debug.assertNever(i, "Unexpected import kind "
|
|
159701
|
+
return ts.Debug.assertNever(i, "Unexpected import kind ".concat(i.kind));
|
|
159702
159702
|
}
|
|
159703
159703
|
}
|
|
159704
159704
|
function filterNamedBindings(namedBindings, keep) {
|
|
@@ -159813,7 +159813,7 @@ var ts;
|
|
|
159813
159813
|
case 200 /* ObjectBindingPattern */:
|
|
159814
159814
|
return ts.firstDefined(name.elements, function (em) { return ts.isOmittedExpression(em) ? undefined : forEachTopLevelDeclarationInBindingName(em.name, cb); });
|
|
159815
159815
|
default:
|
|
159816
|
-
return ts.Debug.assertNever(name, "Unexpected name kind "
|
|
159816
|
+
return ts.Debug.assertNever(name, "Unexpected name kind ".concat(name.kind));
|
|
159817
159817
|
}
|
|
159818
159818
|
}
|
|
159819
159819
|
function nameOfTopLevelDeclaration(d) {
|
|
@@ -159874,7 +159874,7 @@ var ts;
|
|
|
159874
159874
|
case 237 /* ExpressionStatement */:
|
|
159875
159875
|
return ts.Debug.fail(); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
159876
159876
|
default:
|
|
159877
|
-
return ts.Debug.assertNever(d, "Unexpected declaration kind "
|
|
159877
|
+
return ts.Debug.assertNever(d, "Unexpected declaration kind ".concat(d.kind));
|
|
159878
159878
|
}
|
|
159879
159879
|
}
|
|
159880
159880
|
function addCommonjsExport(decl) {
|
|
@@ -159896,7 +159896,7 @@ var ts;
|
|
|
159896
159896
|
case 237 /* ExpressionStatement */:
|
|
159897
159897
|
return ts.Debug.fail("Can't export an ExpressionStatement"); // Shouldn't try to add 'export' keyword to `exports.x = ...`
|
|
159898
159898
|
default:
|
|
159899
|
-
return ts.Debug.assertNever(decl, "Unexpected decl kind "
|
|
159899
|
+
return ts.Debug.assertNever(decl, "Unexpected decl kind ".concat(decl.kind));
|
|
159900
159900
|
}
|
|
159901
159901
|
}
|
|
159902
159902
|
/** Creates `exports.x = x;` */
|
|
@@ -160534,7 +160534,7 @@ var ts;
|
|
|
160534
160534
|
return [functionDeclaration.name, functionDeclaration.parent.name];
|
|
160535
160535
|
return [functionDeclaration.parent.name];
|
|
160536
160536
|
default:
|
|
160537
|
-
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind "
|
|
160537
|
+
return ts.Debug.assertNever(functionDeclaration, "Unexpected function declaration kind ".concat(functionDeclaration.kind));
|
|
160538
160538
|
}
|
|
160539
160539
|
}
|
|
160540
160540
|
})(convertParamsToDestructuredObject = refactor.convertParamsToDestructuredObject || (refactor.convertParamsToDestructuredObject = {}));
|
|
@@ -161238,7 +161238,7 @@ var ts;
|
|
|
161238
161238
|
var textPos = ts.scanner.getTextPos();
|
|
161239
161239
|
if (textPos <= end) {
|
|
161240
161240
|
if (token === 79 /* Identifier */) {
|
|
161241
|
-
ts.Debug.fail("Did not expect "
|
|
161241
|
+
ts.Debug.fail("Did not expect ".concat(ts.Debug.formatSyntaxKind(parent.kind), " to have an Identifier in its trivia"));
|
|
161242
161242
|
}
|
|
161243
161243
|
nodes.push(createNode(token, pos, textPos, parent));
|
|
161244
161244
|
}
|
|
@@ -162168,7 +162168,7 @@ var ts;
|
|
|
162168
162168
|
function getValidSourceFile(fileName) {
|
|
162169
162169
|
var sourceFile = program.getSourceFile(fileName);
|
|
162170
162170
|
if (!sourceFile) {
|
|
162171
|
-
var error = new Error("Could not find source file: '"
|
|
162171
|
+
var error = new Error("Could not find source file: '".concat(fileName, "'."));
|
|
162172
162172
|
// We've been having trouble debugging this, so attach sidecar data for the tsserver log.
|
|
162173
162173
|
// See https://github.com/microsoft/TypeScript/issues/30180.
|
|
162174
162174
|
error.ProgramFiles = program.getSourceFiles().map(function (f) { return f.fileName; });
|
|
@@ -162844,7 +162844,7 @@ var ts;
|
|
|
162844
162844
|
var element = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningElement(token.parent) ? token.parent.parent
|
|
162845
162845
|
: ts.isJsxText(token) && ts.isJsxElement(token.parent) ? token.parent : undefined;
|
|
162846
162846
|
if (element && isUnclosedTag(element)) {
|
|
162847
|
-
return { newText: "</"
|
|
162847
|
+
return { newText: "</".concat(element.openingElement.tagName.getText(sourceFile), ">") };
|
|
162848
162848
|
}
|
|
162849
162849
|
var fragment = token.kind === 31 /* GreaterThanToken */ && ts.isJsxOpeningFragment(token.parent) ? token.parent.parent
|
|
162850
162850
|
: ts.isJsxText(token) && ts.isJsxFragment(token.parent) ? token.parent : undefined;
|
|
@@ -162950,7 +162950,7 @@ var ts;
|
|
|
162950
162950
|
pos = commentRange.end + 1;
|
|
162951
162951
|
}
|
|
162952
162952
|
else { // If it's not in a comment range, then we need to comment the uncommented portions.
|
|
162953
|
-
var newPos = text.substring(pos, textRange.end).search("("
|
|
162953
|
+
var newPos = text.substring(pos, textRange.end).search("(".concat(openMultilineRegex, ")|(").concat(closeMultilineRegex, ")"));
|
|
162954
162954
|
isCommenting = insertComment !== undefined
|
|
162955
162955
|
? insertComment
|
|
162956
162956
|
: isCommenting || !ts.isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); // If isCommenting is already true we don't need to check whitespace again.
|
|
@@ -163345,14 +163345,14 @@ var ts;
|
|
|
163345
163345
|
case ts.LanguageServiceMode.PartialSemantic:
|
|
163346
163346
|
invalidOperationsInPartialSemanticMode.forEach(function (key) {
|
|
163347
163347
|
return ls[key] = function () {
|
|
163348
|
-
throw new Error("LanguageService Operation: "
|
|
163348
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.PartialSemantic"));
|
|
163349
163349
|
};
|
|
163350
163350
|
});
|
|
163351
163351
|
break;
|
|
163352
163352
|
case ts.LanguageServiceMode.Syntactic:
|
|
163353
163353
|
invalidOperationsInSyntacticMode.forEach(function (key) {
|
|
163354
163354
|
return ls[key] = function () {
|
|
163355
|
-
throw new Error("LanguageService Operation: "
|
|
163355
|
+
throw new Error("LanguageService Operation: ".concat(key, " not allowed in LanguageServiceMode.Syntactic"));
|
|
163356
163356
|
};
|
|
163357
163357
|
});
|
|
163358
163358
|
break;
|
|
@@ -164334,13 +164334,13 @@ var ts;
|
|
|
164334
164334
|
var result = action();
|
|
164335
164335
|
if (logPerformance) {
|
|
164336
164336
|
var end = ts.timestamp();
|
|
164337
|
-
logger.log(actionDescription
|
|
164337
|
+
logger.log("".concat(actionDescription, " completed in ").concat(end - start, " msec"));
|
|
164338
164338
|
if (ts.isString(result)) {
|
|
164339
164339
|
var str = result;
|
|
164340
164340
|
if (str.length > 128) {
|
|
164341
164341
|
str = str.substring(0, 128) + "...";
|
|
164342
164342
|
}
|
|
164343
|
-
logger.log(" result.length="
|
|
164343
|
+
logger.log(" result.length=".concat(str.length, ", result='").concat(JSON.stringify(str), "'"));
|
|
164344
164344
|
}
|
|
164345
164345
|
}
|
|
164346
164346
|
return result;
|
|
@@ -164422,7 +164422,7 @@ var ts;
|
|
|
164422
164422
|
* Update the list of scripts known to the compiler
|
|
164423
164423
|
*/
|
|
164424
164424
|
LanguageServiceShimObject.prototype.refresh = function (throwOnError) {
|
|
164425
|
-
this.forwardJSONCall("refresh("
|
|
164425
|
+
this.forwardJSONCall("refresh(".concat(throwOnError, ")"), function () { return null; } // eslint-disable-line no-null/no-null
|
|
164426
164426
|
);
|
|
164427
164427
|
};
|
|
164428
164428
|
LanguageServiceShimObject.prototype.cleanupSemanticCache = function () {
|
|
@@ -164438,43 +164438,43 @@ var ts;
|
|
|
164438
164438
|
};
|
|
164439
164439
|
LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) {
|
|
164440
164440
|
var _this = this;
|
|
164441
|
-
return this.forwardJSONCall("getSyntacticClassifications('"
|
|
164441
|
+
return this.forwardJSONCall("getSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
164442
164442
|
};
|
|
164443
164443
|
LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) {
|
|
164444
164444
|
var _this = this;
|
|
164445
|
-
return this.forwardJSONCall("getSemanticClassifications('"
|
|
164445
|
+
return this.forwardJSONCall("getSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"), function () { return _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); });
|
|
164446
164446
|
};
|
|
164447
164447
|
LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) {
|
|
164448
164448
|
var _this = this;
|
|
164449
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('"
|
|
164449
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
164450
164450
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
164451
164451
|
// on the managed side versus a full JSON array.
|
|
164452
164452
|
function () { return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
164453
164453
|
};
|
|
164454
164454
|
LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) {
|
|
164455
164455
|
var _this = this;
|
|
164456
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('"
|
|
164456
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(fileName, "', ").concat(start, ", ").concat(length, ")"),
|
|
164457
164457
|
// directly serialize the spans out to a string. This is much faster to decode
|
|
164458
164458
|
// on the managed side versus a full JSON array.
|
|
164459
164459
|
function () { return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); });
|
|
164460
164460
|
};
|
|
164461
164461
|
LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) {
|
|
164462
164462
|
var _this = this;
|
|
164463
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('"
|
|
164463
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('".concat(fileName, "')"), function () {
|
|
164464
164464
|
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName);
|
|
164465
164465
|
return _this.realizeDiagnostics(diagnostics);
|
|
164466
164466
|
});
|
|
164467
164467
|
};
|
|
164468
164468
|
LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) {
|
|
164469
164469
|
var _this = this;
|
|
164470
|
-
return this.forwardJSONCall("getSemanticDiagnostics('"
|
|
164470
|
+
return this.forwardJSONCall("getSemanticDiagnostics('".concat(fileName, "')"), function () {
|
|
164471
164471
|
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName);
|
|
164472
164472
|
return _this.realizeDiagnostics(diagnostics);
|
|
164473
164473
|
});
|
|
164474
164474
|
};
|
|
164475
164475
|
LanguageServiceShimObject.prototype.getSuggestionDiagnostics = function (fileName) {
|
|
164476
164476
|
var _this = this;
|
|
164477
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('"
|
|
164477
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('".concat(fileName, "')"), function () { return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName)); });
|
|
164478
164478
|
};
|
|
164479
164479
|
LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () {
|
|
164480
164480
|
var _this = this;
|
|
@@ -164490,7 +164490,7 @@ var ts;
|
|
|
164490
164490
|
*/
|
|
164491
164491
|
LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) {
|
|
164492
164492
|
var _this = this;
|
|
164493
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('"
|
|
164493
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getQuickInfoAtPosition(fileName, position); });
|
|
164494
164494
|
};
|
|
164495
164495
|
/// NAMEORDOTTEDNAMESPAN
|
|
164496
164496
|
/**
|
|
@@ -164499,7 +164499,7 @@ var ts;
|
|
|
164499
164499
|
*/
|
|
164500
164500
|
LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) {
|
|
164501
164501
|
var _this = this;
|
|
164502
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('"
|
|
164502
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(fileName, "', ").concat(startPos, ", ").concat(endPos, ")"), function () { return _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); });
|
|
164503
164503
|
};
|
|
164504
164504
|
/**
|
|
164505
164505
|
* STATEMENTSPAN
|
|
@@ -164507,12 +164507,12 @@ var ts;
|
|
|
164507
164507
|
*/
|
|
164508
164508
|
LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) {
|
|
164509
164509
|
var _this = this;
|
|
164510
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('"
|
|
164510
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBreakpointStatementAtPosition(fileName, position); });
|
|
164511
164511
|
};
|
|
164512
164512
|
/// SIGNATUREHELP
|
|
164513
164513
|
LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position, options) {
|
|
164514
164514
|
var _this = this;
|
|
164515
|
-
return this.forwardJSONCall("getSignatureHelpItems('"
|
|
164515
|
+
return this.forwardJSONCall("getSignatureHelpItems('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSignatureHelpItems(fileName, position, options); });
|
|
164516
164516
|
};
|
|
164517
164517
|
/// GOTO DEFINITION
|
|
164518
164518
|
/**
|
|
@@ -164521,7 +164521,7 @@ var ts;
|
|
|
164521
164521
|
*/
|
|
164522
164522
|
LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) {
|
|
164523
164523
|
var _this = this;
|
|
164524
|
-
return this.forwardJSONCall("getDefinitionAtPosition('"
|
|
164524
|
+
return this.forwardJSONCall("getDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAtPosition(fileName, position); });
|
|
164525
164525
|
};
|
|
164526
164526
|
/**
|
|
164527
164527
|
* Computes the definition location and file for the symbol
|
|
@@ -164529,7 +164529,7 @@ var ts;
|
|
|
164529
164529
|
*/
|
|
164530
164530
|
LanguageServiceShimObject.prototype.getDefinitionAndBoundSpan = function (fileName, position) {
|
|
164531
164531
|
var _this = this;
|
|
164532
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('"
|
|
164532
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDefinitionAndBoundSpan(fileName, position); });
|
|
164533
164533
|
};
|
|
164534
164534
|
/// GOTO Type
|
|
164535
164535
|
/**
|
|
@@ -164538,7 +164538,7 @@ var ts;
|
|
|
164538
164538
|
*/
|
|
164539
164539
|
LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) {
|
|
164540
164540
|
var _this = this;
|
|
164541
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('"
|
|
164541
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getTypeDefinitionAtPosition(fileName, position); });
|
|
164542
164542
|
};
|
|
164543
164543
|
/// GOTO Implementation
|
|
164544
164544
|
/**
|
|
@@ -164547,37 +164547,37 @@ var ts;
|
|
|
164547
164547
|
*/
|
|
164548
164548
|
LanguageServiceShimObject.prototype.getImplementationAtPosition = function (fileName, position) {
|
|
164549
164549
|
var _this = this;
|
|
164550
|
-
return this.forwardJSONCall("getImplementationAtPosition('"
|
|
164550
|
+
return this.forwardJSONCall("getImplementationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getImplementationAtPosition(fileName, position); });
|
|
164551
164551
|
};
|
|
164552
164552
|
LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position, options) {
|
|
164553
164553
|
var _this = this;
|
|
164554
|
-
return this.forwardJSONCall("getRenameInfo('"
|
|
164554
|
+
return this.forwardJSONCall("getRenameInfo('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getRenameInfo(fileName, position, options); });
|
|
164555
164555
|
};
|
|
164556
164556
|
LanguageServiceShimObject.prototype.getSmartSelectionRange = function (fileName, position) {
|
|
164557
164557
|
var _this = this;
|
|
164558
|
-
return this.forwardJSONCall("getSmartSelectionRange('"
|
|
164558
|
+
return this.forwardJSONCall("getSmartSelectionRange('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSmartSelectionRange(fileName, position); });
|
|
164559
164559
|
};
|
|
164560
164560
|
LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
164561
164561
|
var _this = this;
|
|
164562
|
-
return this.forwardJSONCall("findRenameLocations('"
|
|
164562
|
+
return this.forwardJSONCall("findRenameLocations('".concat(fileName, "', ").concat(position, ", ").concat(findInStrings, ", ").concat(findInComments, ", ").concat(providePrefixAndSuffixTextForRename, ")"), function () { return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename); });
|
|
164563
164563
|
};
|
|
164564
164564
|
/// GET BRACE MATCHING
|
|
164565
164565
|
LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) {
|
|
164566
164566
|
var _this = this;
|
|
164567
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('"
|
|
164567
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); });
|
|
164568
164568
|
};
|
|
164569
164569
|
LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) {
|
|
164570
164570
|
var _this = this;
|
|
164571
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('"
|
|
164571
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(openingBrace, ")"), function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); });
|
|
164572
164572
|
};
|
|
164573
164573
|
LanguageServiceShimObject.prototype.getSpanOfEnclosingComment = function (fileName, position, onlyMultiLine) {
|
|
164574
164574
|
var _this = this;
|
|
164575
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('"
|
|
164575
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine); });
|
|
164576
164576
|
};
|
|
164577
164577
|
/// GET SMART INDENT
|
|
164578
164578
|
LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) {
|
|
164579
164579
|
var _this = this;
|
|
164580
|
-
return this.forwardJSONCall("getIndentationAtPosition('"
|
|
164580
|
+
return this.forwardJSONCall("getIndentationAtPosition('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
164581
164581
|
var localOptions = JSON.parse(options);
|
|
164582
164582
|
return _this.languageService.getIndentationAtPosition(fileName, position, localOptions);
|
|
164583
164583
|
});
|
|
@@ -164585,23 +164585,23 @@ var ts;
|
|
|
164585
164585
|
/// GET REFERENCES
|
|
164586
164586
|
LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) {
|
|
164587
164587
|
var _this = this;
|
|
164588
|
-
return this.forwardJSONCall("getReferencesAtPosition('"
|
|
164588
|
+
return this.forwardJSONCall("getReferencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getReferencesAtPosition(fileName, position); });
|
|
164589
164589
|
};
|
|
164590
164590
|
LanguageServiceShimObject.prototype.findReferences = function (fileName, position) {
|
|
164591
164591
|
var _this = this;
|
|
164592
|
-
return this.forwardJSONCall("findReferences('"
|
|
164592
|
+
return this.forwardJSONCall("findReferences('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.findReferences(fileName, position); });
|
|
164593
164593
|
};
|
|
164594
164594
|
LanguageServiceShimObject.prototype.getFileReferences = function (fileName) {
|
|
164595
164595
|
var _this = this;
|
|
164596
|
-
return this.forwardJSONCall("getFileReferences('"
|
|
164596
|
+
return this.forwardJSONCall("getFileReferences('".concat(fileName, ")"), function () { return _this.languageService.getFileReferences(fileName); });
|
|
164597
164597
|
};
|
|
164598
164598
|
LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) {
|
|
164599
164599
|
var _this = this;
|
|
164600
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('"
|
|
164600
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getOccurrencesAtPosition(fileName, position); });
|
|
164601
164601
|
};
|
|
164602
164602
|
LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) {
|
|
164603
164603
|
var _this = this;
|
|
164604
|
-
return this.forwardJSONCall("getDocumentHighlights('"
|
|
164604
|
+
return this.forwardJSONCall("getDocumentHighlights('".concat(fileName, "', ").concat(position, ")"), function () {
|
|
164605
164605
|
var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch));
|
|
164606
164606
|
// workaround for VS document highlighting issue - keep only items from the initial file
|
|
164607
164607
|
var normalizedName = ts.toFileNameLowerCase(ts.normalizeSlashes(fileName));
|
|
@@ -164616,108 +164616,108 @@ var ts;
|
|
|
164616
164616
|
*/
|
|
164617
164617
|
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, preferences, formattingSettings) {
|
|
164618
164618
|
var _this = this;
|
|
164619
|
-
return this.forwardJSONCall("getCompletionsAtPosition('"
|
|
164619
|
+
return this.forwardJSONCall("getCompletionsAtPosition('".concat(fileName, "', ").concat(position, ", ").concat(preferences, ", ").concat(formattingSettings, ")"), function () { return _this.languageService.getCompletionsAtPosition(fileName, position, preferences, formattingSettings); });
|
|
164620
164620
|
};
|
|
164621
164621
|
/** Get a string based representation of a completion list entry details */
|
|
164622
164622
|
LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName, formatOptions, source, preferences, data) {
|
|
164623
164623
|
var _this = this;
|
|
164624
|
-
return this.forwardJSONCall("getCompletionEntryDetails('"
|
|
164624
|
+
return this.forwardJSONCall("getCompletionEntryDetails('".concat(fileName, "', ").concat(position, ", '").concat(entryName, "')"), function () {
|
|
164625
164625
|
var localOptions = formatOptions === undefined ? undefined : JSON.parse(formatOptions);
|
|
164626
164626
|
return _this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data);
|
|
164627
164627
|
});
|
|
164628
164628
|
};
|
|
164629
164629
|
LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) {
|
|
164630
164630
|
var _this = this;
|
|
164631
|
-
return this.forwardJSONCall("getFormattingEditsForRange('"
|
|
164631
|
+
return this.forwardJSONCall("getFormattingEditsForRange('".concat(fileName, "', ").concat(start, ", ").concat(end, ")"), function () {
|
|
164632
164632
|
var localOptions = JSON.parse(options);
|
|
164633
164633
|
return _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions);
|
|
164634
164634
|
});
|
|
164635
164635
|
};
|
|
164636
164636
|
LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) {
|
|
164637
164637
|
var _this = this;
|
|
164638
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('"
|
|
164638
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('".concat(fileName, "')"), function () {
|
|
164639
164639
|
var localOptions = JSON.parse(options);
|
|
164640
164640
|
return _this.languageService.getFormattingEditsForDocument(fileName, localOptions);
|
|
164641
164641
|
});
|
|
164642
164642
|
};
|
|
164643
164643
|
LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) {
|
|
164644
164644
|
var _this = this;
|
|
164645
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"
|
|
164645
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(fileName, "', ").concat(position, ", '").concat(key, "')"), function () {
|
|
164646
164646
|
var localOptions = JSON.parse(options);
|
|
164647
164647
|
return _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions);
|
|
164648
164648
|
});
|
|
164649
164649
|
};
|
|
164650
164650
|
LanguageServiceShimObject.prototype.getDocCommentTemplateAtPosition = function (fileName, position, options) {
|
|
164651
164651
|
var _this = this;
|
|
164652
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('"
|
|
164652
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.getDocCommentTemplateAtPosition(fileName, position, options); });
|
|
164653
164653
|
};
|
|
164654
164654
|
/// NAVIGATE TO
|
|
164655
164655
|
/** Return a list of symbols that are interesting to navigate to */
|
|
164656
164656
|
LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount, fileName) {
|
|
164657
164657
|
var _this = this;
|
|
164658
|
-
return this.forwardJSONCall("getNavigateToItems('"
|
|
164658
|
+
return this.forwardJSONCall("getNavigateToItems('".concat(searchValue, "', ").concat(maxResultCount, ", ").concat(fileName, ")"), function () { return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName); });
|
|
164659
164659
|
};
|
|
164660
164660
|
LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) {
|
|
164661
164661
|
var _this = this;
|
|
164662
|
-
return this.forwardJSONCall("getNavigationBarItems('"
|
|
164662
|
+
return this.forwardJSONCall("getNavigationBarItems('".concat(fileName, "')"), function () { return _this.languageService.getNavigationBarItems(fileName); });
|
|
164663
164663
|
};
|
|
164664
164664
|
LanguageServiceShimObject.prototype.getNavigationTree = function (fileName) {
|
|
164665
164665
|
var _this = this;
|
|
164666
|
-
return this.forwardJSONCall("getNavigationTree('"
|
|
164666
|
+
return this.forwardJSONCall("getNavigationTree('".concat(fileName, "')"), function () { return _this.languageService.getNavigationTree(fileName); });
|
|
164667
164667
|
};
|
|
164668
164668
|
LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) {
|
|
164669
164669
|
var _this = this;
|
|
164670
|
-
return this.forwardJSONCall("getOutliningSpans('"
|
|
164670
|
+
return this.forwardJSONCall("getOutliningSpans('".concat(fileName, "')"), function () { return _this.languageService.getOutliningSpans(fileName); });
|
|
164671
164671
|
};
|
|
164672
164672
|
LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) {
|
|
164673
164673
|
var _this = this;
|
|
164674
|
-
return this.forwardJSONCall("getTodoComments('"
|
|
164674
|
+
return this.forwardJSONCall("getTodoComments('".concat(fileName, "')"), function () { return _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); });
|
|
164675
164675
|
};
|
|
164676
164676
|
/// CALL HIERARCHY
|
|
164677
164677
|
LanguageServiceShimObject.prototype.prepareCallHierarchy = function (fileName, position) {
|
|
164678
164678
|
var _this = this;
|
|
164679
|
-
return this.forwardJSONCall("prepareCallHierarchy('"
|
|
164679
|
+
return this.forwardJSONCall("prepareCallHierarchy('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.prepareCallHierarchy(fileName, position); });
|
|
164680
164680
|
};
|
|
164681
164681
|
LanguageServiceShimObject.prototype.provideCallHierarchyIncomingCalls = function (fileName, position) {
|
|
164682
164682
|
var _this = this;
|
|
164683
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"
|
|
164683
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyIncomingCalls(fileName, position); });
|
|
164684
164684
|
};
|
|
164685
164685
|
LanguageServiceShimObject.prototype.provideCallHierarchyOutgoingCalls = function (fileName, position) {
|
|
164686
164686
|
var _this = this;
|
|
164687
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"
|
|
164687
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(fileName, "', ").concat(position, ")"), function () { return _this.languageService.provideCallHierarchyOutgoingCalls(fileName, position); });
|
|
164688
164688
|
};
|
|
164689
164689
|
LanguageServiceShimObject.prototype.provideInlayHints = function (fileName, span, preference) {
|
|
164690
164690
|
var _this = this;
|
|
164691
|
-
return this.forwardJSONCall("provideInlayHints('"
|
|
164691
|
+
return this.forwardJSONCall("provideInlayHints('".concat(fileName, "', '").concat(JSON.stringify(span), "', ").concat(JSON.stringify(preference), ")"), function () { return _this.languageService.provideInlayHints(fileName, span, preference); });
|
|
164692
164692
|
};
|
|
164693
164693
|
/// Emit
|
|
164694
164694
|
LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) {
|
|
164695
164695
|
var _this = this;
|
|
164696
|
-
return this.forwardJSONCall("getEmitOutput('"
|
|
164696
|
+
return this.forwardJSONCall("getEmitOutput('".concat(fileName, "')"), function () {
|
|
164697
164697
|
var _a = _this.languageService.getEmitOutput(fileName), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
164698
164698
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
164699
164699
|
});
|
|
164700
164700
|
};
|
|
164701
164701
|
LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) {
|
|
164702
164702
|
var _this = this;
|
|
164703
|
-
return forwardCall(this.logger, "getEmitOutput('"
|
|
164703
|
+
return forwardCall(this.logger, "getEmitOutput('".concat(fileName, "')"),
|
|
164704
164704
|
/*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance);
|
|
164705
164705
|
};
|
|
164706
164706
|
LanguageServiceShimObject.prototype.toggleLineComment = function (fileName, textRange) {
|
|
164707
164707
|
var _this = this;
|
|
164708
|
-
return this.forwardJSONCall("toggleLineComment('"
|
|
164708
|
+
return this.forwardJSONCall("toggleLineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleLineComment(fileName, textRange); });
|
|
164709
164709
|
};
|
|
164710
164710
|
LanguageServiceShimObject.prototype.toggleMultilineComment = function (fileName, textRange) {
|
|
164711
164711
|
var _this = this;
|
|
164712
|
-
return this.forwardJSONCall("toggleMultilineComment('"
|
|
164712
|
+
return this.forwardJSONCall("toggleMultilineComment('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.toggleMultilineComment(fileName, textRange); });
|
|
164713
164713
|
};
|
|
164714
164714
|
LanguageServiceShimObject.prototype.commentSelection = function (fileName, textRange) {
|
|
164715
164715
|
var _this = this;
|
|
164716
|
-
return this.forwardJSONCall("commentSelection('"
|
|
164716
|
+
return this.forwardJSONCall("commentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.commentSelection(fileName, textRange); });
|
|
164717
164717
|
};
|
|
164718
164718
|
LanguageServiceShimObject.prototype.uncommentSelection = function (fileName, textRange) {
|
|
164719
164719
|
var _this = this;
|
|
164720
|
-
return this.forwardJSONCall("uncommentSelection('"
|
|
164720
|
+
return this.forwardJSONCall("uncommentSelection('".concat(fileName, "', '").concat(JSON.stringify(textRange), "')"), function () { return _this.languageService.uncommentSelection(fileName, textRange); });
|
|
164721
164721
|
};
|
|
164722
164722
|
return LanguageServiceShimObject;
|
|
164723
164723
|
}(ShimBase));
|
|
@@ -164767,7 +164767,7 @@ var ts;
|
|
|
164767
164767
|
};
|
|
164768
164768
|
CoreServicesShimObject.prototype.resolveModuleName = function (fileName, moduleName, compilerOptionsJson) {
|
|
164769
164769
|
var _this = this;
|
|
164770
|
-
return this.forwardJSONCall("resolveModuleName('"
|
|
164770
|
+
return this.forwardJSONCall("resolveModuleName('".concat(fileName, "')"), function () {
|
|
164771
164771
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164772
164772
|
var result = ts.resolveModuleName(moduleName, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
164773
164773
|
var resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : undefined;
|
|
@@ -164782,7 +164782,7 @@ var ts;
|
|
|
164782
164782
|
};
|
|
164783
164783
|
CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) {
|
|
164784
164784
|
var _this = this;
|
|
164785
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective("
|
|
164785
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(fileName, ")"), function () {
|
|
164786
164786
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164787
164787
|
var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host);
|
|
164788
164788
|
return {
|
|
@@ -164794,7 +164794,7 @@ var ts;
|
|
|
164794
164794
|
};
|
|
164795
164795
|
CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) {
|
|
164796
164796
|
var _this = this;
|
|
164797
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('"
|
|
164797
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('".concat(fileName, "')"), function () {
|
|
164798
164798
|
// for now treat files as JavaScript
|
|
164799
164799
|
var result = ts.preProcessFile(ts.getSnapshotText(sourceTextSnapshot), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
|
|
164800
164800
|
return {
|
|
@@ -164809,7 +164809,7 @@ var ts;
|
|
|
164809
164809
|
};
|
|
164810
164810
|
CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) {
|
|
164811
164811
|
var _this = this;
|
|
164812
|
-
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('"
|
|
164812
|
+
return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(compilerOptionsJson, "')"), function () {
|
|
164813
164813
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
164814
164814
|
return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host);
|
|
164815
164815
|
});
|
|
@@ -164831,7 +164831,7 @@ var ts;
|
|
|
164831
164831
|
};
|
|
164832
164832
|
CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) {
|
|
164833
164833
|
var _this = this;
|
|
164834
|
-
return this.forwardJSONCall("getTSConfigFileInfo('"
|
|
164834
|
+
return this.forwardJSONCall("getTSConfigFileInfo('".concat(fileName, "')"), function () {
|
|
164835
164835
|
var result = ts.parseJsonText(fileName, ts.getSnapshotText(sourceTextSnapshot));
|
|
164836
164836
|
var normalizedFileName = ts.normalizeSlashes(fileName);
|
|
164837
164837
|
var configFile = ts.parseJsonSourceFileConfigFileContent(result, _this.host, ts.getDirectoryPath(normalizedFileName), /*existingOptions*/ {}, normalizedFileName);
|