typescript 4.7.0-dev.20220505 → 4.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/cs/diagnosticMessages.generated.json +12 -11
- package/lib/de/diagnosticMessages.generated.json +12 -11
- package/lib/es/diagnosticMessages.generated.json +12 -11
- package/lib/fr/diagnosticMessages.generated.json +12 -11
- package/lib/it/diagnosticMessages.generated.json +12 -11
- package/lib/ja/diagnosticMessages.generated.json +12 -11
- package/lib/ko/diagnosticMessages.generated.json +12 -11
- package/lib/lib.es2022.d.ts +1 -0
- package/lib/lib.es2022.intl.d.ts +111 -0
- package/lib/pl/diagnosticMessages.generated.json +12 -11
- package/lib/pt-br/diagnosticMessages.generated.json +12 -11
- package/lib/ru/diagnosticMessages.generated.json +12 -11
- package/lib/tr/diagnosticMessages.generated.json +12 -11
- package/lib/tsc.js +500 -320
- package/lib/tsserver.js +19102 -18870
- package/lib/tsserverlibrary.js +19070 -18838
- package/lib/typescript.js +18890 -18659
- package/lib/typescriptServices.js +18890 -18659
- package/lib/typingsInstaller.js +14240 -14016
- package/lib/zh-cn/diagnosticMessages.generated.json +12 -11
- package/lib/zh-tw/diagnosticMessages.generated.json +12 -11
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
ar[i] = from[i];
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return to.concat(ar || from);
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
26
|
};
|
|
27
27
|
var __assign = (this && this.__assign) || function () {
|
|
28
28
|
__assign = Object.assign || function(t) {
|
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version =
|
|
72
|
+
ts.version = "4.7.2";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -94,7 +94,7 @@ var ts;
|
|
|
94
94
|
var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
|
|
95
95
|
if (constructor)
|
|
96
96
|
return constructor;
|
|
97
|
-
throw new Error("TypeScript requires an environment that provides a compatible native "
|
|
97
|
+
throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
|
|
98
98
|
}
|
|
99
99
|
})(ts || (ts = {}));
|
|
100
100
|
var ts;
|
|
@@ -1436,7 +1436,7 @@ var ts;
|
|
|
1436
1436
|
function cast(value, test) {
|
|
1437
1437
|
if (value !== undefined && test(value))
|
|
1438
1438
|
return value;
|
|
1439
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1439
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1440
1440
|
}
|
|
1441
1441
|
ts.cast = cast;
|
|
1442
1442
|
function noop(_) { }
|
|
@@ -1486,7 +1486,7 @@ var ts;
|
|
|
1486
1486
|
function memoizeOne(callback) {
|
|
1487
1487
|
var map = new ts.Map();
|
|
1488
1488
|
return function (arg) {
|
|
1489
|
-
var key = typeof arg
|
|
1489
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1490
1490
|
var value = map.get(key);
|
|
1491
1491
|
if (value === undefined && !map.has(key)) {
|
|
1492
1492
|
value = callback(arg);
|
|
@@ -1821,7 +1821,7 @@ var ts;
|
|
|
1821
1821
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
1822
1822
|
function patternText(_a) {
|
|
1823
1823
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
1824
|
-
return prefix
|
|
1824
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
1825
1825
|
}
|
|
1826
1826
|
ts.patternText = patternText;
|
|
1827
1827
|
function matchedText(pattern, candidate) {
|
|
@@ -2092,7 +2092,7 @@ var ts;
|
|
|
2092
2092
|
}
|
|
2093
2093
|
function fail(message, stackCrawlMark) {
|
|
2094
2094
|
debugger;
|
|
2095
|
-
var e = new Error(message ? "Debug Failure. "
|
|
2095
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
2096
2096
|
if (Error.captureStackTrace) {
|
|
2097
2097
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
2098
2098
|
}
|
|
@@ -2100,12 +2100,12 @@ var ts;
|
|
|
2100
2100
|
}
|
|
2101
2101
|
Debug.fail = fail;
|
|
2102
2102
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
2103
|
-
return fail((message || "Unexpected node."
|
|
2103
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
2104
2104
|
}
|
|
2105
2105
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
2106
2106
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
2107
2107
|
if (!expression) {
|
|
2108
|
-
message = message ? "False expression: "
|
|
2108
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
2109
2109
|
if (verboseDebugInfo) {
|
|
2110
2110
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
2111
2111
|
}
|
|
@@ -2115,26 +2115,26 @@ var ts;
|
|
|
2115
2115
|
Debug.assert = assert;
|
|
2116
2116
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
2117
2117
|
if (a !== b) {
|
|
2118
|
-
var message = msg ? msg2 ? msg
|
|
2119
|
-
fail("Expected "
|
|
2118
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
2119
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
2120
2120
|
}
|
|
2121
2121
|
}
|
|
2122
2122
|
Debug.assertEqual = assertEqual;
|
|
2123
2123
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
2124
2124
|
if (a >= b) {
|
|
2125
|
-
fail("Expected "
|
|
2125
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
2126
2126
|
}
|
|
2127
2127
|
}
|
|
2128
2128
|
Debug.assertLessThan = assertLessThan;
|
|
2129
2129
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
2130
2130
|
if (a > b) {
|
|
2131
|
-
fail("Expected "
|
|
2131
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
2135
2135
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
2136
2136
|
if (a < b) {
|
|
2137
|
-
fail("Expected "
|
|
2137
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
2140
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2164,42 +2164,42 @@ var ts;
|
|
|
2164
2164
|
function assertNever(member, message, stackCrawlMark) {
|
|
2165
2165
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2166
2166
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2167
|
-
return fail(message
|
|
2167
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2168
2168
|
}
|
|
2169
2169
|
Debug.assertNever = assertNever;
|
|
2170
2170
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2171
2171
|
if (shouldAssertFunction(1, "assertEachNode")) {
|
|
2172
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2172
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2173
2173
|
}
|
|
2174
2174
|
}
|
|
2175
2175
|
Debug.assertEachNode = assertEachNode;
|
|
2176
2176
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2177
2177
|
if (shouldAssertFunction(1, "assertNode")) {
|
|
2178
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2178
|
+
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);
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
2181
|
Debug.assertNode = assertNode;
|
|
2182
2182
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2183
2183
|
if (shouldAssertFunction(1, "assertNotNode")) {
|
|
2184
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2184
|
+
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);
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
2187
|
Debug.assertNotNode = assertNotNode;
|
|
2188
2188
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2189
2189
|
if (shouldAssertFunction(1, "assertOptionalNode")) {
|
|
2190
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2190
|
+
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);
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
2193
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2194
2194
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2195
2195
|
if (shouldAssertFunction(1, "assertOptionalToken")) {
|
|
2196
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2196
|
+
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);
|
|
2197
2197
|
}
|
|
2198
2198
|
}
|
|
2199
2199
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2200
2200
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2201
2201
|
if (shouldAssertFunction(1, "assertMissingNode")) {
|
|
2202
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2202
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2203
2203
|
}
|
|
2204
2204
|
}
|
|
2205
2205
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2220,7 +2220,7 @@ var ts;
|
|
|
2220
2220
|
}
|
|
2221
2221
|
Debug.getFunctionName = getFunctionName;
|
|
2222
2222
|
function formatSymbol(symbol) {
|
|
2223
|
-
return "{ name: "
|
|
2223
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2224
2224
|
}
|
|
2225
2225
|
Debug.formatSymbol = formatSymbol;
|
|
2226
2226
|
function formatEnum(value, enumObject, isFlags) {
|
|
@@ -2238,7 +2238,7 @@ var ts;
|
|
|
2238
2238
|
break;
|
|
2239
2239
|
}
|
|
2240
2240
|
if (enumValue !== 0 && enumValue & value) {
|
|
2241
|
-
result = ""
|
|
2241
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2242
2242
|
remainingFlags &= ~enumValue;
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
@@ -2347,7 +2347,7 @@ var ts;
|
|
|
2347
2347
|
this.flags & 1 ? "FlowUnreachable" :
|
|
2348
2348
|
"UnknownFlow";
|
|
2349
2349
|
var remainingFlags = this.flags & ~(2048 - 1);
|
|
2350
|
-
return ""
|
|
2350
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
2353
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, true); } },
|
|
@@ -2377,7 +2377,7 @@ var ts;
|
|
|
2377
2377
|
__tsDebuggerDisplay: {
|
|
2378
2378
|
value: function (defaultValue) {
|
|
2379
2379
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2380
|
-
return "NodeArray "
|
|
2380
|
+
return "NodeArray ".concat(defaultValue);
|
|
2381
2381
|
}
|
|
2382
2382
|
}
|
|
2383
2383
|
});
|
|
@@ -2423,7 +2423,7 @@ var ts;
|
|
|
2423
2423
|
var symbolHeader = this.flags & 33554432 ? "TransientSymbol" :
|
|
2424
2424
|
"Symbol";
|
|
2425
2425
|
var remainingSymbolFlags = this.flags & ~33554432;
|
|
2426
|
-
return symbolHeader
|
|
2426
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2427
2427
|
}
|
|
2428
2428
|
},
|
|
2429
2429
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2432,11 +2432,11 @@ var ts;
|
|
|
2432
2432
|
__tsDebuggerDisplay: {
|
|
2433
2433
|
value: function () {
|
|
2434
2434
|
var typeHeader = this.flags & 98304 ? "NullableType" :
|
|
2435
|
-
this.flags & 384 ? "LiteralType "
|
|
2436
|
-
this.flags & 2048 ? "LiteralType "
|
|
2435
|
+
this.flags & 384 ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2436
|
+
this.flags & 2048 ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2437
2437
|
this.flags & 8192 ? "UniqueESSymbolType" :
|
|
2438
2438
|
this.flags & 32 ? "EnumType" :
|
|
2439
|
-
this.flags & 67359327 ? "IntrinsicType "
|
|
2439
|
+
this.flags & 67359327 ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2440
2440
|
this.flags & 1048576 ? "UnionType" :
|
|
2441
2441
|
this.flags & 2097152 ? "IntersectionType" :
|
|
2442
2442
|
this.flags & 4194304 ? "IndexType" :
|
|
@@ -2455,7 +2455,7 @@ var ts;
|
|
|
2455
2455
|
"ObjectType" :
|
|
2456
2456
|
"Type";
|
|
2457
2457
|
var remainingObjectFlags = this.flags & 524288 ? this.objectFlags & ~1343 : 0;
|
|
2458
|
-
return ""
|
|
2458
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2459
2459
|
}
|
|
2460
2460
|
},
|
|
2461
2461
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2489,11 +2489,11 @@ var ts;
|
|
|
2489
2489
|
__tsDebuggerDisplay: {
|
|
2490
2490
|
value: function () {
|
|
2491
2491
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2492
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2493
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2494
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2495
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2496
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2492
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2493
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2494
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2495
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2496
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2497
2497
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2498
2498
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2499
2499
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -2525,7 +2525,7 @@ var ts;
|
|
|
2525
2525
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
2526
2526
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
2527
2527
|
formatSyntaxKind(this.kind);
|
|
2528
|
-
return ""
|
|
2528
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
2529
2529
|
}
|
|
2530
2530
|
},
|
|
2531
2531
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -2569,10 +2569,10 @@ var ts;
|
|
|
2569
2569
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
2570
2570
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
2571
2571
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
2572
|
-
deprecationMessage += "'"
|
|
2573
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
2574
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
2575
|
-
deprecationMessage += message ? " "
|
|
2572
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
2573
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
2574
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
2575
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
2576
2576
|
return deprecationMessage;
|
|
2577
2577
|
}
|
|
2578
2578
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -2669,11 +2669,11 @@ var ts;
|
|
|
2669
2669
|
}
|
|
2670
2670
|
};
|
|
2671
2671
|
Version.prototype.toString = function () {
|
|
2672
|
-
var result = this.major
|
|
2672
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
2673
2673
|
if (ts.some(this.prerelease))
|
|
2674
|
-
result += "-"
|
|
2674
|
+
result += "-".concat(this.prerelease.join("."));
|
|
2675
2675
|
if (ts.some(this.build))
|
|
2676
|
-
result += "+"
|
|
2676
|
+
result += "+".concat(this.build.join("."));
|
|
2677
2677
|
return result;
|
|
2678
2678
|
};
|
|
2679
2679
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -2895,7 +2895,7 @@ var ts;
|
|
|
2895
2895
|
return ts.map(comparators, formatComparator).join(" ");
|
|
2896
2896
|
}
|
|
2897
2897
|
function formatComparator(comparator) {
|
|
2898
|
-
return ""
|
|
2898
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
2899
2899
|
}
|
|
2900
2900
|
})(ts || (ts = {}));
|
|
2901
2901
|
var ts;
|
|
@@ -3124,7 +3124,7 @@ var ts;
|
|
|
3124
3124
|
fs = require("fs");
|
|
3125
3125
|
}
|
|
3126
3126
|
catch (e) {
|
|
3127
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
3127
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
3128
3128
|
}
|
|
3129
3129
|
}
|
|
3130
3130
|
mode = tracingMode;
|
|
@@ -3135,11 +3135,11 @@ var ts;
|
|
|
3135
3135
|
if (!fs.existsSync(traceDir)) {
|
|
3136
3136
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
3137
3137
|
}
|
|
3138
|
-
var countPart = mode === "build" ? "."
|
|
3139
|
-
: mode === "server" ? "."
|
|
3138
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
3139
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
3140
3140
|
: "";
|
|
3141
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
3142
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
3141
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
3142
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
3143
3143
|
legend.push({
|
|
3144
3144
|
configFilePath: configFilePath,
|
|
3145
3145
|
tracePath: tracePath,
|
|
@@ -3207,7 +3207,7 @@ var ts;
|
|
|
3207
3207
|
writeEvent("E", phase, name, args, undefined, endTime);
|
|
3208
3208
|
}
|
|
3209
3209
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3210
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3210
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3211
3211
|
}
|
|
3212
3212
|
}
|
|
3213
3213
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3215,11 +3215,11 @@ var ts;
|
|
|
3215
3215
|
if (mode === "server" && phase === "checkTypes")
|
|
3216
3216
|
return;
|
|
3217
3217
|
ts.performance.mark("beginTracing");
|
|
3218
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3218
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3219
3219
|
if (extras)
|
|
3220
|
-
fs.writeSync(traceFd, ","
|
|
3220
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3221
3221
|
if (args)
|
|
3222
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3222
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3223
3223
|
fs.writeSync(traceFd, "}");
|
|
3224
3224
|
ts.performance.mark("endTracing");
|
|
3225
3225
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -3546,7 +3546,7 @@ var ts;
|
|
|
3546
3546
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
3547
3547
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
3548
3548
|
function getLevel(envVar, level) {
|
|
3549
|
-
return system.getEnvironmentVariable(envVar
|
|
3549
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
3550
3550
|
}
|
|
3551
3551
|
function getCustomLevels(baseVariable) {
|
|
3552
3552
|
var customLevels;
|
|
@@ -3970,7 +3970,7 @@ var ts;
|
|
|
3970
3970
|
}
|
|
3971
3971
|
function onTimerToUpdateChildWatches() {
|
|
3972
3972
|
timerToUpdateChildWatches = undefined;
|
|
3973
|
-
sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
3973
|
+
sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
3974
3974
|
var start = ts.timestamp();
|
|
3975
3975
|
var invokeMap = new ts.Map();
|
|
3976
3976
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -3981,7 +3981,7 @@ var ts;
|
|
|
3981
3981
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
3982
3982
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
3983
3983
|
}
|
|
3984
|
-
sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
3984
|
+
sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
3985
3985
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
3986
3986
|
var existing = invokeMap.get(rootDirName);
|
|
3987
3987
|
if (existing) {
|
|
@@ -3997,7 +3997,7 @@ var ts;
|
|
|
3997
3997
|
}
|
|
3998
3998
|
});
|
|
3999
3999
|
var elapsed = ts.timestamp() - start;
|
|
4000
|
-
sysLog("sysLog:: Elapsed:: "
|
|
4000
|
+
sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
4001
4001
|
}
|
|
4002
4002
|
function removeChildWatches(parentWatcher) {
|
|
4003
4003
|
if (!parentWatcher)
|
|
@@ -4389,7 +4389,7 @@ var ts;
|
|
|
4389
4389
|
var externalFileCounter = 0;
|
|
4390
4390
|
var remappedPaths = new ts.Map();
|
|
4391
4391
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
4392
|
-
var fileUrlRoot = "file://"
|
|
4392
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
4393
4393
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
4394
4394
|
var node = _a[_i];
|
|
4395
4395
|
if (node.callFrame.url) {
|
|
@@ -4398,7 +4398,7 @@ var ts;
|
|
|
4398
4398
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), true);
|
|
4399
4399
|
}
|
|
4400
4400
|
else if (!nativePattern.test(url)) {
|
|
4401
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
4401
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
4402
4402
|
externalFileCounter++;
|
|
4403
4403
|
}
|
|
4404
4404
|
}
|
|
@@ -4414,7 +4414,7 @@ var ts;
|
|
|
4414
4414
|
if (!err) {
|
|
4415
4415
|
try {
|
|
4416
4416
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
4417
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
4417
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
4420
4420
|
catch (_c) {
|
|
@@ -4499,7 +4499,7 @@ var ts;
|
|
|
4499
4499
|
}
|
|
4500
4500
|
};
|
|
4501
4501
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4502
|
-
sysLog("sysLog:: "
|
|
4502
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
4503
4503
|
callback("rename", "");
|
|
4504
4504
|
if (watcher) {
|
|
4505
4505
|
watcher.close();
|
|
@@ -4516,7 +4516,7 @@ var ts;
|
|
|
4516
4516
|
}
|
|
4517
4517
|
}
|
|
4518
4518
|
if (hitSystemWatcherLimit) {
|
|
4519
|
-
sysLog("sysLog:: "
|
|
4519
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
4520
4520
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4521
4521
|
}
|
|
4522
4522
|
try {
|
|
@@ -4528,7 +4528,7 @@ var ts;
|
|
|
4528
4528
|
}
|
|
4529
4529
|
catch (e) {
|
|
4530
4530
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
4531
|
-
sysLog("sysLog:: "
|
|
4531
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
4532
4532
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
@@ -5593,6 +5593,8 @@ var ts;
|
|
|
5593
5593
|
Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
|
|
5594
5594
|
The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
|
|
5595
5595
|
The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
|
|
5596
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5597
|
+
The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
|
|
5596
5598
|
Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
|
|
5597
5599
|
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
5598
5600
|
Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
|
|
@@ -6182,6 +6184,7 @@ var ts;
|
|
|
6182
6184
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
6183
6185
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
6184
6186
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, ts.DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6187
|
+
Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, ts.DiagnosticCategory.Error, "Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6185
6188
|
The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6186
6189
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6187
6190
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -7236,7 +7239,7 @@ var ts;
|
|
|
7236
7239
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
7237
7240
|
}
|
|
7238
7241
|
else {
|
|
7239
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
7242
|
+
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"));
|
|
7240
7243
|
}
|
|
7241
7244
|
}
|
|
7242
7245
|
var res = lineStarts[line] + character;
|
|
@@ -9751,7 +9754,7 @@ var ts;
|
|
|
9751
9754
|
: "linkplain";
|
|
9752
9755
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9753
9756
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
9754
|
-
return "{@"
|
|
9757
|
+
return "{@".concat(kind, " ").concat(name).concat(space).concat(link.text, "}");
|
|
9755
9758
|
}
|
|
9756
9759
|
function getEffectiveTypeParameterDeclarations(node) {
|
|
9757
9760
|
if (ts.isJSDocSignature(node)) {
|
|
@@ -10850,11 +10853,11 @@ var ts;
|
|
|
10850
10853
|
}
|
|
10851
10854
|
function packageIdToPackageName(_a) {
|
|
10852
10855
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
10853
|
-
return subModuleName ? name
|
|
10856
|
+
return subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
10854
10857
|
}
|
|
10855
10858
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
10856
10859
|
function packageIdToString(packageId) {
|
|
10857
|
-
return packageIdToPackageName(packageId)
|
|
10860
|
+
return "".concat(packageIdToPackageName(packageId), "@").concat(packageId.version);
|
|
10858
10861
|
}
|
|
10859
10862
|
ts.packageIdToString = packageIdToString;
|
|
10860
10863
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -10931,7 +10934,7 @@ var ts;
|
|
|
10931
10934
|
function nodePosToString(node) {
|
|
10932
10935
|
var file = getSourceFileOfNode(node);
|
|
10933
10936
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
10934
|
-
return file.fileName
|
|
10937
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
10935
10938
|
}
|
|
10936
10939
|
ts.nodePosToString = nodePosToString;
|
|
10937
10940
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -11032,7 +11035,7 @@ var ts;
|
|
|
11032
11035
|
ts.isPinnedComment = isPinnedComment;
|
|
11033
11036
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
11034
11037
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
11035
|
-
""
|
|
11038
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
11036
11039
|
commentDirective,
|
|
11037
11040
|
]); }));
|
|
11038
11041
|
var usedLines = new ts.Map();
|
|
@@ -11049,10 +11052,10 @@ var ts;
|
|
|
11049
11052
|
});
|
|
11050
11053
|
}
|
|
11051
11054
|
function markUsed(line) {
|
|
11052
|
-
if (!directivesByLine.has(""
|
|
11055
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
11053
11056
|
return false;
|
|
11054
11057
|
}
|
|
11055
|
-
usedLines.set(""
|
|
11058
|
+
usedLines.set("".concat(line), true);
|
|
11056
11059
|
return true;
|
|
11057
11060
|
}
|
|
11058
11061
|
}
|
|
@@ -11251,7 +11254,7 @@ var ts;
|
|
|
11251
11254
|
}
|
|
11252
11255
|
return node.text;
|
|
11253
11256
|
}
|
|
11254
|
-
return ts.Debug.fail("Literal kind '"
|
|
11257
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
11255
11258
|
}
|
|
11256
11259
|
ts.getLiteralText = getLiteralText;
|
|
11257
11260
|
function canUseOriginalText(node, flags) {
|
|
@@ -13615,11 +13618,11 @@ var ts;
|
|
|
13615
13618
|
}
|
|
13616
13619
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
13617
13620
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
13618
|
-
return "__@"
|
|
13621
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
13619
13622
|
}
|
|
13620
13623
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
13621
13624
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
13622
|
-
return "__#"
|
|
13625
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
13623
13626
|
}
|
|
13624
13627
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
13625
13628
|
function isKnownSymbol(symbol) {
|
|
@@ -14050,6 +14053,10 @@ var ts;
|
|
|
14050
14053
|
return indentStrings[1].length;
|
|
14051
14054
|
}
|
|
14052
14055
|
ts.getIndentSize = getIndentSize;
|
|
14056
|
+
function isNightly() {
|
|
14057
|
+
return ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
14058
|
+
}
|
|
14059
|
+
ts.isNightly = isNightly;
|
|
14053
14060
|
function createTextWriter(newLine) {
|
|
14054
14061
|
var output;
|
|
14055
14062
|
var indent;
|
|
@@ -14276,6 +14283,13 @@ var ts;
|
|
|
14276
14283
|
".d.ts";
|
|
14277
14284
|
}
|
|
14278
14285
|
ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
|
|
14286
|
+
function getPossibleOriginalInputExtensionForExtension(path) {
|
|
14287
|
+
return ts.fileExtensionIsOneOf(path, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] :
|
|
14288
|
+
ts.fileExtensionIsOneOf(path, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] :
|
|
14289
|
+
ts.fileExtensionIsOneOf(path, [".json.d.ts"]) ? [".json"] :
|
|
14290
|
+
[".tsx", ".ts", ".jsx", ".js"];
|
|
14291
|
+
}
|
|
14292
|
+
ts.getPossibleOriginalInputExtensionForExtension = getPossibleOriginalInputExtensionForExtension;
|
|
14279
14293
|
function outFile(options) {
|
|
14280
14294
|
return options.outFile || options.out;
|
|
14281
14295
|
}
|
|
@@ -15995,7 +16009,7 @@ var ts;
|
|
|
15995
16009
|
}
|
|
15996
16010
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
15997
16011
|
function getJSXRuntimeImport(base, options) {
|
|
15998
|
-
return base ? base
|
|
16012
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
15999
16013
|
}
|
|
16000
16014
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
16001
16015
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -16093,15 +16107,15 @@ var ts;
|
|
|
16093
16107
|
}
|
|
16094
16108
|
var wildcardCharCodes = [42, 63];
|
|
16095
16109
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
16096
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
16110
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
16097
16111
|
var filesMatcher = {
|
|
16098
16112
|
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
|
|
16099
|
-
doubleAsteriskRegexFragment: "(/"
|
|
16113
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
16100
16114
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
16101
16115
|
};
|
|
16102
16116
|
var directoriesMatcher = {
|
|
16103
16117
|
singleAsteriskRegexFragment: "[^/]*",
|
|
16104
|
-
doubleAsteriskRegexFragment: "(/"
|
|
16118
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
16105
16119
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
16106
16120
|
};
|
|
16107
16121
|
var excludeMatcher = {
|
|
@@ -16119,9 +16133,9 @@ var ts;
|
|
|
16119
16133
|
if (!patterns || !patterns.length) {
|
|
16120
16134
|
return undefined;
|
|
16121
16135
|
}
|
|
16122
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
16136
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
16123
16137
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
16124
|
-
return "^("
|
|
16138
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
16125
16139
|
}
|
|
16126
16140
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
16127
16141
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -16139,7 +16153,7 @@ var ts;
|
|
|
16139
16153
|
ts.isImplicitGlob = isImplicitGlob;
|
|
16140
16154
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
16141
16155
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
16142
|
-
return pattern && "^("
|
|
16156
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
16143
16157
|
}
|
|
16144
16158
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
16145
16159
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -16205,7 +16219,7 @@ var ts;
|
|
|
16205
16219
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
16206
16220
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
16207
16221
|
return {
|
|
16208
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
16222
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
16209
16223
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
16210
16224
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
16211
16225
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -16451,7 +16465,7 @@ var ts;
|
|
|
16451
16465
|
ts.resolutionExtensionIsTSOrJson = resolutionExtensionIsTSOrJson;
|
|
16452
16466
|
function extensionFromPath(path) {
|
|
16453
16467
|
var ext = tryGetExtensionFromPath(path);
|
|
16454
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
16468
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
16455
16469
|
}
|
|
16456
16470
|
ts.extensionFromPath = extensionFromPath;
|
|
16457
16471
|
function isAnySupportedFileExtension(path) {
|
|
@@ -21690,7 +21704,7 @@ var ts;
|
|
|
21690
21704
|
case 328: return "augments";
|
|
21691
21705
|
case 329: return "implements";
|
|
21692
21706
|
default:
|
|
21693
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
21707
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
21694
21708
|
}
|
|
21695
21709
|
}
|
|
21696
21710
|
var rawTextScanner;
|
|
@@ -22017,7 +22031,7 @@ var ts;
|
|
|
22017
22031
|
};
|
|
22018
22032
|
var definedTextGetter_1 = function (path) {
|
|
22019
22033
|
var result = textGetter_1(path);
|
|
22020
|
-
return result !== undefined ? result : "/* Input file "
|
|
22034
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
22021
22035
|
};
|
|
22022
22036
|
var buildInfo_1;
|
|
22023
22037
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -25746,7 +25760,7 @@ var ts;
|
|
|
25746
25760
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
25747
25761
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
25748
25762
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
25749
|
-
return keyword
|
|
25763
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
25750
25764
|
}
|
|
25751
25765
|
}
|
|
25752
25766
|
return undefined;
|
|
@@ -26455,6 +26469,7 @@ var ts;
|
|
|
26455
26469
|
var startPos = scanner.getStartPos();
|
|
26456
26470
|
var result = parseListElement(kind, parseElement);
|
|
26457
26471
|
if (!result) {
|
|
26472
|
+
parsingContext = saveParsingContext;
|
|
26458
26473
|
return undefined;
|
|
26459
26474
|
}
|
|
26460
26475
|
list.push(result);
|
|
@@ -27680,6 +27695,9 @@ var ts;
|
|
|
27680
27695
|
return 1;
|
|
27681
27696
|
}
|
|
27682
27697
|
if (ts.isModifierKind(second) && second !== 131 && lookAhead(nextTokenIsIdentifier)) {
|
|
27698
|
+
if (lookAhead(function () { return nextToken() === 127; })) {
|
|
27699
|
+
return 0;
|
|
27700
|
+
}
|
|
27683
27701
|
return 1;
|
|
27684
27702
|
}
|
|
27685
27703
|
if (!isIdentifier() && second !== 108) {
|
|
@@ -31284,7 +31302,7 @@ var ts;
|
|
|
31284
31302
|
if (namedArgRegExCache.has(name)) {
|
|
31285
31303
|
return namedArgRegExCache.get(name);
|
|
31286
31304
|
}
|
|
31287
|
-
var result = new RegExp("(\\s"
|
|
31305
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
31288
31306
|
namedArgRegExCache.set(name, result);
|
|
31289
31307
|
return result;
|
|
31290
31308
|
}
|
|
@@ -31465,6 +31483,7 @@ var ts;
|
|
|
31465
31483
|
["es2021.intl", "lib.es2021.intl.d.ts"],
|
|
31466
31484
|
["es2022.array", "lib.es2022.array.d.ts"],
|
|
31467
31485
|
["es2022.error", "lib.es2022.error.d.ts"],
|
|
31486
|
+
["es2022.intl", "lib.es2022.intl.d.ts"],
|
|
31468
31487
|
["es2022.object", "lib.es2022.object.d.ts"],
|
|
31469
31488
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
31470
31489
|
["esnext.array", "lib.es2022.array.d.ts"],
|
|
@@ -32721,8 +32740,8 @@ var ts;
|
|
|
32721
32740
|
}
|
|
32722
32741
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
32723
32742
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
32724
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
32725
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
32743
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
32744
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
32726
32745
|
}
|
|
32727
32746
|
function parseCustomTypeOption(opt, value, errors) {
|
|
32728
32747
|
return convertJsonOptionOfCustomType(opt, ts.trimString(value || ""), errors);
|
|
@@ -33439,10 +33458,10 @@ var ts;
|
|
|
33439
33458
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
33440
33459
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
33441
33460
|
if (newValue !== defaultValue) {
|
|
33442
|
-
result.push(""
|
|
33461
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
33443
33462
|
}
|
|
33444
33463
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
33445
|
-
result.push(""
|
|
33464
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
33446
33465
|
}
|
|
33447
33466
|
});
|
|
33448
33467
|
return result.join(newLine) + newLine;
|
|
@@ -33480,19 +33499,19 @@ var ts;
|
|
|
33480
33499
|
if (entries.length !== 0) {
|
|
33481
33500
|
entries.push({ value: "" });
|
|
33482
33501
|
}
|
|
33483
|
-
entries.push({ value: "/* "
|
|
33502
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
33484
33503
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
33485
33504
|
var option = options_1[_i];
|
|
33486
33505
|
var optionName = void 0;
|
|
33487
33506
|
if (compilerOptionsMap.has(option.name)) {
|
|
33488
|
-
optionName = "\""
|
|
33507
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
33489
33508
|
}
|
|
33490
33509
|
else {
|
|
33491
|
-
optionName = "// \""
|
|
33510
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
33492
33511
|
}
|
|
33493
33512
|
entries.push({
|
|
33494
33513
|
value: optionName,
|
|
33495
|
-
description: "/* "
|
|
33514
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
33496
33515
|
});
|
|
33497
33516
|
marginLength = Math.max(optionName.length, marginLength);
|
|
33498
33517
|
}
|
|
@@ -33500,24 +33519,24 @@ var ts;
|
|
|
33500
33519
|
var tab = makePadding(2);
|
|
33501
33520
|
var result = [];
|
|
33502
33521
|
result.push("{");
|
|
33503
|
-
result.push(tab
|
|
33504
|
-
result.push(""
|
|
33522
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
33523
|
+
result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file), " */"));
|
|
33505
33524
|
result.push("");
|
|
33506
33525
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
33507
33526
|
var entry = entries_2[_a];
|
|
33508
33527
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
33509
|
-
result.push(value && ""
|
|
33528
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
33510
33529
|
}
|
|
33511
33530
|
if (fileNames.length) {
|
|
33512
|
-
result.push(tab
|
|
33513
|
-
result.push(tab
|
|
33531
|
+
result.push("".concat(tab, "},"));
|
|
33532
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
33514
33533
|
for (var i = 0; i < fileNames.length; i++) {
|
|
33515
|
-
result.push(""
|
|
33534
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
33516
33535
|
}
|
|
33517
|
-
result.push(tab
|
|
33536
|
+
result.push("".concat(tab, "]"));
|
|
33518
33537
|
}
|
|
33519
33538
|
else {
|
|
33520
|
-
result.push(tab
|
|
33539
|
+
result.push("".concat(tab, "}"));
|
|
33521
33540
|
}
|
|
33522
33541
|
result.push("}");
|
|
33523
33542
|
return result.join(newLine) + newLine;
|
|
@@ -33870,7 +33889,7 @@ var ts;
|
|
|
33870
33889
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
33871
33890
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
33872
33891
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
|
|
33873
|
-
extendedConfigPath = extendedConfigPath
|
|
33892
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
33874
33893
|
if (!host.fileExists(extendedConfigPath)) {
|
|
33875
33894
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
33876
33895
|
return undefined;
|
|
@@ -34066,7 +34085,7 @@ var ts;
|
|
|
34066
34085
|
if (ts.fileExtensionIs(file, ".json")) {
|
|
34067
34086
|
if (!jsonOnlyIncludeRegexes) {
|
|
34068
34087
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json"); });
|
|
34069
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
34088
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
34070
34089
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
34071
34090
|
}
|
|
34072
34091
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -34294,7 +34313,7 @@ var ts;
|
|
|
34294
34313
|
return true;
|
|
34295
34314
|
case "string":
|
|
34296
34315
|
var defaultValue = option.defaultValueDescription;
|
|
34297
|
-
return option.isFilePath ? "./"
|
|
34316
|
+
return option.isFilePath ? "./".concat(defaultValue && typeof defaultValue === "string" ? defaultValue : "") : "";
|
|
34298
34317
|
case "list":
|
|
34299
34318
|
return [];
|
|
34300
34319
|
case "object":
|
|
@@ -34356,7 +34375,7 @@ var ts;
|
|
|
34356
34375
|
ts.Debug.assert(ts.extensionIsTS(resolved.extension));
|
|
34357
34376
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
34358
34377
|
}
|
|
34359
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, resultFromCache) {
|
|
34378
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, diagnostics, resultFromCache) {
|
|
34360
34379
|
var _a;
|
|
34361
34380
|
if (resultFromCache) {
|
|
34362
34381
|
(_a = resultFromCache.failedLookupLocations).push.apply(_a, failedLookupLocations);
|
|
@@ -34364,7 +34383,8 @@ var ts;
|
|
|
34364
34383
|
}
|
|
34365
34384
|
return {
|
|
34366
34385
|
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? undefined : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport: isExternalLibraryImport, packageId: resolved.packageId },
|
|
34367
|
-
failedLookupLocations: failedLookupLocations
|
|
34386
|
+
failedLookupLocations: failedLookupLocations,
|
|
34387
|
+
resolutionDiagnostics: diagnostics
|
|
34368
34388
|
};
|
|
34369
34389
|
}
|
|
34370
34390
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
@@ -34440,7 +34460,7 @@ var ts;
|
|
|
34440
34460
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
34441
34461
|
if (typeof bestVersionPaths !== "object") {
|
|
34442
34462
|
if (state.traceEnabled) {
|
|
34443
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
34463
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
34444
34464
|
}
|
|
34445
34465
|
return;
|
|
34446
34466
|
}
|
|
@@ -34545,7 +34565,18 @@ var ts;
|
|
|
34545
34565
|
features |= NodeResolutionFeatures.EsmMode;
|
|
34546
34566
|
}
|
|
34547
34567
|
var conditions = features & NodeResolutionFeatures.Exports ? features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"] : [];
|
|
34548
|
-
var
|
|
34568
|
+
var diagnostics = [];
|
|
34569
|
+
var moduleResolutionState = {
|
|
34570
|
+
compilerOptions: options,
|
|
34571
|
+
host: host,
|
|
34572
|
+
traceEnabled: traceEnabled,
|
|
34573
|
+
failedLookupLocations: failedLookupLocations,
|
|
34574
|
+
packageJsonInfoCache: cache,
|
|
34575
|
+
features: features,
|
|
34576
|
+
conditions: conditions,
|
|
34577
|
+
requestContainingDirectory: containingDirectory,
|
|
34578
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
34579
|
+
};
|
|
34549
34580
|
var resolved = primaryLookup();
|
|
34550
34581
|
var primary = true;
|
|
34551
34582
|
if (!resolved) {
|
|
@@ -34564,7 +34595,7 @@ var ts;
|
|
|
34564
34595
|
isExternalLibraryImport: pathContainsNodeModules(fileName),
|
|
34565
34596
|
};
|
|
34566
34597
|
}
|
|
34567
|
-
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
|
|
34598
|
+
result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations, resolutionDiagnostics: diagnostics };
|
|
34568
34599
|
perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, resolutionMode, result);
|
|
34569
34600
|
if (traceEnabled)
|
|
34570
34601
|
traceResult(result);
|
|
@@ -34641,6 +34672,8 @@ var ts;
|
|
|
34641
34672
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
34642
34673
|
conditions: ts.emptyArray,
|
|
34643
34674
|
features: NodeResolutionFeatures.None,
|
|
34675
|
+
requestContainingDirectory: containingDirectory,
|
|
34676
|
+
reportDiagnostic: ts.noop
|
|
34644
34677
|
};
|
|
34645
34678
|
return ts.forEachAncestorDirectory(containingDirectory, function (ancestorDirectory) {
|
|
34646
34679
|
if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
@@ -34814,7 +34847,7 @@ var ts;
|
|
|
34814
34847
|
};
|
|
34815
34848
|
return cache;
|
|
34816
34849
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
34817
|
-
var result = mode === undefined ? specifier : mode
|
|
34850
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
34818
34851
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
34819
34852
|
return result;
|
|
34820
34853
|
}
|
|
@@ -34847,7 +34880,7 @@ var ts;
|
|
|
34847
34880
|
}
|
|
34848
34881
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
34849
34882
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
34850
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
34883
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
34851
34884
|
}
|
|
34852
34885
|
function createPerModuleNameCache() {
|
|
34853
34886
|
var directoryPathMap = new ts.Map();
|
|
@@ -34975,10 +35008,10 @@ var ts;
|
|
|
34975
35008
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
34976
35009
|
break;
|
|
34977
35010
|
default:
|
|
34978
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
35011
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
34979
35012
|
}
|
|
34980
35013
|
if (result && result.resolvedModule)
|
|
34981
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
35014
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
34982
35015
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
34983
35016
|
if (perFolderCache) {
|
|
34984
35017
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -35108,7 +35141,7 @@ var ts;
|
|
|
35108
35141
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
35109
35142
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
35110
35143
|
if (!resolvedModule) {
|
|
35111
|
-
throw new Error("Could not resolve JS module '"
|
|
35144
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
35112
35145
|
}
|
|
35113
35146
|
return resolvedModule.resolvedFileName;
|
|
35114
35147
|
}
|
|
@@ -35169,6 +35202,7 @@ var ts;
|
|
|
35169
35202
|
if (compilerOptions.noDtsResolution) {
|
|
35170
35203
|
conditions.pop();
|
|
35171
35204
|
}
|
|
35205
|
+
var diagnostics = [];
|
|
35172
35206
|
var state = {
|
|
35173
35207
|
compilerOptions: compilerOptions,
|
|
35174
35208
|
host: host,
|
|
@@ -35177,9 +35211,11 @@ var ts;
|
|
|
35177
35211
|
packageJsonInfoCache: cache,
|
|
35178
35212
|
features: features,
|
|
35179
35213
|
conditions: conditions,
|
|
35214
|
+
requestContainingDirectory: containingDirectory,
|
|
35215
|
+
reportDiagnostic: function (diag) { return void diagnostics.push(diag); },
|
|
35180
35216
|
};
|
|
35181
35217
|
var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
|
|
35182
|
-
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
|
35218
|
+
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
35183
35219
|
function tryResolve(extensions) {
|
|
35184
35220
|
var loader = function (extensions, candidate, onlyRecordFailures, state) { return nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, true); };
|
|
35185
35221
|
var resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state);
|
|
@@ -35232,7 +35268,7 @@ var ts;
|
|
|
35232
35268
|
if (traceEnabled) {
|
|
35233
35269
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
35234
35270
|
}
|
|
35235
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
35271
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
35236
35272
|
return real;
|
|
35237
35273
|
}
|
|
35238
35274
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -35321,9 +35357,9 @@ var ts;
|
|
|
35321
35357
|
}
|
|
35322
35358
|
}
|
|
35323
35359
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35324
|
-
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.
|
|
35360
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.fileExtensionIsOneOf(candidate, ts.supportedTSExtensionsFlat)) {
|
|
35325
35361
|
var result = tryFile(candidate, onlyRecordFailures, state);
|
|
35326
|
-
return result !== undefined ? { path: candidate, ext: ts.
|
|
35362
|
+
return result !== undefined ? { path: candidate, ext: ts.tryExtractTSExtension(candidate) } : undefined;
|
|
35327
35363
|
}
|
|
35328
35364
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35329
35365
|
}
|
|
@@ -35440,6 +35476,8 @@ var ts;
|
|
|
35440
35476
|
packageJsonInfoCache: cache === null || cache === void 0 ? void 0 : cache.getPackageJsonInfoCache(),
|
|
35441
35477
|
conditions: ["node", "require", "types"],
|
|
35442
35478
|
features: features,
|
|
35479
|
+
requestContainingDirectory: packageJsonInfo.packageDirectory,
|
|
35480
|
+
reportDiagnostic: ts.noop
|
|
35443
35481
|
};
|
|
35444
35482
|
var requireResolution = loadNodeModuleFromDirectoryWorker(extensions, packageJsonInfo.packageDirectory, false, requireState, packageJsonInfo.packageJsonContent, packageJsonInfo.versionPaths);
|
|
35445
35483
|
entrypoints = ts.append(entrypoints, requireResolution === null || requireResolution === void 0 ? void 0 : requireResolution.path);
|
|
@@ -35519,6 +35557,8 @@ var ts;
|
|
|
35519
35557
|
packageJsonInfoCache: packageJsonInfoCache,
|
|
35520
35558
|
features: 0,
|
|
35521
35559
|
conditions: [],
|
|
35560
|
+
requestContainingDirectory: undefined,
|
|
35561
|
+
reportDiagnostic: ts.noop
|
|
35522
35562
|
};
|
|
35523
35563
|
var parts = ts.getPathComponents(fileName);
|
|
35524
35564
|
parts.pop();
|
|
@@ -35687,7 +35727,7 @@ var ts;
|
|
|
35687
35727
|
return undefined;
|
|
35688
35728
|
}
|
|
35689
35729
|
var trailingParts = parts.slice(nameParts.length);
|
|
35690
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
35730
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
35691
35731
|
}
|
|
35692
35732
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
35693
35733
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -35793,7 +35833,6 @@ var ts;
|
|
|
35793
35833
|
function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
35794
35834
|
return loadModuleFromTargetImportOrExport;
|
|
35795
35835
|
function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
|
|
35796
|
-
var _a, _b;
|
|
35797
35836
|
if (typeof target === "string") {
|
|
35798
35837
|
if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
|
|
35799
35838
|
if (state.traceEnabled) {
|
|
@@ -35828,13 +35867,16 @@ var ts;
|
|
|
35828
35867
|
}
|
|
35829
35868
|
return toSearchResult(undefined);
|
|
35830
35869
|
}
|
|
35831
|
-
var finalPath =
|
|
35870
|
+
var finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
35871
|
+
var inputLink = tryLoadInputFileForPath(finalPath, subpath, ts.combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
35872
|
+
if (inputLink)
|
|
35873
|
+
return inputLink;
|
|
35832
35874
|
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, false, state)));
|
|
35833
35875
|
}
|
|
35834
35876
|
else if (typeof target === "object" && target !== null) {
|
|
35835
35877
|
if (!Array.isArray(target)) {
|
|
35836
|
-
for (var _i = 0,
|
|
35837
|
-
var key =
|
|
35878
|
+
for (var _i = 0, _a = ts.getOwnKeys(target); _i < _a.length; _i++) {
|
|
35879
|
+
var key = _a[_i];
|
|
35838
35880
|
if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
|
|
35839
35881
|
var subTarget = target[key];
|
|
35840
35882
|
var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
|
|
@@ -35852,8 +35894,8 @@ var ts;
|
|
|
35852
35894
|
}
|
|
35853
35895
|
return toSearchResult(undefined);
|
|
35854
35896
|
}
|
|
35855
|
-
for (var
|
|
35856
|
-
var elem = target_2[
|
|
35897
|
+
for (var _b = 0, target_2 = target; _b < target_2.length; _b++) {
|
|
35898
|
+
var elem = target_2[_b];
|
|
35857
35899
|
var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
|
|
35858
35900
|
if (result) {
|
|
35859
35901
|
return result;
|
|
@@ -35871,6 +35913,94 @@ var ts;
|
|
|
35871
35913
|
trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
|
|
35872
35914
|
}
|
|
35873
35915
|
return toSearchResult(undefined);
|
|
35916
|
+
function toAbsolutePath(path) {
|
|
35917
|
+
var _a, _b;
|
|
35918
|
+
if (path === undefined)
|
|
35919
|
+
return path;
|
|
35920
|
+
return ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames })(ts.getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)));
|
|
35921
|
+
}
|
|
35922
|
+
function combineDirectoryPath(root, dir) {
|
|
35923
|
+
return ts.ensureTrailingDirectorySeparator(ts.combinePaths(root, dir));
|
|
35924
|
+
}
|
|
35925
|
+
function useCaseSensitiveFileNames() {
|
|
35926
|
+
return !state.host.useCaseSensitiveFileNames ? true :
|
|
35927
|
+
typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames :
|
|
35928
|
+
state.host.useCaseSensitiveFileNames();
|
|
35929
|
+
}
|
|
35930
|
+
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports) {
|
|
35931
|
+
var _a, _b, _c, _d;
|
|
35932
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.JavaScript || extensions === Extensions.Json)
|
|
35933
|
+
&& (state.compilerOptions.declarationDir || state.compilerOptions.outDir)
|
|
35934
|
+
&& finalPath.indexOf("/node_modules/") === -1
|
|
35935
|
+
&& (state.compilerOptions.configFile ? ts.startsWith(toAbsolutePath(state.compilerOptions.configFile.fileName), scope.packageDirectory) : true)) {
|
|
35936
|
+
var getCanonicalFileName = ts.hostGetCanonicalFileName({ useCaseSensitiveFileNames: useCaseSensitiveFileNames });
|
|
35937
|
+
var commonSourceDirGuesses = [];
|
|
35938
|
+
if (state.compilerOptions.rootDir || (state.compilerOptions.composite && state.compilerOptions.configFilePath)) {
|
|
35939
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return []; }, ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "", getCanonicalFileName));
|
|
35940
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35941
|
+
}
|
|
35942
|
+
else if (state.requestContainingDirectory) {
|
|
35943
|
+
var requestingFile_1 = toAbsolutePath(ts.combinePaths(state.requestContainingDirectory, "index.ts"));
|
|
35944
|
+
var commonDir = toAbsolutePath(ts.getCommonSourceDirectory(state.compilerOptions, function () { return [requestingFile_1, toAbsolutePath(packagePath)]; }, ((_d = (_c = state.host).getCurrentDirectory) === null || _d === void 0 ? void 0 : _d.call(_c)) || "", getCanonicalFileName));
|
|
35945
|
+
commonSourceDirGuesses.push(commonDir);
|
|
35946
|
+
var fragment = ts.ensureTrailingDirectorySeparator(commonDir);
|
|
35947
|
+
while (fragment && fragment.length > 1) {
|
|
35948
|
+
var parts = ts.getPathComponents(fragment);
|
|
35949
|
+
parts.pop();
|
|
35950
|
+
var commonDir_1 = ts.getPathFromPathComponents(parts);
|
|
35951
|
+
commonSourceDirGuesses.unshift(commonDir_1);
|
|
35952
|
+
fragment = ts.ensureTrailingDirectorySeparator(commonDir_1);
|
|
35953
|
+
}
|
|
35954
|
+
}
|
|
35955
|
+
if (commonSourceDirGuesses.length > 1) {
|
|
35956
|
+
state.reportDiagnostic(ts.createCompilerDiagnostic(isImports
|
|
35957
|
+
? ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate
|
|
35958
|
+
: ts.Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, entry === "" ? "." : entry, packagePath));
|
|
35959
|
+
}
|
|
35960
|
+
for (var _i = 0, commonSourceDirGuesses_1 = commonSourceDirGuesses; _i < commonSourceDirGuesses_1.length; _i++) {
|
|
35961
|
+
var commonSourceDirGuess = commonSourceDirGuesses_1[_i];
|
|
35962
|
+
var candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess);
|
|
35963
|
+
for (var _e = 0, candidateDirectories_1 = candidateDirectories; _e < candidateDirectories_1.length; _e++) {
|
|
35964
|
+
var candidateDir = candidateDirectories_1[_e];
|
|
35965
|
+
if (ts.startsWith(finalPath, candidateDir)) {
|
|
35966
|
+
var pathFragment = finalPath.slice(candidateDir.length + 1);
|
|
35967
|
+
var possibleInputBase = ts.combinePaths(commonSourceDirGuess, pathFragment);
|
|
35968
|
+
var jsAndDtsExtensions = [".mjs", ".cjs", ".js", ".json", ".d.mts", ".d.cts", ".d.ts"];
|
|
35969
|
+
for (var _f = 0, jsAndDtsExtensions_1 = jsAndDtsExtensions; _f < jsAndDtsExtensions_1.length; _f++) {
|
|
35970
|
+
var ext = jsAndDtsExtensions_1[_f];
|
|
35971
|
+
if (ts.fileExtensionIs(possibleInputBase, ext)) {
|
|
35972
|
+
var inputExts = ts.getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
|
35973
|
+
for (var _g = 0, inputExts_1 = inputExts; _g < inputExts_1.length; _g++) {
|
|
35974
|
+
var possibleExt = inputExts_1[_g];
|
|
35975
|
+
var possibleInputWithInputExtension = ts.changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
35976
|
+
if ((extensions === Extensions.TypeScript && ts.hasJSFileExtension(possibleInputWithInputExtension)) ||
|
|
35977
|
+
(extensions === Extensions.JavaScript && ts.hasTSFileExtension(possibleInputWithInputExtension))) {
|
|
35978
|
+
continue;
|
|
35979
|
+
}
|
|
35980
|
+
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
35981
|
+
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, false, state)));
|
|
35982
|
+
}
|
|
35983
|
+
}
|
|
35984
|
+
}
|
|
35985
|
+
}
|
|
35986
|
+
}
|
|
35987
|
+
}
|
|
35988
|
+
}
|
|
35989
|
+
}
|
|
35990
|
+
return undefined;
|
|
35991
|
+
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {
|
|
35992
|
+
var _a, _b;
|
|
35993
|
+
var currentDir = state.compilerOptions.configFile ? ((_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a)) || "" : commonSourceDirGuess;
|
|
35994
|
+
var candidateDirectories = [];
|
|
35995
|
+
if (state.compilerOptions.declarationDir) {
|
|
35996
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir)));
|
|
35997
|
+
}
|
|
35998
|
+
if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) {
|
|
35999
|
+
candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir)));
|
|
36000
|
+
}
|
|
36001
|
+
return candidateDirectories;
|
|
36002
|
+
}
|
|
36003
|
+
}
|
|
35874
36004
|
}
|
|
35875
36005
|
}
|
|
35876
36006
|
function isApplicableVersionedTypesKey(conditions, key) {
|
|
@@ -36005,7 +36135,7 @@ var ts;
|
|
|
36005
36135
|
return mangled;
|
|
36006
36136
|
}
|
|
36007
36137
|
function getTypesPackageName(packageName) {
|
|
36008
|
-
return "@types/"
|
|
36138
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
36009
36139
|
}
|
|
36010
36140
|
ts.getTypesPackageName = getTypesPackageName;
|
|
36011
36141
|
function mangleScopedPackageName(packageName) {
|
|
@@ -36045,10 +36175,11 @@ var ts;
|
|
|
36045
36175
|
function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
|
|
36046
36176
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36047
36177
|
var failedLookupLocations = [];
|
|
36048
|
-
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
|
|
36049
36178
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
36179
|
+
var diagnostics = [];
|
|
36180
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: containingDirectory, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36050
36181
|
var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
|
|
36051
|
-
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
|
|
36182
|
+
return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36052
36183
|
function tryResolve(extensions) {
|
|
36053
36184
|
var resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state);
|
|
36054
36185
|
if (resolvedUsingSettings) {
|
|
@@ -36084,9 +36215,10 @@ var ts;
|
|
|
36084
36215
|
trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
|
|
36085
36216
|
}
|
|
36086
36217
|
var failedLookupLocations = [];
|
|
36087
|
-
var
|
|
36218
|
+
var diagnostics = [];
|
|
36219
|
+
var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [], requestContainingDirectory: undefined, reportDiagnostic: function (diag) { return void diagnostics.push(diag); } };
|
|
36088
36220
|
var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false, undefined, undefined);
|
|
36089
|
-
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
|
|
36221
|
+
return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, diagnostics, state.resultFromCache);
|
|
36090
36222
|
}
|
|
36091
36223
|
ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
|
|
36092
36224
|
function toSearchResult(value) {
|
|
@@ -36331,7 +36463,7 @@ var ts;
|
|
|
36331
36463
|
if (name) {
|
|
36332
36464
|
if (ts.isAmbientModule(node)) {
|
|
36333
36465
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
36334
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
36466
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
36335
36467
|
}
|
|
36336
36468
|
if (name.kind === 162) {
|
|
36337
36469
|
var nameExpression = name.expression;
|
|
@@ -36380,7 +36512,7 @@ var ts;
|
|
|
36380
36512
|
case 317:
|
|
36381
36513
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
36382
36514
|
case 164:
|
|
36383
|
-
ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: "
|
|
36515
|
+
ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: ".concat(ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind, ", expected JSDocFunctionType"); });
|
|
36384
36516
|
var functionType = node.parent;
|
|
36385
36517
|
var index = functionType.parameters.indexOf(node);
|
|
36386
36518
|
return "arg" + index;
|
|
@@ -36446,7 +36578,7 @@ var ts;
|
|
|
36446
36578
|
}
|
|
36447
36579
|
var relatedInformation_1 = [];
|
|
36448
36580
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1) && symbol.flags & (2097152 | 788968 | 1920)) {
|
|
36449
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
36581
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
36450
36582
|
}
|
|
36451
36583
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
36452
36584
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -38270,7 +38402,7 @@ var ts;
|
|
|
38270
38402
|
}
|
|
38271
38403
|
}
|
|
38272
38404
|
function bindSourceFileAsExternalModule() {
|
|
38273
|
-
bindAnonymousDeclaration(file, 512, "\""
|
|
38405
|
+
bindAnonymousDeclaration(file, 512, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
38274
38406
|
}
|
|
38275
38407
|
function bindExportAssignment(node) {
|
|
38276
38408
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -40009,7 +40141,7 @@ var ts;
|
|
|
40009
40141
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
40010
40142
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 ? sourceSymbolFile : targetSymbolFile;
|
|
40011
40143
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
40012
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
40144
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
40013
40145
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
40014
40146
|
});
|
|
40015
40147
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -42311,7 +42443,7 @@ var ts;
|
|
|
42311
42443
|
var links = getSymbolLinks(symbol);
|
|
42312
42444
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
42313
42445
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
42314
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
42446
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
42315
42447
|
if (cache.has(key)) {
|
|
42316
42448
|
return cache.get(key);
|
|
42317
42449
|
}
|
|
@@ -43115,7 +43247,7 @@ var ts;
|
|
|
43115
43247
|
context.symbolDepth = new ts.Map();
|
|
43116
43248
|
}
|
|
43117
43249
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
43118
|
-
var key = getTypeId(type)
|
|
43250
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
43119
43251
|
if (links) {
|
|
43120
43252
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
43121
43253
|
}
|
|
@@ -43376,7 +43508,7 @@ var ts;
|
|
|
43376
43508
|
}
|
|
43377
43509
|
}
|
|
43378
43510
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
43379
|
-
typeElements.push(ts.factory.createPropertySignature(undefined, "... "
|
|
43511
|
+
typeElements.push(ts.factory.createPropertySignature(undefined, "... ".concat(properties.length - i, " more ..."), undefined, undefined));
|
|
43380
43512
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
43381
43513
|
break;
|
|
43382
43514
|
}
|
|
@@ -43484,7 +43616,7 @@ var ts;
|
|
|
43484
43616
|
else if (types.length > 2) {
|
|
43485
43617
|
return [
|
|
43486
43618
|
typeToTypeNodeHelper(types[0], context),
|
|
43487
|
-
ts.factory.createTypeReferenceNode("... "
|
|
43619
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), undefined),
|
|
43488
43620
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
43489
43621
|
];
|
|
43490
43622
|
}
|
|
@@ -43497,7 +43629,7 @@ var ts;
|
|
|
43497
43629
|
var type = types_2[_i];
|
|
43498
43630
|
i++;
|
|
43499
43631
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
43500
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
43632
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), undefined));
|
|
43501
43633
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
43502
43634
|
if (typeNode_1) {
|
|
43503
43635
|
result_5.push(typeNode_1);
|
|
@@ -43854,7 +43986,7 @@ var ts;
|
|
|
43854
43986
|
}
|
|
43855
43987
|
return specifier;
|
|
43856
43988
|
function getSpecifierCacheKey(path, mode) {
|
|
43857
|
-
return mode === undefined ? path : mode
|
|
43989
|
+
return mode === undefined ? path : "".concat(mode, "|").concat(path);
|
|
43858
43990
|
}
|
|
43859
43991
|
}
|
|
43860
43992
|
function symbolToEntityNameNode(symbol) {
|
|
@@ -44018,7 +44150,7 @@ var ts;
|
|
|
44018
44150
|
var text = rawtext;
|
|
44019
44151
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
44020
44152
|
i++;
|
|
44021
|
-
text = rawtext
|
|
44153
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
44022
44154
|
}
|
|
44023
44155
|
if (text !== rawtext) {
|
|
44024
44156
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -44310,7 +44442,7 @@ var ts;
|
|
|
44310
44442
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
44311
44443
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
44312
44444
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
44313
|
-
: "arg"
|
|
44445
|
+
: "arg".concat(index);
|
|
44314
44446
|
}
|
|
44315
44447
|
function rewriteModuleSpecifier(parent, lit) {
|
|
44316
44448
|
if (bundled) {
|
|
@@ -45123,7 +45255,7 @@ var ts;
|
|
|
45123
45255
|
}
|
|
45124
45256
|
return results_1;
|
|
45125
45257
|
}
|
|
45126
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
45258
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
45127
45259
|
};
|
|
45128
45260
|
}
|
|
45129
45261
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -45193,7 +45325,7 @@ var ts;
|
|
|
45193
45325
|
if (ref) {
|
|
45194
45326
|
return ref;
|
|
45195
45327
|
}
|
|
45196
|
-
var tempName = getUnusedName(rootName
|
|
45328
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
45197
45329
|
var statement = ts.factory.createVariableStatement(undefined, ts.factory.createVariableDeclarationList([
|
|
45198
45330
|
ts.factory.createVariableDeclaration(tempName, undefined, typeToTypeNodeHelper(staticType, context))
|
|
45199
45331
|
], 2));
|
|
@@ -45238,7 +45370,7 @@ var ts;
|
|
|
45238
45370
|
var original = input;
|
|
45239
45371
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
45240
45372
|
i++;
|
|
45241
|
-
input = original
|
|
45373
|
+
input = "".concat(original, "_").concat(i);
|
|
45242
45374
|
}
|
|
45243
45375
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
45244
45376
|
if (id) {
|
|
@@ -45344,15 +45476,15 @@ var ts;
|
|
|
45344
45476
|
if (nameType.flags & 384) {
|
|
45345
45477
|
var name = "" + nameType.value;
|
|
45346
45478
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
45347
|
-
return "\""
|
|
45479
|
+
return "\"".concat(ts.escapeString(name, 34), "\"");
|
|
45348
45480
|
}
|
|
45349
45481
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
45350
|
-
return "["
|
|
45482
|
+
return "[".concat(name, "]");
|
|
45351
45483
|
}
|
|
45352
45484
|
return name;
|
|
45353
45485
|
}
|
|
45354
45486
|
if (nameType.flags & 8192) {
|
|
45355
|
-
return "["
|
|
45487
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
45356
45488
|
}
|
|
45357
45489
|
}
|
|
45358
45490
|
}
|
|
@@ -47769,7 +47901,7 @@ var ts;
|
|
|
47769
47901
|
!leftName ? rightName :
|
|
47770
47902
|
!rightName ? leftName :
|
|
47771
47903
|
undefined;
|
|
47772
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
47904
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
47773
47905
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
47774
47906
|
params[i] = paramSymbol;
|
|
47775
47907
|
}
|
|
@@ -47928,7 +48060,8 @@ var ts;
|
|
|
47928
48060
|
if (symbol === globalThisSymbol) {
|
|
47929
48061
|
var varsOnly_1 = new ts.Map();
|
|
47930
48062
|
members.forEach(function (p) {
|
|
47931
|
-
|
|
48063
|
+
var _a;
|
|
48064
|
+
if (!(p.flags & 418) && !(p.flags & 512 && ((_a = p.declarations) === null || _a === void 0 ? void 0 : _a.length) && ts.every(p.declarations, ts.isAmbientModule))) {
|
|
47932
48065
|
varsOnly_1.set(p.escapedName, p);
|
|
47933
48066
|
}
|
|
47934
48067
|
});
|
|
@@ -48570,9 +48703,9 @@ var ts;
|
|
|
48570
48703
|
t.flags & 2097152 ? getApparentTypeOfIntersectionType(t) :
|
|
48571
48704
|
t.flags & 402653316 ? globalStringType :
|
|
48572
48705
|
t.flags & 296 ? globalNumberType :
|
|
48573
|
-
t.flags & 2112 ? getGlobalBigIntType(
|
|
48706
|
+
t.flags & 2112 ? getGlobalBigIntType() :
|
|
48574
48707
|
t.flags & 528 ? globalBooleanType :
|
|
48575
|
-
t.flags & 12288 ? getGlobalESSymbolType(
|
|
48708
|
+
t.flags & 12288 ? getGlobalESSymbolType() :
|
|
48576
48709
|
t.flags & 67108864 ? emptyObjectType :
|
|
48577
48710
|
t.flags & 4194304 ? keyofConstraintType :
|
|
48578
48711
|
t.flags & 2 && !strictNullChecks ? emptyObjectType :
|
|
@@ -49494,7 +49627,7 @@ var ts;
|
|
|
49494
49627
|
return result;
|
|
49495
49628
|
}
|
|
49496
49629
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
49497
|
-
return aliasSymbol ? "@"
|
|
49630
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
49498
49631
|
}
|
|
49499
49632
|
function getPropagatingFlagsOfTypes(types, excludeKinds) {
|
|
49500
49633
|
var result = 0;
|
|
@@ -49657,7 +49790,7 @@ var ts;
|
|
|
49657
49790
|
return undefined;
|
|
49658
49791
|
}
|
|
49659
49792
|
function getSymbolPath(symbol) {
|
|
49660
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
49793
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
49661
49794
|
}
|
|
49662
49795
|
function getUnresolvedSymbolForEntityName(name) {
|
|
49663
49796
|
var identifier = name.kind === 161 ? name.right :
|
|
@@ -49668,7 +49801,7 @@ var ts;
|
|
|
49668
49801
|
var parentSymbol = name.kind === 161 ? getUnresolvedSymbolForEntityName(name.left) :
|
|
49669
49802
|
name.kind === 206 ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
49670
49803
|
undefined;
|
|
49671
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
49804
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
49672
49805
|
var result = unresolvedSymbols.get(path);
|
|
49673
49806
|
if (!result) {
|
|
49674
49807
|
unresolvedSymbols.set(path, result = createSymbol(524288, text, 1048576));
|
|
@@ -49734,7 +49867,7 @@ var ts;
|
|
|
49734
49867
|
if (substitute.flags & 3 || substitute === baseType) {
|
|
49735
49868
|
return baseType;
|
|
49736
49869
|
}
|
|
49737
|
-
var id = getTypeId(baseType)
|
|
49870
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
49738
49871
|
var cached = substitutionTypes.get(id);
|
|
49739
49872
|
if (cached) {
|
|
49740
49873
|
return cached;
|
|
@@ -49970,8 +50103,8 @@ var ts;
|
|
|
49970
50103
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
49971
50104
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
49972
50105
|
}
|
|
49973
|
-
function getGlobalESSymbolType(
|
|
49974
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0,
|
|
50106
|
+
function getGlobalESSymbolType() {
|
|
50107
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, false))) || emptyObjectType;
|
|
49975
50108
|
}
|
|
49976
50109
|
function getGlobalPromiseType(reportErrors) {
|
|
49977
50110
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors))) || emptyGenericType;
|
|
@@ -50032,8 +50165,8 @@ var ts;
|
|
|
50032
50165
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
50033
50166
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
50034
50167
|
}
|
|
50035
|
-
function getGlobalBigIntType(
|
|
50036
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0,
|
|
50168
|
+
function getGlobalBigIntType() {
|
|
50169
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
50037
50170
|
}
|
|
50038
50171
|
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
|
|
50039
50172
|
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
|
|
@@ -50593,9 +50726,9 @@ var ts;
|
|
|
50593
50726
|
return types[0];
|
|
50594
50727
|
}
|
|
50595
50728
|
var typeKey = !origin ? getTypeListId(types) :
|
|
50596
|
-
origin.flags & 1048576 ? "|"
|
|
50597
|
-
origin.flags & 2097152 ? "&"
|
|
50598
|
-
"#"
|
|
50729
|
+
origin.flags & 1048576 ? "|".concat(getTypeListId(origin.types)) :
|
|
50730
|
+
origin.flags & 2097152 ? "&".concat(getTypeListId(origin.types)) :
|
|
50731
|
+
"#".concat(origin.type.id, "|").concat(getTypeListId(types));
|
|
50599
50732
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
50600
50733
|
var type = unionTypes.get(id);
|
|
50601
50734
|
if (!type) {
|
|
@@ -51053,7 +51186,7 @@ var ts;
|
|
|
51053
51186
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4); })) {
|
|
51054
51187
|
return stringType;
|
|
51055
51188
|
}
|
|
51056
|
-
var id = getTypeListId(newTypes)
|
|
51189
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
51057
51190
|
var type = templateLiteralTypes.get(id);
|
|
51058
51191
|
if (!type) {
|
|
51059
51192
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -51124,7 +51257,7 @@ var ts;
|
|
|
51124
51257
|
return str;
|
|
51125
51258
|
}
|
|
51126
51259
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
51127
|
-
var id = getSymbolId(symbol)
|
|
51260
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
51128
51261
|
var result = stringMappingTypes.get(id);
|
|
51129
51262
|
if (!result) {
|
|
51130
51263
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -52062,7 +52195,7 @@ var ts;
|
|
|
52062
52195
|
function createUniqueESSymbolType(symbol) {
|
|
52063
52196
|
var type = createType(8192);
|
|
52064
52197
|
type.symbol = symbol;
|
|
52065
|
-
type.escapedName = "__@"
|
|
52198
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
52066
52199
|
return type;
|
|
52067
52200
|
}
|
|
52068
52201
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -53591,20 +53724,20 @@ var ts;
|
|
|
53591
53724
|
switch (msg.code) {
|
|
53592
53725
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
53593
53726
|
if (path.indexOf("new ") === 0) {
|
|
53594
|
-
path = "("
|
|
53727
|
+
path = "(".concat(path, ")");
|
|
53595
53728
|
}
|
|
53596
53729
|
var str = "" + args[0];
|
|
53597
53730
|
if (path.length === 0) {
|
|
53598
|
-
path = ""
|
|
53731
|
+
path = "".concat(str);
|
|
53599
53732
|
}
|
|
53600
53733
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
53601
|
-
path = path
|
|
53734
|
+
path = "".concat(path, ".").concat(str);
|
|
53602
53735
|
}
|
|
53603
53736
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
53604
|
-
path = ""
|
|
53737
|
+
path = "".concat(path).concat(str);
|
|
53605
53738
|
}
|
|
53606
53739
|
else {
|
|
53607
|
-
path = path
|
|
53740
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
53608
53741
|
}
|
|
53609
53742
|
break;
|
|
53610
53743
|
}
|
|
@@ -53631,7 +53764,7 @@ var ts;
|
|
|
53631
53764
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
53632
53765
|
? ""
|
|
53633
53766
|
: "...";
|
|
53634
|
-
path = ""
|
|
53767
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
53635
53768
|
}
|
|
53636
53769
|
break;
|
|
53637
53770
|
}
|
|
@@ -53644,7 +53777,7 @@ var ts;
|
|
|
53644
53777
|
break;
|
|
53645
53778
|
}
|
|
53646
53779
|
default:
|
|
53647
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
53780
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
53648
53781
|
}
|
|
53649
53782
|
}
|
|
53650
53783
|
if (path) {
|
|
@@ -53739,7 +53872,7 @@ var ts;
|
|
|
53739
53872
|
if ((globalStringType === source && stringType === target) ||
|
|
53740
53873
|
(globalNumberType === source && numberType === target) ||
|
|
53741
53874
|
(globalBooleanType === source && booleanType === target) ||
|
|
53742
|
-
(getGlobalESSymbolType(
|
|
53875
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
53743
53876
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
53744
53877
|
}
|
|
53745
53878
|
}
|
|
@@ -55537,7 +55670,7 @@ var ts;
|
|
|
55537
55670
|
var constraintMarker = "";
|
|
55538
55671
|
var sourceId = getTypeReferenceId(source, 0);
|
|
55539
55672
|
var targetId = getTypeReferenceId(target, 0);
|
|
55540
|
-
return ""
|
|
55673
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
55541
55674
|
function getTypeReferenceId(type, depth) {
|
|
55542
55675
|
if (depth === void 0) { depth = 0; }
|
|
55543
55676
|
var result = "" + type.target.id;
|
|
@@ -55573,7 +55706,7 @@ var ts;
|
|
|
55573
55706
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
55574
55707
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
55575
55708
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
55576
|
-
source.id
|
|
55709
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
55577
55710
|
}
|
|
55578
55711
|
function forEachProperty(prop, callback) {
|
|
55579
55712
|
if (ts.getCheckFlags(prop) & 6) {
|
|
@@ -57420,10 +57553,10 @@ var ts;
|
|
|
57420
57553
|
case 79:
|
|
57421
57554
|
if (!ts.isThisInTypeQuery(node)) {
|
|
57422
57555
|
var symbol = getResolvedSymbol(node);
|
|
57423
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
57556
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
57424
57557
|
}
|
|
57425
57558
|
case 108:
|
|
57426
|
-
return "0|"
|
|
57559
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
57427
57560
|
case 230:
|
|
57428
57561
|
case 212:
|
|
57429
57562
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -60784,7 +60917,7 @@ var ts;
|
|
|
60784
60917
|
!leftName ? rightName :
|
|
60785
60918
|
!rightName ? leftName :
|
|
60786
60919
|
undefined;
|
|
60787
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
60920
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
60788
60921
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
60789
60922
|
params[i] = paramSymbol;
|
|
60790
60923
|
}
|
|
@@ -68981,7 +69114,7 @@ var ts;
|
|
|
68981
69114
|
if (ts.isIdentifier(childNode)) {
|
|
68982
69115
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
68983
69116
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
68984
|
-
if (ts.isIdentifier(expr)) {
|
|
69117
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
68985
69118
|
return true;
|
|
68986
69119
|
}
|
|
68987
69120
|
var testedExpression = testedNode.parent;
|
|
@@ -69434,7 +69567,7 @@ var ts;
|
|
|
69434
69567
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
69435
69568
|
var ctorType = getGlobalESSymbolConstructorSymbol(false);
|
|
69436
69569
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
69437
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
69570
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
69438
69571
|
}
|
|
69439
69572
|
function getIterationTypesOfIterableSlow(type, resolver, errorNode) {
|
|
69440
69573
|
var _a;
|
|
@@ -71083,6 +71216,9 @@ var ts;
|
|
|
71083
71216
|
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
71084
71217
|
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
71085
71218
|
if (validForTypeAssertions && override) {
|
|
71219
|
+
if (!ts.isNightly()) {
|
|
71220
|
+
grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
|
|
71221
|
+
}
|
|
71086
71222
|
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
71087
71223
|
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
71088
71224
|
}
|
|
@@ -72289,7 +72425,7 @@ var ts;
|
|
|
72289
72425
|
}
|
|
72290
72426
|
if (ts.isDeclaration(node)) {
|
|
72291
72427
|
var symbol = getSymbolOfNode(node);
|
|
72292
|
-
return getTypeOfSymbol(symbol);
|
|
72428
|
+
return symbol ? getTypeOfSymbol(symbol) : errorType;
|
|
72293
72429
|
}
|
|
72294
72430
|
if (isDeclarationNameOrImportPropertyName(node)) {
|
|
72295
72431
|
var symbol = getSymbolAtLocation(node);
|
|
@@ -75837,7 +75973,7 @@ var ts;
|
|
|
75837
75973
|
value >= 52 && value < 62 ? 48 + value - 52 :
|
|
75838
75974
|
value === 62 ? 43 :
|
|
75839
75975
|
value === 63 ? 47 :
|
|
75840
|
-
ts.Debug.fail(value
|
|
75976
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
75841
75977
|
}
|
|
75842
75978
|
function base64FormatDecode(ch) {
|
|
75843
75979
|
return ch >= 65 && ch <= 90 ? ch - 65 :
|
|
@@ -75910,7 +76046,7 @@ var ts;
|
|
|
75910
76046
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
75911
76047
|
if (decoder.error !== undefined) {
|
|
75912
76048
|
if (host.log) {
|
|
75913
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
76049
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
75914
76050
|
}
|
|
75915
76051
|
decodedMappings = ts.emptyArray;
|
|
75916
76052
|
}
|
|
@@ -78359,7 +78495,7 @@ var ts;
|
|
|
78359
78495
|
var substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue);
|
|
78360
78496
|
if (!compilerOptions.removeComments) {
|
|
78361
78497
|
var originalNode = ts.getOriginalNode(node, ts.isAccessExpression);
|
|
78362
|
-
ts.addSyntheticTrailingComment(substitute, 3, " "
|
|
78498
|
+
ts.addSyntheticTrailingComment(substitute, 3, " ".concat(safeMultiLineComment(ts.getTextOfNode(originalNode)), " "));
|
|
78363
78499
|
}
|
|
78364
78500
|
return substitute;
|
|
78365
78501
|
}
|
|
@@ -79610,8 +79746,8 @@ var ts;
|
|
|
79610
79746
|
}
|
|
79611
79747
|
function createHoistedVariableForClass(name, node) {
|
|
79612
79748
|
var className = getPrivateIdentifierEnvironment().className;
|
|
79613
|
-
var prefix = className ? "_"
|
|
79614
|
-
var identifier = factory.createUniqueName(prefix
|
|
79749
|
+
var prefix = className ? "_".concat(className) : "";
|
|
79750
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16);
|
|
79615
79751
|
if (resolver.getNodeCheckFlags(node) & 524288) {
|
|
79616
79752
|
addBlockScopedVariable(identifier);
|
|
79617
79753
|
}
|
|
@@ -81269,7 +81405,7 @@ var ts;
|
|
|
81269
81405
|
specifierSourceImports = new ts.Map();
|
|
81270
81406
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
81271
81407
|
}
|
|
81272
|
-
var generatedName = factory.createUniqueName("_"
|
|
81408
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 | 32 | 64);
|
|
81273
81409
|
var specifier = factory.createImportSpecifier(false, factory.createIdentifier(name), generatedName);
|
|
81274
81410
|
generatedName.generatedImportReference = specifier;
|
|
81275
81411
|
specifierSourceImports.set(name, specifier);
|
|
@@ -82210,11 +82346,11 @@ var ts;
|
|
|
82210
82346
|
}
|
|
82211
82347
|
else {
|
|
82212
82348
|
if (node.kind === 246) {
|
|
82213
|
-
labelMarker = "break-"
|
|
82349
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
82214
82350
|
setLabeledJump(convertedLoopState, true, ts.idText(label), labelMarker);
|
|
82215
82351
|
}
|
|
82216
82352
|
else {
|
|
82217
|
-
labelMarker = "continue-"
|
|
82353
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
82218
82354
|
setLabeledJump(convertedLoopState, false, ts.idText(label), labelMarker);
|
|
82219
82355
|
}
|
|
82220
82356
|
}
|
|
@@ -87869,7 +88005,7 @@ var ts;
|
|
|
87869
88005
|
return getTypeAliasDeclarationVisibilityError;
|
|
87870
88006
|
}
|
|
87871
88007
|
else {
|
|
87872
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
88008
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
87873
88009
|
}
|
|
87874
88010
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
87875
88011
|
if (node.kind === 254 || node.kind === 203) {
|
|
@@ -88066,7 +88202,7 @@ var ts;
|
|
|
88066
88202
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
88067
88203
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
88068
88204
|
default:
|
|
88069
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
88205
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
88070
88206
|
}
|
|
88071
88207
|
}
|
|
88072
88208
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -88732,29 +88868,39 @@ var ts;
|
|
|
88732
88868
|
}
|
|
88733
88869
|
function transformImportDeclaration(decl) {
|
|
88734
88870
|
if (!decl.importClause) {
|
|
88735
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88871
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88736
88872
|
}
|
|
88737
88873
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
88738
88874
|
if (!decl.importClause.namedBindings) {
|
|
88739
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88875
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88740
88876
|
}
|
|
88741
88877
|
if (decl.importClause.namedBindings.kind === 268) {
|
|
88742
88878
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
88743
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88879
|
+
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined;
|
|
88744
88880
|
}
|
|
88745
88881
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
88746
88882
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
88747
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88883
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88748
88884
|
}
|
|
88749
88885
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
88750
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88886
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88751
88887
|
}
|
|
88752
88888
|
}
|
|
88889
|
+
function getResolutionModeOverrideForClauseInNightly(assertClause) {
|
|
88890
|
+
var mode = ts.getResolutionModeOverrideForClause(assertClause);
|
|
88891
|
+
if (mode !== undefined) {
|
|
88892
|
+
if (!ts.isNightly()) {
|
|
88893
|
+
context.addDiagnostic(ts.createDiagnosticForNode(assertClause, ts.Diagnostics.Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
|
88894
|
+
}
|
|
88895
|
+
return assertClause;
|
|
88896
|
+
}
|
|
88897
|
+
return undefined;
|
|
88898
|
+
}
|
|
88753
88899
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
88754
88900
|
while (ts.length(lateMarkedStatements)) {
|
|
88755
88901
|
var i = lateMarkedStatements.shift();
|
|
88756
88902
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
88757
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
88903
|
+
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));
|
|
88758
88904
|
}
|
|
88759
88905
|
var priorNeedsDeclare = needsDeclare;
|
|
88760
88906
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -88919,7 +89065,7 @@ var ts;
|
|
|
88919
89065
|
return cleanup(input);
|
|
88920
89066
|
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.assertions, input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
88921
89067
|
}
|
|
88922
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
89068
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
88923
89069
|
}
|
|
88924
89070
|
}
|
|
88925
89071
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -89169,7 +89315,7 @@ var ts;
|
|
|
89169
89315
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
89170
89316
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
89171
89317
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
89172
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
89318
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16);
|
|
89173
89319
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
89174
89320
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
89175
89321
|
errorNode: extendsClause_1,
|
|
@@ -89206,7 +89352,7 @@ var ts;
|
|
|
89206
89352
|
}))));
|
|
89207
89353
|
}
|
|
89208
89354
|
}
|
|
89209
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
89355
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
89210
89356
|
function cleanup(node) {
|
|
89211
89357
|
if (isEnclosingDeclaration(input)) {
|
|
89212
89358
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -89975,13 +90121,13 @@ var ts;
|
|
|
89975
90121
|
if (ts.fileExtensionIs(inputFileName, ".json"))
|
|
89976
90122
|
return;
|
|
89977
90123
|
if (js && configFile.options.sourceMap) {
|
|
89978
|
-
addOutput(js
|
|
90124
|
+
addOutput("".concat(js, ".map"));
|
|
89979
90125
|
}
|
|
89980
90126
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
89981
90127
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
89982
90128
|
addOutput(dts);
|
|
89983
90129
|
if (configFile.options.declarationMap) {
|
|
89984
|
-
addOutput(dts
|
|
90130
|
+
addOutput("".concat(dts, ".map"));
|
|
89985
90131
|
}
|
|
89986
90132
|
}
|
|
89987
90133
|
}
|
|
@@ -90041,7 +90187,7 @@ var ts;
|
|
|
90041
90187
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
90042
90188
|
if (ts.outFile(configFile.options)) {
|
|
90043
90189
|
var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath;
|
|
90044
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
90190
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
90045
90191
|
}
|
|
90046
90192
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
90047
90193
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -90060,7 +90206,7 @@ var ts;
|
|
|
90060
90206
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
90061
90207
|
if (buildInfoPath)
|
|
90062
90208
|
return buildInfoPath;
|
|
90063
|
-
return ts.Debug.fail("project "
|
|
90209
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
90064
90210
|
}
|
|
90065
90211
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
90066
90212
|
function emitFiles(resolver, host, targetSourceFile, _a, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
|
|
@@ -90272,7 +90418,7 @@ var ts;
|
|
|
90272
90418
|
if (!writer.isAtStartOfLine())
|
|
90273
90419
|
writer.rawWrite(newLine);
|
|
90274
90420
|
sourceMapUrlPos = writer.getTextPos();
|
|
90275
|
-
writer.writeComment("//# "
|
|
90421
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL));
|
|
90276
90422
|
}
|
|
90277
90423
|
if (sourceMapFilePath) {
|
|
90278
90424
|
var sourceMap = sourceMapGenerator.toString();
|
|
@@ -90312,7 +90458,7 @@ var ts;
|
|
|
90312
90458
|
if (mapOptions.inlineSourceMap) {
|
|
90313
90459
|
var sourceMapText = sourceMapGenerator.toString();
|
|
90314
90460
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
90315
|
-
return "data:application/json;base64,"
|
|
90461
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
90316
90462
|
}
|
|
90317
90463
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
90318
90464
|
if (mapOptions.mapRoot) {
|
|
@@ -90476,7 +90622,7 @@ var ts;
|
|
|
90476
90622
|
return;
|
|
90477
90623
|
break;
|
|
90478
90624
|
default:
|
|
90479
|
-
ts.Debug.fail("Unexpected path: "
|
|
90625
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
90480
90626
|
}
|
|
90481
90627
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
90482
90628
|
},
|
|
@@ -91289,7 +91435,7 @@ var ts;
|
|
|
91289
91435
|
return writeTokenNode(node, writeKeyword);
|
|
91290
91436
|
if (ts.isTokenKind(node.kind))
|
|
91291
91437
|
return writeTokenNode(node, writePunctuation);
|
|
91292
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
91438
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
91293
91439
|
}
|
|
91294
91440
|
function emitMappedTypeParameter(node) {
|
|
91295
91441
|
emit(node.name);
|
|
@@ -91429,14 +91575,14 @@ var ts;
|
|
|
91429
91575
|
}
|
|
91430
91576
|
}
|
|
91431
91577
|
function emitPlaceholder(hint, node, snippet) {
|
|
91432
|
-
nonEscapingWrite("${"
|
|
91578
|
+
nonEscapingWrite("${".concat(snippet.order, ":"));
|
|
91433
91579
|
pipelineEmitWithHintWorker(hint, node, false);
|
|
91434
91580
|
nonEscapingWrite("}");
|
|
91435
91581
|
}
|
|
91436
91582
|
function emitTabStop(hint, node, snippet) {
|
|
91437
|
-
ts.Debug.assert(node.kind === 236, "A tab stop cannot be attached to a node of kind "
|
|
91583
|
+
ts.Debug.assert(node.kind === 236, "A tab stop cannot be attached to a node of kind ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
91438
91584
|
ts.Debug.assert(hint !== 5, "A tab stop cannot be attached to an embedded statement.");
|
|
91439
|
-
nonEscapingWrite("$"
|
|
91585
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
91440
91586
|
}
|
|
91441
91587
|
function emitIdentifier(node) {
|
|
91442
91588
|
var writeText = node.symbol ? writeSymbol : write;
|
|
@@ -93113,17 +93259,17 @@ var ts;
|
|
|
93113
93259
|
writeLine();
|
|
93114
93260
|
}
|
|
93115
93261
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
93116
|
-
writeComment("/// <amd-module name=\""
|
|
93262
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
93117
93263
|
writeLine();
|
|
93118
93264
|
}
|
|
93119
93265
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
93120
93266
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
93121
93267
|
var dep = _b[_a];
|
|
93122
93268
|
if (dep.name) {
|
|
93123
|
-
writeComment("/// <amd-dependency name=\""
|
|
93269
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
93124
93270
|
}
|
|
93125
93271
|
else {
|
|
93126
|
-
writeComment("/// <amd-dependency path=\""
|
|
93272
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
93127
93273
|
}
|
|
93128
93274
|
writeLine();
|
|
93129
93275
|
}
|
|
@@ -93131,7 +93277,7 @@ var ts;
|
|
|
93131
93277
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
93132
93278
|
var directive = files_2[_c];
|
|
93133
93279
|
var pos = writer.getTextPos();
|
|
93134
|
-
writeComment("/// <reference path=\""
|
|
93280
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
93135
93281
|
if (bundleFileInfo)
|
|
93136
93282
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
93137
93283
|
writeLine();
|
|
@@ -93140,9 +93286,9 @@ var ts;
|
|
|
93140
93286
|
var directive = types_24[_d];
|
|
93141
93287
|
var pos = writer.getTextPos();
|
|
93142
93288
|
var resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile === null || currentSourceFile === void 0 ? void 0 : currentSourceFile.impliedNodeFormat)
|
|
93143
|
-
? "resolution-mode=\""
|
|
93289
|
+
? "resolution-mode=\"".concat(directive.resolutionMode === ts.ModuleKind.ESNext ? "import" : "require", "\"")
|
|
93144
93290
|
: "";
|
|
93145
|
-
writeComment("/// <reference types=\""
|
|
93291
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" ").concat(resolutionMode, "/>"));
|
|
93146
93292
|
if (bundleFileInfo)
|
|
93147
93293
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: !directive.resolutionMode ? "type" : directive.resolutionMode === ts.ModuleKind.ESNext ? "type-import" : "type-require", data: directive.fileName });
|
|
93148
93294
|
writeLine();
|
|
@@ -93150,7 +93296,7 @@ var ts;
|
|
|
93150
93296
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
93151
93297
|
var directive = libs_1[_e];
|
|
93152
93298
|
var pos = writer.getTextPos();
|
|
93153
|
-
writeComment("/// <reference lib=\""
|
|
93299
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
93154
93300
|
if (bundleFileInfo)
|
|
93155
93301
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib", data: directive.fileName });
|
|
93156
93302
|
writeLine();
|
|
@@ -93852,9 +93998,9 @@ var ts;
|
|
|
93852
93998
|
var textSourceNode = node.textSourceNode;
|
|
93853
93999
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
93854
94000
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
93855
|
-
return jsxAttributeEscape ? "\""
|
|
93856
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\""
|
|
93857
|
-
"\""
|
|
94001
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
94002
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
94003
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
93858
94004
|
}
|
|
93859
94005
|
else {
|
|
93860
94006
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -94257,8 +94403,8 @@ var ts;
|
|
|
94257
94403
|
}
|
|
94258
94404
|
function formatSynthesizedComment(comment) {
|
|
94259
94405
|
return comment.kind === 3
|
|
94260
|
-
? "/*"
|
|
94261
|
-
: "//"
|
|
94406
|
+
? "/*".concat(comment.text, "*/")
|
|
94407
|
+
: "//".concat(comment.text);
|
|
94262
94408
|
}
|
|
94263
94409
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
94264
94410
|
enterComment();
|
|
@@ -94892,18 +95038,18 @@ var ts;
|
|
|
94892
95038
|
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;
|
|
94893
95039
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
94894
95040
|
if (!newPath) {
|
|
94895
|
-
writeLog("Project: "
|
|
95041
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
94896
95042
|
return true;
|
|
94897
95043
|
}
|
|
94898
95044
|
fileOrDirectoryPath = newPath;
|
|
94899
95045
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
94900
95046
|
return false;
|
|
94901
95047
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
94902
|
-
writeLog("Project: "
|
|
95048
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
94903
95049
|
return true;
|
|
94904
95050
|
}
|
|
94905
95051
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
94906
|
-
writeLog("Project: "
|
|
95052
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
94907
95053
|
return true;
|
|
94908
95054
|
}
|
|
94909
95055
|
if (!program)
|
|
@@ -94922,7 +95068,7 @@ var ts;
|
|
|
94922
95068
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
94923
95069
|
if (hasSourceFile((filePathWithoutExtension + ".ts")) ||
|
|
94924
95070
|
hasSourceFile((filePathWithoutExtension + ".tsx"))) {
|
|
94925
|
-
writeLog("Project: "
|
|
95071
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
94926
95072
|
return true;
|
|
94927
95073
|
}
|
|
94928
95074
|
return false;
|
|
@@ -94990,36 +95136,36 @@ var ts;
|
|
|
94990
95136
|
host.useCaseSensitiveFileNames();
|
|
94991
95137
|
}
|
|
94992
95138
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
94993
|
-
log("ExcludeWatcher:: Added:: "
|
|
95139
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
94994
95140
|
return {
|
|
94995
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
95141
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
94996
95142
|
};
|
|
94997
95143
|
}
|
|
94998
95144
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
94999
|
-
log("FileWatcher:: Added:: "
|
|
95145
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
95000
95146
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
95001
95147
|
return {
|
|
95002
95148
|
close: function () {
|
|
95003
|
-
log("FileWatcher:: Close:: "
|
|
95149
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
95004
95150
|
watcher.close();
|
|
95005
95151
|
}
|
|
95006
95152
|
};
|
|
95007
95153
|
}
|
|
95008
95154
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
95009
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
95155
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
95010
95156
|
log(watchInfo);
|
|
95011
95157
|
var start = ts.timestamp();
|
|
95012
95158
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
95013
95159
|
var elapsed = ts.timestamp() - start;
|
|
95014
|
-
log("Elapsed:: "
|
|
95160
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
95015
95161
|
return {
|
|
95016
95162
|
close: function () {
|
|
95017
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
95163
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
95018
95164
|
log(watchInfo);
|
|
95019
95165
|
var start = ts.timestamp();
|
|
95020
95166
|
watcher.close();
|
|
95021
95167
|
var elapsed = ts.timestamp() - start;
|
|
95022
|
-
log("Elapsed:: "
|
|
95168
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
95023
95169
|
}
|
|
95024
95170
|
};
|
|
95025
95171
|
}
|
|
@@ -95029,16 +95175,16 @@ var ts;
|
|
|
95029
95175
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
95030
95176
|
args[_i] = arguments[_i];
|
|
95031
95177
|
}
|
|
95032
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
95178
|
+
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));
|
|
95033
95179
|
log(triggerredInfo);
|
|
95034
95180
|
var start = ts.timestamp();
|
|
95035
95181
|
cb.call.apply(cb, __spreadArray([undefined], args, false));
|
|
95036
95182
|
var elapsed = ts.timestamp() - start;
|
|
95037
|
-
log("Elapsed:: "
|
|
95183
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
95038
95184
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
95039
95185
|
}
|
|
95040
95186
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
95041
|
-
return "WatchInfo: "
|
|
95187
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
95042
95188
|
}
|
|
95043
95189
|
}
|
|
95044
95190
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -95332,12 +95478,12 @@ var ts;
|
|
|
95332
95478
|
}
|
|
95333
95479
|
ts.formatDiagnostics = formatDiagnostics;
|
|
95334
95480
|
function formatDiagnostic(diagnostic, host) {
|
|
95335
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
95481
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
95336
95482
|
if (diagnostic.file) {
|
|
95337
95483
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
|
|
95338
95484
|
var fileName = diagnostic.file.fileName;
|
|
95339
95485
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
95340
|
-
return relativeFileName
|
|
95486
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
95341
95487
|
}
|
|
95342
95488
|
return errorMessage;
|
|
95343
95489
|
}
|
|
@@ -95415,9 +95561,9 @@ var ts;
|
|
|
95415
95561
|
var output = "";
|
|
95416
95562
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
95417
95563
|
output += ":";
|
|
95418
|
-
output += color(""
|
|
95564
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
95419
95565
|
output += ":";
|
|
95420
|
-
output += color(""
|
|
95566
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
95421
95567
|
return output;
|
|
95422
95568
|
}
|
|
95423
95569
|
ts.formatLocation = formatLocation;
|
|
@@ -95431,7 +95577,7 @@ var ts;
|
|
|
95431
95577
|
output += " - ";
|
|
95432
95578
|
}
|
|
95433
95579
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
95434
|
-
output += formatColorAndReset(" TS"
|
|
95580
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
95435
95581
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
95436
95582
|
if (diagnostic.file) {
|
|
95437
95583
|
output += host.getNewLine();
|
|
@@ -95492,7 +95638,7 @@ var ts;
|
|
|
95492
95638
|
var result = void 0;
|
|
95493
95639
|
var mode = getModeForFileReference(name, containingFileMode);
|
|
95494
95640
|
var strName = ts.isString(name) ? name : name.fileName.toLowerCase();
|
|
95495
|
-
var cacheKey = mode !== undefined ? mode
|
|
95641
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(strName) : strName;
|
|
95496
95642
|
if (cache.has(cacheKey)) {
|
|
95497
95643
|
result = cache.get(cacheKey);
|
|
95498
95644
|
}
|
|
@@ -95587,7 +95733,7 @@ var ts;
|
|
|
95587
95733
|
var result = void 0;
|
|
95588
95734
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
95589
95735
|
i++;
|
|
95590
|
-
var cacheKey = mode !== undefined ? mode
|
|
95736
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
95591
95737
|
if (cache.has(cacheKey)) {
|
|
95592
95738
|
result = cache.get(cacheKey);
|
|
95593
95739
|
}
|
|
@@ -95781,7 +95927,6 @@ var ts;
|
|
|
95781
95927
|
ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer.code,
|
|
95782
95928
|
ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code,
|
|
95783
95929
|
ts.Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code,
|
|
95784
|
-
ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body.code,
|
|
95785
95930
|
ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
|
95786
95931
|
ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
|
95787
95932
|
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
|
@@ -96120,6 +96265,34 @@ var ts;
|
|
|
96120
96265
|
ts.performance.measure("Program", "beforeProgram", "afterProgram");
|
|
96121
96266
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96122
96267
|
return program;
|
|
96268
|
+
function addResolutionDiagnostics(list) {
|
|
96269
|
+
if (!list)
|
|
96270
|
+
return;
|
|
96271
|
+
for (var _i = 0, list_3 = list; _i < list_3.length; _i++) {
|
|
96272
|
+
var elem = list_3[_i];
|
|
96273
|
+
programDiagnostics.add(elem);
|
|
96274
|
+
}
|
|
96275
|
+
}
|
|
96276
|
+
function pullDiagnosticsFromCache(names, containingFile) {
|
|
96277
|
+
var _a;
|
|
96278
|
+
if (!moduleResolutionCache)
|
|
96279
|
+
return;
|
|
96280
|
+
var containingFileName = ts.getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
|
96281
|
+
var containingFileMode = !ts.isString(containingFile) ? containingFile.impliedNodeFormat : undefined;
|
|
96282
|
+
var containingDir = ts.getDirectoryPath(containingFileName);
|
|
96283
|
+
var redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
96284
|
+
var i = 0;
|
|
96285
|
+
for (var _i = 0, names_4 = names; _i < names_4.length; _i++) {
|
|
96286
|
+
var n = names_4[_i];
|
|
96287
|
+
var mode = typeof n === "string" ? getModeForResolutionAtIndex(containingFile, i) : getModeForFileReference(n, containingFileMode);
|
|
96288
|
+
var name = typeof n === "string" ? n : n.fileName;
|
|
96289
|
+
i++;
|
|
96290
|
+
if (ts.isExternalModuleNameRelative(name))
|
|
96291
|
+
continue;
|
|
96292
|
+
var diags = (_a = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) === null || _a === void 0 ? void 0 : _a.resolutionDiagnostics;
|
|
96293
|
+
addResolutionDiagnostics(diags);
|
|
96294
|
+
}
|
|
96295
|
+
}
|
|
96123
96296
|
function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
|
|
96124
96297
|
if (!moduleNames.length)
|
|
96125
96298
|
return ts.emptyArray;
|
|
@@ -96131,6 +96304,7 @@ var ts;
|
|
|
96131
96304
|
ts.performance.mark("afterResolveModule");
|
|
96132
96305
|
ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
96133
96306
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
|
|
96307
|
+
pullDiagnosticsFromCache(moduleNames, containingFile);
|
|
96134
96308
|
return result;
|
|
96135
96309
|
}
|
|
96136
96310
|
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile) {
|
|
@@ -97475,7 +97649,7 @@ var ts;
|
|
|
97475
97649
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
97476
97650
|
i++;
|
|
97477
97651
|
}
|
|
97478
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
97652
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
97479
97653
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
97480
97654
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
97481
97655
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -98229,10 +98403,10 @@ var ts;
|
|
|
98229
98403
|
}
|
|
98230
98404
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
98231
98405
|
var dirPath = host.toPath(dir);
|
|
98232
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
98406
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
98233
98407
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
98234
98408
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
98235
|
-
ts.startsWith(dirPath, declDirPath
|
|
98409
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
98236
98410
|
}
|
|
98237
98411
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
98238
98412
|
var _a;
|
|
@@ -98280,7 +98454,7 @@ var ts;
|
|
|
98280
98454
|
var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));
|
|
98281
98455
|
if (isFile && result) {
|
|
98282
98456
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
98283
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
98457
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
98284
98458
|
}
|
|
98285
98459
|
return result;
|
|
98286
98460
|
}) || false;
|
|
@@ -98658,7 +98832,7 @@ var ts;
|
|
|
98658
98832
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
98659
98833
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98660
98834
|
if (firstDts_1) {
|
|
98661
|
-
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: "
|
|
98835
|
+
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "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; }))); });
|
|
98662
98836
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98663
98837
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98664
98838
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -99050,7 +99224,7 @@ var ts;
|
|
|
99050
99224
|
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99051
99225
|
return;
|
|
99052
99226
|
}
|
|
99053
|
-
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: "
|
|
99227
|
+
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));
|
|
99054
99228
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99055
99229
|
return;
|
|
99056
99230
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -99933,8 +100107,8 @@ var ts;
|
|
|
99933
100107
|
!!redirectedReference;
|
|
99934
100108
|
var seenNamesInFile = ts.createModeAwareCache();
|
|
99935
100109
|
var i = 0;
|
|
99936
|
-
for (var _i = 0,
|
|
99937
|
-
var entry =
|
|
100110
|
+
for (var _i = 0, names_5 = names; _i < names_5.length; _i++) {
|
|
100111
|
+
var entry = names_5[_i];
|
|
99938
100112
|
var name = ts.isString(entry) ? entry : entry.fileName.toLowerCase();
|
|
99939
100113
|
var mode = !ts.isString(entry) ? ts.getModeForFileReference(entry, containingSourceFileMode) :
|
|
99940
100114
|
containingSourceFile ? ts.getModeForResolutionAtIndex(containingSourceFile, i) : undefined;
|
|
@@ -100068,7 +100242,7 @@ var ts;
|
|
|
100068
100242
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
100069
100243
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
100070
100244
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
100071
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
100245
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
100072
100246
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
100073
100247
|
return {
|
|
100074
100248
|
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator),
|
|
@@ -100460,14 +100634,14 @@ var ts;
|
|
|
100460
100634
|
if (options === void 0) { options = {}; }
|
|
100461
100635
|
var info = getInfo(importingSourceFile.path, host);
|
|
100462
100636
|
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
100463
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
100637
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, true, options.overrideImportMode); });
|
|
100464
100638
|
}
|
|
100465
100639
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
100466
100640
|
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
100467
100641
|
if (options === void 0) { options = {}; }
|
|
100468
100642
|
var info = getInfo(importingSourceFileName, host);
|
|
100469
100643
|
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
100470
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
100644
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode); }) ||
|
|
100471
100645
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
100472
100646
|
}
|
|
100473
100647
|
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
@@ -100533,7 +100707,7 @@ var ts;
|
|
|
100533
100707
|
var relativeSpecifiers;
|
|
100534
100708
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
100535
100709
|
var modulePath = modulePaths_1[_i];
|
|
100536
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
100710
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode);
|
|
100537
100711
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
100538
100712
|
if (specifier && modulePath.isRedirect) {
|
|
100539
100713
|
return nodeModulesSpecifiers;
|
|
@@ -100864,7 +101038,7 @@ var ts;
|
|
|
100864
101038
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
100865
101039
|
: ts.removeFileExtension(relativePath);
|
|
100866
101040
|
}
|
|
100867
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
101041
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
100868
101042
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
100869
101043
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
100870
101044
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -100877,8 +101051,9 @@ var ts;
|
|
|
100877
101051
|
var moduleSpecifier = path;
|
|
100878
101052
|
var isPackageRootPath = false;
|
|
100879
101053
|
if (!packageNameOnly) {
|
|
101054
|
+
var preferences = getPreferences(host, userPreferences, options, importingSourceFile);
|
|
100880
101055
|
var packageRootIndex = parts.packageRootIndex;
|
|
100881
|
-
var
|
|
101056
|
+
var moduleFileName = void 0;
|
|
100882
101057
|
while (true) {
|
|
100883
101058
|
var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath, blockedByExports = _c.blockedByExports, verbatimFromExports = _c.verbatimFromExports;
|
|
100884
101059
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Classic) {
|
|
@@ -100894,11 +101069,11 @@ var ts;
|
|
|
100894
101069
|
isPackageRootPath = true;
|
|
100895
101070
|
break;
|
|
100896
101071
|
}
|
|
100897
|
-
if (!
|
|
100898
|
-
|
|
101072
|
+
if (!moduleFileName)
|
|
101073
|
+
moduleFileName = moduleFileToTry;
|
|
100899
101074
|
packageRootIndex = path.indexOf(ts.directorySeparator, packageRootIndex + 1);
|
|
100900
101075
|
if (packageRootIndex === -1) {
|
|
100901
|
-
moduleSpecifier =
|
|
101076
|
+
moduleSpecifier = removeExtensionAndIndexPostFix(moduleFileName, preferences.ending, options, host);
|
|
100902
101077
|
break;
|
|
100903
101078
|
}
|
|
100904
101079
|
}
|
|
@@ -100947,7 +101122,7 @@ var ts;
|
|
|
100947
101122
|
moduleFileToTry = ts.combinePaths(packageRootPath, fromPaths);
|
|
100948
101123
|
}
|
|
100949
101124
|
}
|
|
100950
|
-
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main;
|
|
101125
|
+
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js";
|
|
100951
101126
|
if (ts.isString(mainFileRelative)) {
|
|
100952
101127
|
var mainExportFile = ts.toPath(mainFileRelative, packageRootPath, getCanonicalFileName);
|
|
100953
101128
|
if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(getCanonicalFileName(moduleFileToTry))) {
|
|
@@ -100955,14 +101130,13 @@ var ts;
|
|
|
100955
101130
|
}
|
|
100956
101131
|
}
|
|
100957
101132
|
}
|
|
100958
|
-
|
|
100959
|
-
|
|
100960
|
-
|
|
100961
|
-
|
|
100962
|
-
|
|
100963
|
-
return fullModulePathWithoutExtension.substring(0, parts.fileNameIndex);
|
|
101133
|
+
else {
|
|
101134
|
+
var fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));
|
|
101135
|
+
if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") {
|
|
101136
|
+
return { moduleFileToTry: moduleFileToTry, packageRootPath: packageRootPath };
|
|
101137
|
+
}
|
|
100964
101138
|
}
|
|
100965
|
-
return
|
|
101139
|
+
return { moduleFileToTry: moduleFileToTry };
|
|
100966
101140
|
}
|
|
100967
101141
|
}
|
|
100968
101142
|
function tryGetAnyFileFromPath(host, path) {
|
|
@@ -100983,15 +101157,21 @@ var ts;
|
|
|
100983
101157
|
return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
|
|
100984
101158
|
});
|
|
100985
101159
|
}
|
|
100986
|
-
function removeExtensionAndIndexPostFix(fileName, ending, options) {
|
|
101160
|
+
function removeExtensionAndIndexPostFix(fileName, ending, options, host) {
|
|
100987
101161
|
if (ts.fileExtensionIsOneOf(fileName, [".json", ".mjs", ".cjs"]))
|
|
100988
101162
|
return fileName;
|
|
100989
101163
|
var noExtension = ts.removeFileExtension(fileName);
|
|
101164
|
+
if (fileName === noExtension)
|
|
101165
|
+
return fileName;
|
|
100990
101166
|
if (ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".d.cts", ".cts"]))
|
|
100991
101167
|
return noExtension + getJSExtensionForFile(fileName, options);
|
|
100992
101168
|
switch (ending) {
|
|
100993
101169
|
case 0:
|
|
100994
|
-
|
|
101170
|
+
var withoutIndex = ts.removeSuffix(noExtension, "/index");
|
|
101171
|
+
if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {
|
|
101172
|
+
return noExtension;
|
|
101173
|
+
}
|
|
101174
|
+
return withoutIndex;
|
|
100995
101175
|
case 1:
|
|
100996
101176
|
return noExtension;
|
|
100997
101177
|
case 2:
|
|
@@ -101002,7 +101182,7 @@ var ts;
|
|
|
101002
101182
|
}
|
|
101003
101183
|
function getJSExtensionForFile(fileName, options) {
|
|
101004
101184
|
var _a;
|
|
101005
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
101185
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
101006
101186
|
}
|
|
101007
101187
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
101008
101188
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -101092,8 +101272,8 @@ var ts;
|
|
|
101092
101272
|
return pretty ?
|
|
101093
101273
|
function (diagnostic, newLine, options) {
|
|
101094
101274
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
101095
|
-
var output = "["
|
|
101096
|
-
output += ""
|
|
101275
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
101276
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
101097
101277
|
system.write(output);
|
|
101098
101278
|
} :
|
|
101099
101279
|
function (diagnostic, newLine, options) {
|
|
@@ -101101,8 +101281,8 @@ var ts;
|
|
|
101101
101281
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
101102
101282
|
output += newLine;
|
|
101103
101283
|
}
|
|
101104
|
-
output += getLocaleTimeString(system)
|
|
101105
|
-
output += ""
|
|
101284
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
101285
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
101106
101286
|
system.write(output);
|
|
101107
101287
|
};
|
|
101108
101288
|
}
|
|
@@ -101124,7 +101304,7 @@ var ts;
|
|
|
101124
101304
|
.map(function (errorDiagnostic) {
|
|
101125
101305
|
if (errorDiagnostic.file === undefined)
|
|
101126
101306
|
return;
|
|
101127
|
-
return ""
|
|
101307
|
+
return "".concat(errorDiagnostic.file.fileName);
|
|
101128
101308
|
});
|
|
101129
101309
|
return filesInError.map(function (fileName) {
|
|
101130
101310
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -101157,7 +101337,7 @@ var ts;
|
|
|
101157
101337
|
if (errorCount === 0)
|
|
101158
101338
|
return "";
|
|
101159
101339
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
101160
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName
|
|
101340
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return "".concat(fileInError.fileName, ":").concat(fileInError.line); })
|
|
101161
101341
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
101162
101342
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
101163
101343
|
var d = errorCount === 1 ?
|
|
@@ -101170,7 +101350,7 @@ var ts;
|
|
|
101170
101350
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
101171
101351
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
101172
101352
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
101173
|
-
return ""
|
|
101353
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine).concat(suffix);
|
|
101174
101354
|
}
|
|
101175
101355
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
101176
101356
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -101193,7 +101373,7 @@ var ts;
|
|
|
101193
101373
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
101194
101374
|
: "";
|
|
101195
101375
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
101196
|
-
tabularData += ""
|
|
101376
|
+
tabularData += "".concat(leftPadding).concat(errorCount, " ").concat(fileRef, "\n");
|
|
101197
101377
|
});
|
|
101198
101378
|
return tabularData;
|
|
101199
101379
|
}
|
|
@@ -101220,9 +101400,9 @@ var ts;
|
|
|
101220
101400
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
101221
101401
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
101222
101402
|
var file = _c[_i];
|
|
101223
|
-
write(""
|
|
101224
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
101225
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
101403
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
101404
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
101405
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
101226
101406
|
}
|
|
101227
101407
|
}
|
|
101228
101408
|
ts.explainFiles = explainFiles;
|
|
@@ -101260,7 +101440,7 @@ var ts;
|
|
|
101260
101440
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json"))
|
|
101261
101441
|
return false;
|
|
101262
101442
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
101263
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
101443
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
101264
101444
|
});
|
|
101265
101445
|
}
|
|
101266
101446
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -101269,7 +101449,7 @@ var ts;
|
|
|
101269
101449
|
var options = program.getCompilerOptions();
|
|
101270
101450
|
if (ts.isReferencedFile(reason)) {
|
|
101271
101451
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
101272
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
101452
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
101273
101453
|
var message = void 0;
|
|
101274
101454
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
101275
101455
|
switch (reason.kind) {
|
|
@@ -101380,7 +101560,7 @@ var ts;
|
|
|
101380
101560
|
var currentDir_1 = program.getCurrentDirectory();
|
|
101381
101561
|
ts.forEach(emittedFiles, function (file) {
|
|
101382
101562
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
101383
|
-
write("TSFILE: "
|
|
101563
|
+
write("TSFILE: ".concat(filepath));
|
|
101384
101564
|
});
|
|
101385
101565
|
listFiles(program, write);
|
|
101386
101566
|
}
|
|
@@ -101690,7 +101870,7 @@ var ts;
|
|
|
101690
101870
|
}
|
|
101691
101871
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
101692
101872
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
101693
|
-
writeLog("Current directory: "
|
|
101873
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
101694
101874
|
var configFileWatcher;
|
|
101695
101875
|
if (configFileName) {
|
|
101696
101876
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -101837,10 +102017,10 @@ var ts;
|
|
|
101837
102017
|
}
|
|
101838
102018
|
function createNewProgram(hasInvalidatedResolution) {
|
|
101839
102019
|
writeLog("CreatingProgramWith::");
|
|
101840
|
-
writeLog(" roots: "
|
|
101841
|
-
writeLog(" options: "
|
|
102020
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
102021
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
101842
102022
|
if (projectReferences)
|
|
101843
|
-
writeLog(" projectReferences: "
|
|
102023
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
101844
102024
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
101845
102025
|
hasChangedCompilerOptions = false;
|
|
101846
102026
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -101982,7 +102162,7 @@ var ts;
|
|
|
101982
102162
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
101983
102163
|
}
|
|
101984
102164
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
101985
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
102165
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
101986
102166
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
101987
102167
|
}
|
|
101988
102168
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -102038,7 +102218,7 @@ var ts;
|
|
|
102038
102218
|
synchronizeProgram();
|
|
102039
102219
|
}
|
|
102040
102220
|
function reloadConfigFile() {
|
|
102041
|
-
writeLog("Reloading config file: "
|
|
102221
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
102042
102222
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
102043
102223
|
if (cachedDirectoryStructureHost) {
|
|
102044
102224
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -102076,7 +102256,7 @@ var ts;
|
|
|
102076
102256
|
return config.parsedCommandLine;
|
|
102077
102257
|
}
|
|
102078
102258
|
}
|
|
102079
|
-
writeLog("Loading config file: "
|
|
102259
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
102080
102260
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
102081
102261
|
host.getParsedCommandLine(configFileName) :
|
|
102082
102262
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -102326,8 +102506,8 @@ var ts;
|
|
|
102326
102506
|
ts.getBuildOrderFromAnyBuildOrder = getBuildOrderFromAnyBuildOrder;
|
|
102327
102507
|
function createBuilderStatusReporter(system, pretty) {
|
|
102328
102508
|
return function (diagnostic) {
|
|
102329
|
-
var output = pretty ? "["
|
|
102330
|
-
output += ""
|
|
102509
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
102510
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
102331
102511
|
system.write(output);
|
|
102332
102512
|
};
|
|
102333
102513
|
}
|
|
@@ -103070,7 +103250,7 @@ var ts;
|
|
|
103070
103250
|
function listEmittedFile(_a, proj, file) {
|
|
103071
103251
|
var write = _a.write;
|
|
103072
103252
|
if (write && proj.options.listEmittedFiles) {
|
|
103073
|
-
write("TSFILE: "
|
|
103253
|
+
write("TSFILE: ".concat(file));
|
|
103074
103254
|
}
|
|
103075
103255
|
}
|
|
103076
103256
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -103099,7 +103279,7 @@ var ts;
|
|
|
103099
103279
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103100
103280
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103101
103281
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103102
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
103282
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
103103
103283
|
if (canEmitBuildInfo)
|
|
103104
103284
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
103105
103285
|
afterProgramDone(state, program, config);
|
|
@@ -103125,7 +103305,7 @@ var ts;
|
|
|
103125
103305
|
if (!host.fileExists(inputFile)) {
|
|
103126
103306
|
return {
|
|
103127
103307
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
103128
|
-
reason: inputFile
|
|
103308
|
+
reason: "".concat(inputFile, " does not exist")
|
|
103129
103309
|
};
|
|
103130
103310
|
}
|
|
103131
103311
|
if (!force) {
|
|
@@ -103450,7 +103630,7 @@ var ts;
|
|
|
103450
103630
|
}
|
|
103451
103631
|
}
|
|
103452
103632
|
if (filesToDelete) {
|
|
103453
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
103633
|
+
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(""));
|
|
103454
103634
|
}
|
|
103455
103635
|
return ts.ExitStatus.Success;
|
|
103456
103636
|
}
|
|
@@ -103800,7 +103980,7 @@ var ts;
|
|
|
103800
103980
|
};
|
|
103801
103981
|
}
|
|
103802
103982
|
function bold(str) {
|
|
103803
|
-
return "\u001B[1m"
|
|
103983
|
+
return "\u001B[1m".concat(str, "\u001B[22m");
|
|
103804
103984
|
}
|
|
103805
103985
|
var isWindows = sys.getEnvironmentVariable("OS") && ts.stringContains(sys.getEnvironmentVariable("OS").toLowerCase(), "windows");
|
|
103806
103986
|
var isWindowsTerminal = sys.getEnvironmentVariable("WT_SESSION");
|
|
@@ -103809,19 +103989,19 @@ var ts;
|
|
|
103809
103989
|
if (isWindows && !isWindowsTerminal && !isVSCode) {
|
|
103810
103990
|
return brightWhite(str);
|
|
103811
103991
|
}
|
|
103812
|
-
return "\u001B[94m"
|
|
103992
|
+
return "\u001B[94m".concat(str, "\u001B[39m");
|
|
103813
103993
|
}
|
|
103814
103994
|
var supportsRicherColors = sys.getEnvironmentVariable("COLORTERM") === "truecolor" || sys.getEnvironmentVariable("TERM") === "xterm-256color";
|
|
103815
103995
|
function blueBackground(str) {
|
|
103816
103996
|
if (supportsRicherColors) {
|
|
103817
|
-
return "\u001B[48;5;68m"
|
|
103997
|
+
return "\u001B[48;5;68m".concat(str, "\u001B[39;49m");
|
|
103818
103998
|
}
|
|
103819
103999
|
else {
|
|
103820
|
-
return "\u001B[44m"
|
|
104000
|
+
return "\u001B[44m".concat(str, "\u001B[39;49m");
|
|
103821
104001
|
}
|
|
103822
104002
|
}
|
|
103823
104003
|
function brightWhite(str) {
|
|
103824
|
-
return "\u001B[97m"
|
|
104004
|
+
return "\u001B[97m".concat(str, "\u001B[39m");
|
|
103825
104005
|
}
|
|
103826
104006
|
return {
|
|
103827
104007
|
bold: bold,
|
|
@@ -103831,7 +104011,7 @@ var ts;
|
|
|
103831
104011
|
};
|
|
103832
104012
|
}
|
|
103833
104013
|
function getDisplayNameTextOfOption(option) {
|
|
103834
|
-
return "--"
|
|
104014
|
+
return "--".concat(option.name).concat(option.shortName ? ", -".concat(option.shortName) : "");
|
|
103835
104015
|
}
|
|
103836
104016
|
function generateOptionOutput(sys, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
103837
104017
|
var _a, _b;
|
|
@@ -103868,13 +104048,13 @@ var ts;
|
|
|
103868
104048
|
text.push(sys.newLine);
|
|
103869
104049
|
if (showAdditionalInfoOutput(valueCandidates, option)) {
|
|
103870
104050
|
if (valueCandidates) {
|
|
103871
|
-
text.push(valueCandidates.valueType
|
|
104051
|
+
text.push("".concat(valueCandidates.valueType, " ").concat(valueCandidates.possibleValues));
|
|
103872
104052
|
}
|
|
103873
104053
|
if (defaultValueDescription) {
|
|
103874
104054
|
if (valueCandidates)
|
|
103875
104055
|
text.push(sys.newLine);
|
|
103876
104056
|
var diagType = ts.getDiagnosticText(ts.Diagnostics.default_Colon);
|
|
103877
|
-
text.push(diagType
|
|
104057
|
+
text.push("".concat(diagType, " ").concat(defaultValueDescription));
|
|
103878
104058
|
}
|
|
103879
104059
|
text.push(sys.newLine);
|
|
103880
104060
|
}
|
|
@@ -103923,7 +104103,7 @@ var ts;
|
|
|
103923
104103
|
}
|
|
103924
104104
|
var curRight = remainRight.substr(0, rightCharacterNumber);
|
|
103925
104105
|
remainRight = remainRight.slice(rightCharacterNumber);
|
|
103926
|
-
res.push(""
|
|
104106
|
+
res.push("".concat(curLeft).concat(curRight));
|
|
103927
104107
|
isFirstLine = false;
|
|
103928
104108
|
}
|
|
103929
104109
|
return res;
|
|
@@ -104024,7 +104204,7 @@ var ts;
|
|
|
104024
104204
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
104025
104205
|
}
|
|
104026
104206
|
categoryMap.forEach(function (value, key) {
|
|
104027
|
-
res.push("### "
|
|
104207
|
+
res.push("### ".concat(key).concat(sys.newLine).concat(sys.newLine));
|
|
104028
104208
|
res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, value), true);
|
|
104029
104209
|
});
|
|
104030
104210
|
if (afterOptionsDescription) {
|
|
@@ -104034,7 +104214,7 @@ var ts;
|
|
|
104034
104214
|
}
|
|
104035
104215
|
function printEasyHelp(sys, simpleOptions) {
|
|
104036
104216
|
var colors = createColors(sys);
|
|
104037
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104217
|
+
var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
|
|
104038
104218
|
output.push(colors.bold(ts.getDiagnosticText(ts.Diagnostics.COMMON_COMMANDS)) + sys.newLine + sys.newLine);
|
|
104039
104219
|
example("tsc", ts.Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
104040
104220
|
example("tsc app.ts util.ts", ts.Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -104060,7 +104240,7 @@ var ts;
|
|
|
104060
104240
|
}
|
|
104061
104241
|
}
|
|
104062
104242
|
function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
|
|
104063
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104243
|
+
var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
|
|
104064
104244
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.ALL_COMPILER_OPTIONS), compilerOptions, true, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")), true);
|
|
104065
104245
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.WATCH_OPTIONS), watchOptions, false, ts.getDiagnosticText(ts.Diagnostics.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon)), true);
|
|
104066
104246
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.BUILD_OPTIONS), buildOptions, false, ts.formatMessage(undefined, ts.Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")), true);
|
|
@@ -104070,7 +104250,7 @@ var ts;
|
|
|
104070
104250
|
}
|
|
104071
104251
|
}
|
|
104072
104252
|
function printBuildHelp(sys, buildOptions) {
|
|
104073
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104253
|
+
var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
|
|
104074
104254
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.BUILD_OPTIONS), buildOptions, false, ts.formatMessage(undefined, ts.Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")), true);
|
|
104075
104255
|
for (var _i = 0, output_3 = output; _i < output_3.length; _i++) {
|
|
104076
104256
|
var line = output_3[_i];
|
|
@@ -104451,7 +104631,7 @@ var ts;
|
|
|
104451
104631
|
reportCountStatistic("Subtype cache size", caches.subtype);
|
|
104452
104632
|
reportCountStatistic("Strict subtype cache size", caches.strictSubtype);
|
|
104453
104633
|
if (isPerformanceEnabled) {
|
|
104454
|
-
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(name
|
|
104634
|
+
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic("".concat(name, " time"), duration); });
|
|
104455
104635
|
}
|
|
104456
104636
|
}
|
|
104457
104637
|
else if (isPerformanceEnabled) {
|
|
@@ -104522,7 +104702,7 @@ var ts;
|
|
|
104522
104702
|
// This file actually uses arguments passed on commandline and executes it
|
|
104523
104703
|
ts.Debug.loggingHost = {
|
|
104524
104704
|
log: function (_level, s) {
|
|
104525
|
-
ts.sys.write(""
|
|
104705
|
+
ts.sys.write("".concat(s || "").concat(ts.sys.newLine));
|
|
104526
104706
|
}
|
|
104527
104707
|
};
|
|
104528
104708
|
if (ts.Debug.isDebugging) {
|