typescript 4.7.0-dev.20220506 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/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/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 +400 -325
- package/lib/tsserver.js +18960 -18868
- package/lib/tsserverlibrary.d.ts +26 -0
- package/lib/tsserverlibrary.js +18928 -18836
- package/lib/typescript.d.ts +26 -0
- package/lib/typescript.js +18752 -18660
- package/lib/typescriptServices.d.ts +26 -0
- package/lib/typescriptServices.js +18752 -18660
- package/lib/typingsInstaller.js +14120 -14028
- 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.3";
|
|
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
|
}
|
|
@@ -5573,7 +5573,7 @@ var ts;
|
|
|
5573
5573
|
Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
|
|
5574
5574
|
Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
|
|
5575
5575
|
Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
|
|
5576
|
-
|
|
5576
|
+
resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, ts.DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),
|
|
5577
5577
|
resolution_mode_should_be_either_require_or_import: diag(1453, ts.DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."),
|
|
5578
5578
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
5579
5579
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
@@ -6077,6 +6077,7 @@ var ts;
|
|
|
6077
6077
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
6078
6078
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
6079
6079
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
6080
|
+
The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, ts.DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6080
6081
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6081
6082
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6082
6083
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -6184,6 +6185,7 @@ var ts;
|
|
|
6184
6185
|
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}'."),
|
|
6185
6186
|
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}'?"),
|
|
6186
6187
|
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'."),
|
|
6188
|
+
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'."),
|
|
6187
6189
|
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."),
|
|
6188
6190
|
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."),
|
|
6189
6191
|
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}'."),
|
|
@@ -7238,7 +7240,7 @@ var ts;
|
|
|
7238
7240
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
7239
7241
|
}
|
|
7240
7242
|
else {
|
|
7241
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
7243
|
+
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"));
|
|
7242
7244
|
}
|
|
7243
7245
|
}
|
|
7244
7246
|
var res = lineStarts[line] + character;
|
|
@@ -9753,7 +9755,7 @@ var ts;
|
|
|
9753
9755
|
: "linkplain";
|
|
9754
9756
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9755
9757
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
9756
|
-
return "{@"
|
|
9758
|
+
return "{@".concat(kind, " ").concat(name).concat(space).concat(link.text, "}");
|
|
9757
9759
|
}
|
|
9758
9760
|
function getEffectiveTypeParameterDeclarations(node) {
|
|
9759
9761
|
if (ts.isJSDocSignature(node)) {
|
|
@@ -10852,11 +10854,11 @@ var ts;
|
|
|
10852
10854
|
}
|
|
10853
10855
|
function packageIdToPackageName(_a) {
|
|
10854
10856
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
10855
|
-
return subModuleName ? name
|
|
10857
|
+
return subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
10856
10858
|
}
|
|
10857
10859
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
10858
10860
|
function packageIdToString(packageId) {
|
|
10859
|
-
return packageIdToPackageName(packageId)
|
|
10861
|
+
return "".concat(packageIdToPackageName(packageId), "@").concat(packageId.version);
|
|
10860
10862
|
}
|
|
10861
10863
|
ts.packageIdToString = packageIdToString;
|
|
10862
10864
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -10933,7 +10935,7 @@ var ts;
|
|
|
10933
10935
|
function nodePosToString(node) {
|
|
10934
10936
|
var file = getSourceFileOfNode(node);
|
|
10935
10937
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
10936
|
-
return file.fileName
|
|
10938
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
10937
10939
|
}
|
|
10938
10940
|
ts.nodePosToString = nodePosToString;
|
|
10939
10941
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -11034,7 +11036,7 @@ var ts;
|
|
|
11034
11036
|
ts.isPinnedComment = isPinnedComment;
|
|
11035
11037
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
11036
11038
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
11037
|
-
""
|
|
11039
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
11038
11040
|
commentDirective,
|
|
11039
11041
|
]); }));
|
|
11040
11042
|
var usedLines = new ts.Map();
|
|
@@ -11051,10 +11053,10 @@ var ts;
|
|
|
11051
11053
|
});
|
|
11052
11054
|
}
|
|
11053
11055
|
function markUsed(line) {
|
|
11054
|
-
if (!directivesByLine.has(""
|
|
11056
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
11055
11057
|
return false;
|
|
11056
11058
|
}
|
|
11057
|
-
usedLines.set(""
|
|
11059
|
+
usedLines.set("".concat(line), true);
|
|
11058
11060
|
return true;
|
|
11059
11061
|
}
|
|
11060
11062
|
}
|
|
@@ -11253,7 +11255,7 @@ var ts;
|
|
|
11253
11255
|
}
|
|
11254
11256
|
return node.text;
|
|
11255
11257
|
}
|
|
11256
|
-
return ts.Debug.fail("Literal kind '"
|
|
11258
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
11257
11259
|
}
|
|
11258
11260
|
ts.getLiteralText = getLiteralText;
|
|
11259
11261
|
function canUseOriginalText(node, flags) {
|
|
@@ -12407,6 +12409,8 @@ var ts;
|
|
|
12407
12409
|
case 218:
|
|
12408
12410
|
case 231:
|
|
12409
12411
|
return true;
|
|
12412
|
+
case 228:
|
|
12413
|
+
return !ts.isHeritageClause(node.parent);
|
|
12410
12414
|
case 161:
|
|
12411
12415
|
while (node.parent.kind === 161) {
|
|
12412
12416
|
node = node.parent;
|
|
@@ -12570,9 +12574,6 @@ var ts;
|
|
|
12570
12574
|
}
|
|
12571
12575
|
ts.isVariableDeclarationInitializedToBareOrAccessedRequire = isVariableDeclarationInitializedToBareOrAccessedRequire;
|
|
12572
12576
|
function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) {
|
|
12573
|
-
if (node.kind === 203) {
|
|
12574
|
-
node = node.parent.parent;
|
|
12575
|
-
}
|
|
12576
12577
|
return ts.isVariableDeclaration(node) &&
|
|
12577
12578
|
!!node.initializer &&
|
|
12578
12579
|
isRequireCall(allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, true);
|
|
@@ -13617,11 +13618,11 @@ var ts;
|
|
|
13617
13618
|
}
|
|
13618
13619
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
13619
13620
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
13620
|
-
return "__@"
|
|
13621
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
13621
13622
|
}
|
|
13622
13623
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
13623
13624
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
13624
|
-
return "__#"
|
|
13625
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
13625
13626
|
}
|
|
13626
13627
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
13627
13628
|
function isKnownSymbol(symbol) {
|
|
@@ -14052,6 +14053,10 @@ var ts;
|
|
|
14052
14053
|
return indentStrings[1].length;
|
|
14053
14054
|
}
|
|
14054
14055
|
ts.getIndentSize = getIndentSize;
|
|
14056
|
+
function isNightly() {
|
|
14057
|
+
return ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
14058
|
+
}
|
|
14059
|
+
ts.isNightly = isNightly;
|
|
14055
14060
|
function createTextWriter(newLine) {
|
|
14056
14061
|
var output;
|
|
14057
14062
|
var indent;
|
|
@@ -15838,13 +15843,13 @@ var ts;
|
|
|
15838
15843
|
return !file.isDeclarationFile ? walkTreeForJSXTags(file) : undefined;
|
|
15839
15844
|
}
|
|
15840
15845
|
function isFileForcedToBeModuleByFormat(file) {
|
|
15841
|
-
return file.impliedNodeFormat === ts.ModuleKind.ESNext && !file.isDeclarationFile ? true : undefined;
|
|
15846
|
+
return (file.impliedNodeFormat === ts.ModuleKind.ESNext || (ts.fileExtensionIsOneOf(file.fileName, [".cjs", ".cts"]))) && !file.isDeclarationFile ? true : undefined;
|
|
15842
15847
|
}
|
|
15843
15848
|
function getSetExternalModuleIndicator(options) {
|
|
15844
15849
|
switch (getEmitModuleDetectionKind(options)) {
|
|
15845
15850
|
case ts.ModuleDetectionKind.Force:
|
|
15846
15851
|
return function (file) {
|
|
15847
|
-
file.externalModuleIndicator = !file.isDeclarationFile ||
|
|
15852
|
+
file.externalModuleIndicator = ts.isFileProbablyExternalModule(file) || !file.isDeclarationFile || undefined;
|
|
15848
15853
|
};
|
|
15849
15854
|
case ts.ModuleDetectionKind.Legacy:
|
|
15850
15855
|
return function (file) {
|
|
@@ -15900,7 +15905,8 @@ var ts;
|
|
|
15900
15905
|
}
|
|
15901
15906
|
ts.getEmitModuleResolutionKind = getEmitModuleResolutionKind;
|
|
15902
15907
|
function getEmitModuleDetectionKind(options) {
|
|
15903
|
-
return options.moduleDetection ||
|
|
15908
|
+
return options.moduleDetection ||
|
|
15909
|
+
(getEmitModuleKind(options) === ts.ModuleKind.Node16 || getEmitModuleKind(options) === ts.ModuleKind.NodeNext ? ts.ModuleDetectionKind.Force : ts.ModuleDetectionKind.Auto);
|
|
15904
15910
|
}
|
|
15905
15911
|
ts.getEmitModuleDetectionKind = getEmitModuleDetectionKind;
|
|
15906
15912
|
function hasJsonModuleEmitEnabled(options) {
|
|
@@ -16004,7 +16010,7 @@ var ts;
|
|
|
16004
16010
|
}
|
|
16005
16011
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
16006
16012
|
function getJSXRuntimeImport(base, options) {
|
|
16007
|
-
return base ? base
|
|
16013
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
16008
16014
|
}
|
|
16009
16015
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
16010
16016
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -16102,15 +16108,15 @@ var ts;
|
|
|
16102
16108
|
}
|
|
16103
16109
|
var wildcardCharCodes = [42, 63];
|
|
16104
16110
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
16105
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
16111
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
16106
16112
|
var filesMatcher = {
|
|
16107
16113
|
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
|
|
16108
|
-
doubleAsteriskRegexFragment: "(/"
|
|
16114
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
16109
16115
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
16110
16116
|
};
|
|
16111
16117
|
var directoriesMatcher = {
|
|
16112
16118
|
singleAsteriskRegexFragment: "[^/]*",
|
|
16113
|
-
doubleAsteriskRegexFragment: "(/"
|
|
16119
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
16114
16120
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
16115
16121
|
};
|
|
16116
16122
|
var excludeMatcher = {
|
|
@@ -16128,9 +16134,9 @@ var ts;
|
|
|
16128
16134
|
if (!patterns || !patterns.length) {
|
|
16129
16135
|
return undefined;
|
|
16130
16136
|
}
|
|
16131
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
16137
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
16132
16138
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
16133
|
-
return "^("
|
|
16139
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
16134
16140
|
}
|
|
16135
16141
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
16136
16142
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -16148,7 +16154,7 @@ var ts;
|
|
|
16148
16154
|
ts.isImplicitGlob = isImplicitGlob;
|
|
16149
16155
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
16150
16156
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
16151
|
-
return pattern && "^("
|
|
16157
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
16152
16158
|
}
|
|
16153
16159
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
16154
16160
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -16214,7 +16220,7 @@ var ts;
|
|
|
16214
16220
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
16215
16221
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
16216
16222
|
return {
|
|
16217
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
16223
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
16218
16224
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
16219
16225
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
16220
16226
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -16460,7 +16466,7 @@ var ts;
|
|
|
16460
16466
|
ts.resolutionExtensionIsTSOrJson = resolutionExtensionIsTSOrJson;
|
|
16461
16467
|
function extensionFromPath(path) {
|
|
16462
16468
|
var ext = tryGetExtensionFromPath(path);
|
|
16463
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
16469
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
16464
16470
|
}
|
|
16465
16471
|
ts.extensionFromPath = extensionFromPath;
|
|
16466
16472
|
function isAnySupportedFileExtension(path) {
|
|
@@ -21699,7 +21705,7 @@ var ts;
|
|
|
21699
21705
|
case 328: return "augments";
|
|
21700
21706
|
case 329: return "implements";
|
|
21701
21707
|
default:
|
|
21702
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
21708
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
21703
21709
|
}
|
|
21704
21710
|
}
|
|
21705
21711
|
var rawTextScanner;
|
|
@@ -22026,7 +22032,7 @@ var ts;
|
|
|
22026
22032
|
};
|
|
22027
22033
|
var definedTextGetter_1 = function (path) {
|
|
22028
22034
|
var result = textGetter_1(path);
|
|
22029
|
-
return result !== undefined ? result : "/* Input file "
|
|
22035
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
22030
22036
|
};
|
|
22031
22037
|
var buildInfo_1;
|
|
22032
22038
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -23336,6 +23342,10 @@ var ts;
|
|
|
23336
23342
|
return node.kind === 267;
|
|
23337
23343
|
}
|
|
23338
23344
|
ts.isImportClause = isImportClause;
|
|
23345
|
+
function isImportTypeAssertionContainer(node) {
|
|
23346
|
+
return node.kind === 295;
|
|
23347
|
+
}
|
|
23348
|
+
ts.isImportTypeAssertionContainer = isImportTypeAssertionContainer;
|
|
23339
23349
|
function isAssertClause(node) {
|
|
23340
23350
|
return node.kind === 293;
|
|
23341
23351
|
}
|
|
@@ -25755,7 +25765,7 @@ var ts;
|
|
|
25755
25765
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
25756
25766
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
25757
25767
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
25758
|
-
return keyword
|
|
25768
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
25759
25769
|
}
|
|
25760
25770
|
}
|
|
25761
25771
|
return undefined;
|
|
@@ -26464,6 +26474,7 @@ var ts;
|
|
|
26464
26474
|
var startPos = scanner.getStartPos();
|
|
26465
26475
|
var result = parseListElement(kind, parseElement);
|
|
26466
26476
|
if (!result) {
|
|
26477
|
+
parsingContext = saveParsingContext;
|
|
26467
26478
|
return undefined;
|
|
26468
26479
|
}
|
|
26469
26480
|
list.push(result);
|
|
@@ -27689,6 +27700,9 @@ var ts;
|
|
|
27689
27700
|
return 1;
|
|
27690
27701
|
}
|
|
27691
27702
|
if (ts.isModifierKind(second) && second !== 131 && lookAhead(nextTokenIsIdentifier)) {
|
|
27703
|
+
if (lookAhead(function () { return nextToken() === 127; })) {
|
|
27704
|
+
return 0;
|
|
27705
|
+
}
|
|
27692
27706
|
return 1;
|
|
27693
27707
|
}
|
|
27694
27708
|
if (!isIdentifier() && second !== 108) {
|
|
@@ -31293,7 +31307,7 @@ var ts;
|
|
|
31293
31307
|
if (namedArgRegExCache.has(name)) {
|
|
31294
31308
|
return namedArgRegExCache.get(name);
|
|
31295
31309
|
}
|
|
31296
|
-
var result = new RegExp("(\\s"
|
|
31310
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
31297
31311
|
namedArgRegExCache.set(name, result);
|
|
31298
31312
|
return result;
|
|
31299
31313
|
}
|
|
@@ -32731,8 +32745,8 @@ var ts;
|
|
|
32731
32745
|
}
|
|
32732
32746
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
32733
32747
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
32734
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
32735
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
32748
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
32749
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
32736
32750
|
}
|
|
32737
32751
|
function parseCustomTypeOption(opt, value, errors) {
|
|
32738
32752
|
return convertJsonOptionOfCustomType(opt, ts.trimString(value || ""), errors);
|
|
@@ -33449,10 +33463,10 @@ var ts;
|
|
|
33449
33463
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
33450
33464
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
33451
33465
|
if (newValue !== defaultValue) {
|
|
33452
|
-
result.push(""
|
|
33466
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
33453
33467
|
}
|
|
33454
33468
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
33455
|
-
result.push(""
|
|
33469
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
33456
33470
|
}
|
|
33457
33471
|
});
|
|
33458
33472
|
return result.join(newLine) + newLine;
|
|
@@ -33490,19 +33504,19 @@ var ts;
|
|
|
33490
33504
|
if (entries.length !== 0) {
|
|
33491
33505
|
entries.push({ value: "" });
|
|
33492
33506
|
}
|
|
33493
|
-
entries.push({ value: "/* "
|
|
33507
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
33494
33508
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
33495
33509
|
var option = options_1[_i];
|
|
33496
33510
|
var optionName = void 0;
|
|
33497
33511
|
if (compilerOptionsMap.has(option.name)) {
|
|
33498
|
-
optionName = "\""
|
|
33512
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
33499
33513
|
}
|
|
33500
33514
|
else {
|
|
33501
|
-
optionName = "// \""
|
|
33515
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
33502
33516
|
}
|
|
33503
33517
|
entries.push({
|
|
33504
33518
|
value: optionName,
|
|
33505
|
-
description: "/* "
|
|
33519
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
33506
33520
|
});
|
|
33507
33521
|
marginLength = Math.max(optionName.length, marginLength);
|
|
33508
33522
|
}
|
|
@@ -33510,24 +33524,24 @@ var ts;
|
|
|
33510
33524
|
var tab = makePadding(2);
|
|
33511
33525
|
var result = [];
|
|
33512
33526
|
result.push("{");
|
|
33513
|
-
result.push(tab
|
|
33514
|
-
result.push(""
|
|
33527
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
33528
|
+
result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file), " */"));
|
|
33515
33529
|
result.push("");
|
|
33516
33530
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
33517
33531
|
var entry = entries_2[_a];
|
|
33518
33532
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
33519
|
-
result.push(value && ""
|
|
33533
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
33520
33534
|
}
|
|
33521
33535
|
if (fileNames.length) {
|
|
33522
|
-
result.push(tab
|
|
33523
|
-
result.push(tab
|
|
33536
|
+
result.push("".concat(tab, "},"));
|
|
33537
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
33524
33538
|
for (var i = 0; i < fileNames.length; i++) {
|
|
33525
|
-
result.push(""
|
|
33539
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
33526
33540
|
}
|
|
33527
|
-
result.push(tab
|
|
33541
|
+
result.push("".concat(tab, "]"));
|
|
33528
33542
|
}
|
|
33529
33543
|
else {
|
|
33530
|
-
result.push(tab
|
|
33544
|
+
result.push("".concat(tab, "}"));
|
|
33531
33545
|
}
|
|
33532
33546
|
result.push("}");
|
|
33533
33547
|
return result.join(newLine) + newLine;
|
|
@@ -33880,7 +33894,7 @@ var ts;
|
|
|
33880
33894
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
33881
33895
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
33882
33896
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
|
|
33883
|
-
extendedConfigPath = extendedConfigPath
|
|
33897
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
33884
33898
|
if (!host.fileExists(extendedConfigPath)) {
|
|
33885
33899
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
33886
33900
|
return undefined;
|
|
@@ -34076,7 +34090,7 @@ var ts;
|
|
|
34076
34090
|
if (ts.fileExtensionIs(file, ".json")) {
|
|
34077
34091
|
if (!jsonOnlyIncludeRegexes) {
|
|
34078
34092
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json"); });
|
|
34079
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
34093
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
34080
34094
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
34081
34095
|
}
|
|
34082
34096
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -34222,7 +34236,7 @@ var ts;
|
|
|
34222
34236
|
}
|
|
34223
34237
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
34224
34238
|
return {
|
|
34225
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
34239
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
34226
34240
|
flags: 1
|
|
34227
34241
|
};
|
|
34228
34242
|
}
|
|
@@ -34304,7 +34318,7 @@ var ts;
|
|
|
34304
34318
|
return true;
|
|
34305
34319
|
case "string":
|
|
34306
34320
|
var defaultValue = option.defaultValueDescription;
|
|
34307
|
-
return option.isFilePath ? "./"
|
|
34321
|
+
return option.isFilePath ? "./".concat(defaultValue && typeof defaultValue === "string" ? defaultValue : "") : "";
|
|
34308
34322
|
case "list":
|
|
34309
34323
|
return [];
|
|
34310
34324
|
case "object":
|
|
@@ -34451,7 +34465,7 @@ var ts;
|
|
|
34451
34465
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
34452
34466
|
if (typeof bestVersionPaths !== "object") {
|
|
34453
34467
|
if (state.traceEnabled) {
|
|
34454
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
34468
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
34455
34469
|
}
|
|
34456
34470
|
return;
|
|
34457
34471
|
}
|
|
@@ -34838,7 +34852,7 @@ var ts;
|
|
|
34838
34852
|
};
|
|
34839
34853
|
return cache;
|
|
34840
34854
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
34841
|
-
var result = mode === undefined ? specifier : mode
|
|
34855
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
34842
34856
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
34843
34857
|
return result;
|
|
34844
34858
|
}
|
|
@@ -34871,7 +34885,7 @@ var ts;
|
|
|
34871
34885
|
}
|
|
34872
34886
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
34873
34887
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
34874
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
34888
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
34875
34889
|
}
|
|
34876
34890
|
function createPerModuleNameCache() {
|
|
34877
34891
|
var directoryPathMap = new ts.Map();
|
|
@@ -34999,10 +35013,10 @@ var ts;
|
|
|
34999
35013
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
35000
35014
|
break;
|
|
35001
35015
|
default:
|
|
35002
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
35016
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
35003
35017
|
}
|
|
35004
35018
|
if (result && result.resolvedModule)
|
|
35005
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
35019
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
35006
35020
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
35007
35021
|
if (perFolderCache) {
|
|
35008
35022
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -35132,7 +35146,7 @@ var ts;
|
|
|
35132
35146
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
35133
35147
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
35134
35148
|
if (!resolvedModule) {
|
|
35135
|
-
throw new Error("Could not resolve JS module '"
|
|
35149
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
35136
35150
|
}
|
|
35137
35151
|
return resolvedModule.resolvedFileName;
|
|
35138
35152
|
}
|
|
@@ -35155,15 +35169,19 @@ var ts;
|
|
|
35155
35169
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35156
35170
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35157
35171
|
}
|
|
35158
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35159
|
-
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35160
|
-
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35161
|
-
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
35162
|
-
}
|
|
35163
35172
|
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
35164
35173
|
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
35165
35174
|
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
35166
35175
|
var tsconfigExtensions = [Extensions.TSConfig];
|
|
35176
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35177
|
+
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35178
|
+
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35179
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
35180
|
+
if (compilerOptions.resolveJsonModule) {
|
|
35181
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
35182
|
+
}
|
|
35183
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
35184
|
+
}
|
|
35167
35185
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
35168
35186
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
35169
35187
|
}
|
|
@@ -35259,7 +35277,7 @@ var ts;
|
|
|
35259
35277
|
if (traceEnabled) {
|
|
35260
35278
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
35261
35279
|
}
|
|
35262
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
35280
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
35263
35281
|
return real;
|
|
35264
35282
|
}
|
|
35265
35283
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -35718,7 +35736,7 @@ var ts;
|
|
|
35718
35736
|
return undefined;
|
|
35719
35737
|
}
|
|
35720
35738
|
var trailingParts = parts.slice(nameParts.length);
|
|
35721
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
35739
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
35722
35740
|
}
|
|
35723
35741
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
35724
35742
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -35786,13 +35804,32 @@ var ts;
|
|
|
35786
35804
|
}
|
|
35787
35805
|
return toSearchResult(undefined);
|
|
35788
35806
|
}
|
|
35807
|
+
function comparePatternKeys(a, b) {
|
|
35808
|
+
var aPatternIndex = a.indexOf("*");
|
|
35809
|
+
var bPatternIndex = b.indexOf("*");
|
|
35810
|
+
var baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
|
|
35811
|
+
var baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
|
|
35812
|
+
if (baseLenA > baseLenB)
|
|
35813
|
+
return -1;
|
|
35814
|
+
if (baseLenB > baseLenA)
|
|
35815
|
+
return 1;
|
|
35816
|
+
if (aPatternIndex === -1)
|
|
35817
|
+
return 1;
|
|
35818
|
+
if (bPatternIndex === -1)
|
|
35819
|
+
return -1;
|
|
35820
|
+
if (a.length > b.length)
|
|
35821
|
+
return -1;
|
|
35822
|
+
if (b.length > a.length)
|
|
35823
|
+
return 1;
|
|
35824
|
+
return 0;
|
|
35825
|
+
}
|
|
35789
35826
|
function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
|
|
35790
35827
|
var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
|
|
35791
35828
|
if (!ts.endsWith(moduleName, ts.directorySeparator) && moduleName.indexOf("*") === -1 && ts.hasProperty(lookupTable, moduleName)) {
|
|
35792
35829
|
var target = lookupTable[moduleName];
|
|
35793
35830
|
return loadModuleFromTargetImportOrExport(target, "", false);
|
|
35794
35831
|
}
|
|
35795
|
-
var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }),
|
|
35832
|
+
var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), comparePatternKeys);
|
|
35796
35833
|
for (var _i = 0, expandingKeys_1 = expandingKeys; _i < expandingKeys_1.length; _i++) {
|
|
35797
35834
|
var potentialTarget = expandingKeys_1[_i];
|
|
35798
35835
|
if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
|
|
@@ -36067,8 +36104,7 @@ var ts;
|
|
|
36067
36104
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
36068
36105
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
|
|
36069
36106
|
if (!pathAndExtension && packageInfo
|
|
36070
|
-
&& packageInfo.packageJsonContent.exports === undefined
|
|
36071
|
-
&& packageInfo.packageJsonContent.main === undefined
|
|
36107
|
+
&& (packageInfo.packageJsonContent.exports === undefined || packageInfo.packageJsonContent.exports === null)
|
|
36072
36108
|
&& state.features & NodeResolutionFeatures.EsmMode) {
|
|
36073
36109
|
pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
|
|
36074
36110
|
}
|
|
@@ -36126,7 +36162,7 @@ var ts;
|
|
|
36126
36162
|
return mangled;
|
|
36127
36163
|
}
|
|
36128
36164
|
function getTypesPackageName(packageName) {
|
|
36129
|
-
return "@types/"
|
|
36165
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
36130
36166
|
}
|
|
36131
36167
|
ts.getTypesPackageName = getTypesPackageName;
|
|
36132
36168
|
function mangleScopedPackageName(packageName) {
|
|
@@ -36454,7 +36490,7 @@ var ts;
|
|
|
36454
36490
|
if (name) {
|
|
36455
36491
|
if (ts.isAmbientModule(node)) {
|
|
36456
36492
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
36457
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
36493
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
36458
36494
|
}
|
|
36459
36495
|
if (name.kind === 162) {
|
|
36460
36496
|
var nameExpression = name.expression;
|
|
@@ -36503,7 +36539,7 @@ var ts;
|
|
|
36503
36539
|
case 317:
|
|
36504
36540
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
36505
36541
|
case 164:
|
|
36506
|
-
ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: "
|
|
36542
|
+
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"); });
|
|
36507
36543
|
var functionType = node.parent;
|
|
36508
36544
|
var index = functionType.parameters.indexOf(node);
|
|
36509
36545
|
return "arg" + index;
|
|
@@ -36569,7 +36605,7 @@ var ts;
|
|
|
36569
36605
|
}
|
|
36570
36606
|
var relatedInformation_1 = [];
|
|
36571
36607
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1) && symbol.flags & (2097152 | 788968 | 1920)) {
|
|
36572
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
36608
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
36573
36609
|
}
|
|
36574
36610
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
36575
36611
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -38393,7 +38429,7 @@ var ts;
|
|
|
38393
38429
|
}
|
|
38394
38430
|
}
|
|
38395
38431
|
function bindSourceFileAsExternalModule() {
|
|
38396
|
-
bindAnonymousDeclaration(file, 512, "\""
|
|
38432
|
+
bindAnonymousDeclaration(file, 512, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
38397
38433
|
}
|
|
38398
38434
|
function bindExportAssignment(node) {
|
|
38399
38435
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -38443,12 +38479,14 @@ var ts;
|
|
|
38443
38479
|
}
|
|
38444
38480
|
}
|
|
38445
38481
|
function setCommonJsModuleIndicator(node) {
|
|
38446
|
-
if (file.externalModuleIndicator) {
|
|
38482
|
+
if (file.externalModuleIndicator && file.externalModuleIndicator !== true) {
|
|
38447
38483
|
return false;
|
|
38448
38484
|
}
|
|
38449
38485
|
if (!file.commonJsModuleIndicator) {
|
|
38450
38486
|
file.commonJsModuleIndicator = node;
|
|
38451
|
-
|
|
38487
|
+
if (!file.externalModuleIndicator) {
|
|
38488
|
+
bindSourceFileAsExternalModule();
|
|
38489
|
+
}
|
|
38452
38490
|
}
|
|
38453
38491
|
return true;
|
|
38454
38492
|
}
|
|
@@ -38801,7 +38839,11 @@ var ts;
|
|
|
38801
38839
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
38802
38840
|
}
|
|
38803
38841
|
if (!ts.isBindingPattern(node.name)) {
|
|
38804
|
-
|
|
38842
|
+
var possibleVariableDecl = node.kind === 254 ? node : node.parent.parent;
|
|
38843
|
+
if (ts.isInJSFile(node) &&
|
|
38844
|
+
ts.isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) &&
|
|
38845
|
+
!ts.getJSDocTypeTag(node) &&
|
|
38846
|
+
!(ts.getCombinedModifierFlags(node) & 1)) {
|
|
38805
38847
|
declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
|
|
38806
38848
|
}
|
|
38807
38849
|
else if (ts.isBlockOrCatchScoped(node)) {
|
|
@@ -40132,7 +40174,7 @@ var ts;
|
|
|
40132
40174
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
40133
40175
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 ? sourceSymbolFile : targetSymbolFile;
|
|
40134
40176
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
40135
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
40177
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
40136
40178
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
40137
40179
|
});
|
|
40138
40180
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -41114,7 +41156,8 @@ var ts;
|
|
|
41114
41156
|
&& isAliasableOrJsExpression(node.parent.right)
|
|
41115
41157
|
|| node.kind === 297
|
|
41116
41158
|
|| node.kind === 296 && isAliasableOrJsExpression(node.initializer)
|
|
41117
|
-
|| ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)
|
|
41159
|
+
|| node.kind === 254 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)
|
|
41160
|
+
|| node.kind === 203 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent);
|
|
41118
41161
|
}
|
|
41119
41162
|
function isAliasableOrJsExpression(e) {
|
|
41120
41163
|
return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
|
|
@@ -41195,7 +41238,7 @@ var ts;
|
|
|
41195
41238
|
if (!ts.isSourceFileJS(file)) {
|
|
41196
41239
|
return hasExportAssignmentSymbol(moduleSymbol);
|
|
41197
41240
|
}
|
|
41198
|
-
return
|
|
41241
|
+
return typeof file.externalModuleIndicator !== "object" && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), undefined, dontResolveAlias);
|
|
41199
41242
|
}
|
|
41200
41243
|
function getTargetOfImportClause(node, dontResolveAlias) {
|
|
41201
41244
|
var _a;
|
|
@@ -42434,7 +42477,7 @@ var ts;
|
|
|
42434
42477
|
var links = getSymbolLinks(symbol);
|
|
42435
42478
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
42436
42479
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
42437
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
42480
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
42438
42481
|
if (cache.has(key)) {
|
|
42439
42482
|
return cache.get(key);
|
|
42440
42483
|
}
|
|
@@ -43238,7 +43281,7 @@ var ts;
|
|
|
43238
43281
|
context.symbolDepth = new ts.Map();
|
|
43239
43282
|
}
|
|
43240
43283
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
43241
|
-
var key = getTypeId(type)
|
|
43284
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
43242
43285
|
if (links) {
|
|
43243
43286
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
43244
43287
|
}
|
|
@@ -43499,7 +43542,7 @@ var ts;
|
|
|
43499
43542
|
}
|
|
43500
43543
|
}
|
|
43501
43544
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
43502
|
-
typeElements.push(ts.factory.createPropertySignature(undefined, "... "
|
|
43545
|
+
typeElements.push(ts.factory.createPropertySignature(undefined, "... ".concat(properties.length - i, " more ..."), undefined, undefined));
|
|
43503
43546
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
43504
43547
|
break;
|
|
43505
43548
|
}
|
|
@@ -43607,7 +43650,7 @@ var ts;
|
|
|
43607
43650
|
else if (types.length > 2) {
|
|
43608
43651
|
return [
|
|
43609
43652
|
typeToTypeNodeHelper(types[0], context),
|
|
43610
|
-
ts.factory.createTypeReferenceNode("... "
|
|
43653
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), undefined),
|
|
43611
43654
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
43612
43655
|
];
|
|
43613
43656
|
}
|
|
@@ -43620,7 +43663,7 @@ var ts;
|
|
|
43620
43663
|
var type = types_2[_i];
|
|
43621
43664
|
i++;
|
|
43622
43665
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
43623
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
43666
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), undefined));
|
|
43624
43667
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
43625
43668
|
if (typeNode_1) {
|
|
43626
43669
|
result_5.push(typeNode_1);
|
|
@@ -43977,7 +44020,7 @@ var ts;
|
|
|
43977
44020
|
}
|
|
43978
44021
|
return specifier;
|
|
43979
44022
|
function getSpecifierCacheKey(path, mode) {
|
|
43980
|
-
return mode === undefined ? path : mode
|
|
44023
|
+
return mode === undefined ? path : "".concat(mode, "|").concat(path);
|
|
43981
44024
|
}
|
|
43982
44025
|
}
|
|
43983
44026
|
function symbolToEntityNameNode(symbol) {
|
|
@@ -43985,6 +44028,7 @@ var ts;
|
|
|
43985
44028
|
return symbol.parent ? ts.factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
|
|
43986
44029
|
}
|
|
43987
44030
|
function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
|
|
44031
|
+
var _a, _b, _c, _d;
|
|
43988
44032
|
var chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384));
|
|
43989
44033
|
var isTypeOf = meaning === 111551;
|
|
43990
44034
|
if (ts.some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
@@ -44000,6 +44044,7 @@ var ts;
|
|
|
44000
44044
|
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
44001
44045
|
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral("import"))
|
|
44002
44046
|
])));
|
|
44047
|
+
(_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
44003
44048
|
}
|
|
44004
44049
|
}
|
|
44005
44050
|
if (!specifier) {
|
|
@@ -44017,6 +44062,7 @@ var ts;
|
|
|
44017
44062
|
assertion = ts.factory.createImportTypeAssertionContainer(ts.factory.createAssertClause(ts.factory.createNodeArray([
|
|
44018
44063
|
ts.factory.createAssertEntry(ts.factory.createStringLiteral("resolution-mode"), ts.factory.createStringLiteral(swappedMode === ts.ModuleKind.ESNext ? "import" : "require"))
|
|
44019
44064
|
])));
|
|
44065
|
+
(_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
44020
44066
|
}
|
|
44021
44067
|
}
|
|
44022
44068
|
if (!assertion) {
|
|
@@ -44141,7 +44187,7 @@ var ts;
|
|
|
44141
44187
|
var text = rawtext;
|
|
44142
44188
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
44143
44189
|
i++;
|
|
44144
|
-
text = rawtext
|
|
44190
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
44145
44191
|
}
|
|
44146
44192
|
if (text !== rawtext) {
|
|
44147
44193
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -44433,7 +44479,7 @@ var ts;
|
|
|
44433
44479
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
44434
44480
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
44435
44481
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
44436
|
-
: "arg"
|
|
44482
|
+
: "arg".concat(index);
|
|
44437
44483
|
}
|
|
44438
44484
|
function rewriteModuleSpecifier(parent, lit) {
|
|
44439
44485
|
if (bundled) {
|
|
@@ -45246,7 +45292,7 @@ var ts;
|
|
|
45246
45292
|
}
|
|
45247
45293
|
return results_1;
|
|
45248
45294
|
}
|
|
45249
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
45295
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
45250
45296
|
};
|
|
45251
45297
|
}
|
|
45252
45298
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -45316,7 +45362,7 @@ var ts;
|
|
|
45316
45362
|
if (ref) {
|
|
45317
45363
|
return ref;
|
|
45318
45364
|
}
|
|
45319
|
-
var tempName = getUnusedName(rootName
|
|
45365
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
45320
45366
|
var statement = ts.factory.createVariableStatement(undefined, ts.factory.createVariableDeclarationList([
|
|
45321
45367
|
ts.factory.createVariableDeclaration(tempName, undefined, typeToTypeNodeHelper(staticType, context))
|
|
45322
45368
|
], 2));
|
|
@@ -45361,7 +45407,7 @@ var ts;
|
|
|
45361
45407
|
var original = input;
|
|
45362
45408
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
45363
45409
|
i++;
|
|
45364
|
-
input = original
|
|
45410
|
+
input = "".concat(original, "_").concat(i);
|
|
45365
45411
|
}
|
|
45366
45412
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
45367
45413
|
if (id) {
|
|
@@ -45467,15 +45513,15 @@ var ts;
|
|
|
45467
45513
|
if (nameType.flags & 384) {
|
|
45468
45514
|
var name = "" + nameType.value;
|
|
45469
45515
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
45470
|
-
return "\""
|
|
45516
|
+
return "\"".concat(ts.escapeString(name, 34), "\"");
|
|
45471
45517
|
}
|
|
45472
45518
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
45473
|
-
return "["
|
|
45519
|
+
return "[".concat(name, "]");
|
|
45474
45520
|
}
|
|
45475
45521
|
return name;
|
|
45476
45522
|
}
|
|
45477
45523
|
if (nameType.flags & 8192) {
|
|
45478
|
-
return "["
|
|
45524
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
45479
45525
|
}
|
|
45480
45526
|
}
|
|
45481
45527
|
}
|
|
@@ -47892,7 +47938,7 @@ var ts;
|
|
|
47892
47938
|
!leftName ? rightName :
|
|
47893
47939
|
!rightName ? leftName :
|
|
47894
47940
|
undefined;
|
|
47895
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
47941
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
47896
47942
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
47897
47943
|
params[i] = paramSymbol;
|
|
47898
47944
|
}
|
|
@@ -48686,7 +48732,7 @@ var ts;
|
|
|
48686
48732
|
var objectType;
|
|
48687
48733
|
return !!(type.flags & 8388608 && ts.getObjectFlags(objectType = type.objectType) & 32 &&
|
|
48688
48734
|
!isGenericMappedType(objectType) && isGenericIndexType(type.indexType) &&
|
|
48689
|
-
!objectType
|
|
48735
|
+
!(getMappedTypeModifiers(objectType) & 8) && !objectType.declaration.nameType);
|
|
48690
48736
|
}
|
|
48691
48737
|
function getApparentType(type) {
|
|
48692
48738
|
var t = !(type.flags & 465829888) ? type : getBaseConstraintOfType(type) || unknownType;
|
|
@@ -48694,9 +48740,9 @@ var ts;
|
|
|
48694
48740
|
t.flags & 2097152 ? getApparentTypeOfIntersectionType(t) :
|
|
48695
48741
|
t.flags & 402653316 ? globalStringType :
|
|
48696
48742
|
t.flags & 296 ? globalNumberType :
|
|
48697
|
-
t.flags & 2112 ? getGlobalBigIntType(
|
|
48743
|
+
t.flags & 2112 ? getGlobalBigIntType() :
|
|
48698
48744
|
t.flags & 528 ? globalBooleanType :
|
|
48699
|
-
t.flags & 12288 ? getGlobalESSymbolType(
|
|
48745
|
+
t.flags & 12288 ? getGlobalESSymbolType() :
|
|
48700
48746
|
t.flags & 67108864 ? emptyObjectType :
|
|
48701
48747
|
t.flags & 4194304 ? keyofConstraintType :
|
|
48702
48748
|
t.flags & 2 && !strictNullChecks ? emptyObjectType :
|
|
@@ -49618,7 +49664,7 @@ var ts;
|
|
|
49618
49664
|
return result;
|
|
49619
49665
|
}
|
|
49620
49666
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
49621
|
-
return aliasSymbol ? "@"
|
|
49667
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
49622
49668
|
}
|
|
49623
49669
|
function getPropagatingFlagsOfTypes(types, excludeKinds) {
|
|
49624
49670
|
var result = 0;
|
|
@@ -49781,7 +49827,7 @@ var ts;
|
|
|
49781
49827
|
return undefined;
|
|
49782
49828
|
}
|
|
49783
49829
|
function getSymbolPath(symbol) {
|
|
49784
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
49830
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
49785
49831
|
}
|
|
49786
49832
|
function getUnresolvedSymbolForEntityName(name) {
|
|
49787
49833
|
var identifier = name.kind === 161 ? name.right :
|
|
@@ -49792,7 +49838,7 @@ var ts;
|
|
|
49792
49838
|
var parentSymbol = name.kind === 161 ? getUnresolvedSymbolForEntityName(name.left) :
|
|
49793
49839
|
name.kind === 206 ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
49794
49840
|
undefined;
|
|
49795
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
49841
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
49796
49842
|
var result = unresolvedSymbols.get(path);
|
|
49797
49843
|
if (!result) {
|
|
49798
49844
|
unresolvedSymbols.set(path, result = createSymbol(524288, text, 1048576));
|
|
@@ -49858,7 +49904,7 @@ var ts;
|
|
|
49858
49904
|
if (substitute.flags & 3 || substitute === baseType) {
|
|
49859
49905
|
return baseType;
|
|
49860
49906
|
}
|
|
49861
|
-
var id = getTypeId(baseType)
|
|
49907
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
49862
49908
|
var cached = substitutionTypes.get(id);
|
|
49863
49909
|
if (cached) {
|
|
49864
49910
|
return cached;
|
|
@@ -50094,8 +50140,8 @@ var ts;
|
|
|
50094
50140
|
function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
|
|
50095
50141
|
return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
|
|
50096
50142
|
}
|
|
50097
|
-
function getGlobalESSymbolType(
|
|
50098
|
-
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0,
|
|
50143
|
+
function getGlobalESSymbolType() {
|
|
50144
|
+
return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, false))) || emptyObjectType;
|
|
50099
50145
|
}
|
|
50100
50146
|
function getGlobalPromiseType(reportErrors) {
|
|
50101
50147
|
return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors))) || emptyGenericType;
|
|
@@ -50156,8 +50202,8 @@ var ts;
|
|
|
50156
50202
|
deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
|
|
50157
50203
|
return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
|
|
50158
50204
|
}
|
|
50159
|
-
function getGlobalBigIntType(
|
|
50160
|
-
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0,
|
|
50205
|
+
function getGlobalBigIntType() {
|
|
50206
|
+
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
50161
50207
|
}
|
|
50162
50208
|
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
|
|
50163
50209
|
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
|
|
@@ -50717,9 +50763,9 @@ var ts;
|
|
|
50717
50763
|
return types[0];
|
|
50718
50764
|
}
|
|
50719
50765
|
var typeKey = !origin ? getTypeListId(types) :
|
|
50720
|
-
origin.flags & 1048576 ? "|"
|
|
50721
|
-
origin.flags & 2097152 ? "&"
|
|
50722
|
-
"#"
|
|
50766
|
+
origin.flags & 1048576 ? "|".concat(getTypeListId(origin.types)) :
|
|
50767
|
+
origin.flags & 2097152 ? "&".concat(getTypeListId(origin.types)) :
|
|
50768
|
+
"#".concat(origin.type.id, "|").concat(getTypeListId(types));
|
|
50723
50769
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
50724
50770
|
var type = unionTypes.get(id);
|
|
50725
50771
|
if (!type) {
|
|
@@ -51177,7 +51223,7 @@ var ts;
|
|
|
51177
51223
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4); })) {
|
|
51178
51224
|
return stringType;
|
|
51179
51225
|
}
|
|
51180
|
-
var id = getTypeListId(newTypes)
|
|
51226
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
51181
51227
|
var type = templateLiteralTypes.get(id);
|
|
51182
51228
|
if (!type) {
|
|
51183
51229
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -51248,7 +51294,7 @@ var ts;
|
|
|
51248
51294
|
return str;
|
|
51249
51295
|
}
|
|
51250
51296
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
51251
|
-
var id = getSymbolId(symbol)
|
|
51297
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
51252
51298
|
var result = stringMappingTypes.get(id);
|
|
51253
51299
|
if (!result) {
|
|
51254
51300
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -52186,7 +52232,7 @@ var ts;
|
|
|
52186
52232
|
function createUniqueESSymbolType(symbol) {
|
|
52187
52233
|
var type = createType(8192);
|
|
52188
52234
|
type.symbol = symbol;
|
|
52189
|
-
type.escapedName = "__@"
|
|
52235
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
52190
52236
|
return type;
|
|
52191
52237
|
}
|
|
52192
52238
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -53715,20 +53761,20 @@ var ts;
|
|
|
53715
53761
|
switch (msg.code) {
|
|
53716
53762
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
53717
53763
|
if (path.indexOf("new ") === 0) {
|
|
53718
|
-
path = "("
|
|
53764
|
+
path = "(".concat(path, ")");
|
|
53719
53765
|
}
|
|
53720
53766
|
var str = "" + args[0];
|
|
53721
53767
|
if (path.length === 0) {
|
|
53722
|
-
path = ""
|
|
53768
|
+
path = "".concat(str);
|
|
53723
53769
|
}
|
|
53724
53770
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
53725
|
-
path = path
|
|
53771
|
+
path = "".concat(path, ".").concat(str);
|
|
53726
53772
|
}
|
|
53727
53773
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
53728
|
-
path = ""
|
|
53774
|
+
path = "".concat(path).concat(str);
|
|
53729
53775
|
}
|
|
53730
53776
|
else {
|
|
53731
|
-
path = path
|
|
53777
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
53732
53778
|
}
|
|
53733
53779
|
break;
|
|
53734
53780
|
}
|
|
@@ -53755,7 +53801,7 @@ var ts;
|
|
|
53755
53801
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
53756
53802
|
? ""
|
|
53757
53803
|
: "...";
|
|
53758
|
-
path = ""
|
|
53804
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
53759
53805
|
}
|
|
53760
53806
|
break;
|
|
53761
53807
|
}
|
|
@@ -53768,7 +53814,7 @@ var ts;
|
|
|
53768
53814
|
break;
|
|
53769
53815
|
}
|
|
53770
53816
|
default:
|
|
53771
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
53817
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
53772
53818
|
}
|
|
53773
53819
|
}
|
|
53774
53820
|
if (path) {
|
|
@@ -53863,7 +53909,7 @@ var ts;
|
|
|
53863
53909
|
if ((globalStringType === source && stringType === target) ||
|
|
53864
53910
|
(globalNumberType === source && numberType === target) ||
|
|
53865
53911
|
(globalBooleanType === source && booleanType === target) ||
|
|
53866
|
-
(getGlobalESSymbolType(
|
|
53912
|
+
(getGlobalESSymbolType() === source && esSymbolType === target)) {
|
|
53867
53913
|
reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType);
|
|
53868
53914
|
}
|
|
53869
53915
|
}
|
|
@@ -55661,7 +55707,7 @@ var ts;
|
|
|
55661
55707
|
var constraintMarker = "";
|
|
55662
55708
|
var sourceId = getTypeReferenceId(source, 0);
|
|
55663
55709
|
var targetId = getTypeReferenceId(target, 0);
|
|
55664
|
-
return ""
|
|
55710
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
55665
55711
|
function getTypeReferenceId(type, depth) {
|
|
55666
55712
|
if (depth === void 0) { depth = 0; }
|
|
55667
55713
|
var result = "" + type.target.id;
|
|
@@ -55697,7 +55743,7 @@ var ts;
|
|
|
55697
55743
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
55698
55744
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
55699
55745
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
55700
|
-
source.id
|
|
55746
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
55701
55747
|
}
|
|
55702
55748
|
function forEachProperty(prop, callback) {
|
|
55703
55749
|
if (ts.getCheckFlags(prop) & 6) {
|
|
@@ -57544,10 +57590,10 @@ var ts;
|
|
|
57544
57590
|
case 79:
|
|
57545
57591
|
if (!ts.isThisInTypeQuery(node)) {
|
|
57546
57592
|
var symbol = getResolvedSymbol(node);
|
|
57547
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
57593
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
57548
57594
|
}
|
|
57549
57595
|
case 108:
|
|
57550
|
-
return "0|"
|
|
57596
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
57551
57597
|
case 230:
|
|
57552
57598
|
case 212:
|
|
57553
57599
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -60908,7 +60954,7 @@ var ts;
|
|
|
60908
60954
|
!leftName ? rightName :
|
|
60909
60955
|
!rightName ? leftName :
|
|
60910
60956
|
undefined;
|
|
60911
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
60957
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
60912
60958
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
60913
60959
|
params[i] = paramSymbol;
|
|
60914
60960
|
}
|
|
@@ -67587,8 +67633,11 @@ var ts;
|
|
|
67587
67633
|
if (node.assertions) {
|
|
67588
67634
|
var override = ts.getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode);
|
|
67589
67635
|
if (override) {
|
|
67636
|
+
if (!ts.isNightly()) {
|
|
67637
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next);
|
|
67638
|
+
}
|
|
67590
67639
|
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
67591
|
-
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.
|
|
67640
|
+
grammarErrorOnNode(node.assertions.assertClause, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
67592
67641
|
}
|
|
67593
67642
|
}
|
|
67594
67643
|
}
|
|
@@ -68956,7 +69005,7 @@ var ts;
|
|
|
68956
69005
|
return;
|
|
68957
69006
|
}
|
|
68958
69007
|
var symbol = getSymbolOfNode(node);
|
|
68959
|
-
if (symbol.flags & 2097152 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node)) {
|
|
69008
|
+
if (symbol.flags & 2097152 && ts.isVariableDeclarationInitializedToBareOrAccessedRequire(node.kind === 203 ? node.parent.parent : node)) {
|
|
68960
69009
|
checkAliasSymbol(node);
|
|
68961
69010
|
return;
|
|
68962
69011
|
}
|
|
@@ -69105,7 +69154,7 @@ var ts;
|
|
|
69105
69154
|
if (ts.isIdentifier(childNode)) {
|
|
69106
69155
|
var childSymbol = getSymbolAtLocation(childNode);
|
|
69107
69156
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
69108
|
-
if (ts.isIdentifier(expr)) {
|
|
69157
|
+
if (ts.isIdentifier(expr) || ts.isIdentifier(testedNode) && ts.isBinaryExpression(testedNode.parent)) {
|
|
69109
69158
|
return true;
|
|
69110
69159
|
}
|
|
69111
69160
|
var testedExpression = testedNode.parent;
|
|
@@ -69558,7 +69607,7 @@ var ts;
|
|
|
69558
69607
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
69559
69608
|
var ctorType = getGlobalESSymbolConstructorSymbol(false);
|
|
69560
69609
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
69561
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
69610
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
69562
69611
|
}
|
|
69563
69612
|
function getIterationTypesOfIterableSlow(type, resolver, errorNode) {
|
|
69564
69613
|
var _a;
|
|
@@ -71207,8 +71256,11 @@ var ts;
|
|
|
71207
71256
|
var validForTypeAssertions = ts.isExclusivelyTypeOnlyImportOrExport(declaration);
|
|
71208
71257
|
var override = ts.getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : undefined);
|
|
71209
71258
|
if (validForTypeAssertions && override) {
|
|
71259
|
+
if (!ts.isNightly()) {
|
|
71260
|
+
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);
|
|
71261
|
+
}
|
|
71210
71262
|
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
71211
|
-
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.
|
|
71263
|
+
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext);
|
|
71212
71264
|
}
|
|
71213
71265
|
return;
|
|
71214
71266
|
}
|
|
@@ -75961,7 +76013,7 @@ var ts;
|
|
|
75961
76013
|
value >= 52 && value < 62 ? 48 + value - 52 :
|
|
75962
76014
|
value === 62 ? 43 :
|
|
75963
76015
|
value === 63 ? 47 :
|
|
75964
|
-
ts.Debug.fail(value
|
|
76016
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
75965
76017
|
}
|
|
75966
76018
|
function base64FormatDecode(ch) {
|
|
75967
76019
|
return ch >= 65 && ch <= 90 ? ch - 65 :
|
|
@@ -76034,7 +76086,7 @@ var ts;
|
|
|
76034
76086
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
76035
76087
|
if (decoder.error !== undefined) {
|
|
76036
76088
|
if (host.log) {
|
|
76037
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
76089
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
76038
76090
|
}
|
|
76039
76091
|
decodedMappings = ts.emptyArray;
|
|
76040
76092
|
}
|
|
@@ -78483,7 +78535,7 @@ var ts;
|
|
|
78483
78535
|
var substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue);
|
|
78484
78536
|
if (!compilerOptions.removeComments) {
|
|
78485
78537
|
var originalNode = ts.getOriginalNode(node, ts.isAccessExpression);
|
|
78486
|
-
ts.addSyntheticTrailingComment(substitute, 3, " "
|
|
78538
|
+
ts.addSyntheticTrailingComment(substitute, 3, " ".concat(safeMultiLineComment(ts.getTextOfNode(originalNode)), " "));
|
|
78487
78539
|
}
|
|
78488
78540
|
return substitute;
|
|
78489
78541
|
}
|
|
@@ -79734,8 +79786,8 @@ var ts;
|
|
|
79734
79786
|
}
|
|
79735
79787
|
function createHoistedVariableForClass(name, node) {
|
|
79736
79788
|
var className = getPrivateIdentifierEnvironment().className;
|
|
79737
|
-
var prefix = className ? "_"
|
|
79738
|
-
var identifier = factory.createUniqueName(prefix
|
|
79789
|
+
var prefix = className ? "_".concat(className) : "";
|
|
79790
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16);
|
|
79739
79791
|
if (resolver.getNodeCheckFlags(node) & 524288) {
|
|
79740
79792
|
addBlockScopedVariable(identifier);
|
|
79741
79793
|
}
|
|
@@ -81393,7 +81445,7 @@ var ts;
|
|
|
81393
81445
|
specifierSourceImports = new ts.Map();
|
|
81394
81446
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
81395
81447
|
}
|
|
81396
|
-
var generatedName = factory.createUniqueName("_"
|
|
81448
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 | 32 | 64);
|
|
81397
81449
|
var specifier = factory.createImportSpecifier(false, factory.createIdentifier(name), generatedName);
|
|
81398
81450
|
generatedName.generatedImportReference = specifier;
|
|
81399
81451
|
specifierSourceImports.set(name, specifier);
|
|
@@ -82334,11 +82386,11 @@ var ts;
|
|
|
82334
82386
|
}
|
|
82335
82387
|
else {
|
|
82336
82388
|
if (node.kind === 246) {
|
|
82337
|
-
labelMarker = "break-"
|
|
82389
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
82338
82390
|
setLabeledJump(convertedLoopState, true, ts.idText(label), labelMarker);
|
|
82339
82391
|
}
|
|
82340
82392
|
else {
|
|
82341
|
-
labelMarker = "continue-"
|
|
82393
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
82342
82394
|
setLabeledJump(convertedLoopState, false, ts.idText(label), labelMarker);
|
|
82343
82395
|
}
|
|
82344
82396
|
}
|
|
@@ -87993,7 +88045,7 @@ var ts;
|
|
|
87993
88045
|
return getTypeAliasDeclarationVisibilityError;
|
|
87994
88046
|
}
|
|
87995
88047
|
else {
|
|
87996
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
88048
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
87997
88049
|
}
|
|
87998
88050
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
87999
88051
|
if (node.kind === 254 || node.kind === 203) {
|
|
@@ -88190,7 +88242,7 @@ var ts;
|
|
|
88190
88242
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
88191
88243
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
88192
88244
|
default:
|
|
88193
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
88245
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
88194
88246
|
}
|
|
88195
88247
|
}
|
|
88196
88248
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -88340,7 +88392,8 @@ var ts;
|
|
|
88340
88392
|
trackReferencedAmbientModule: trackReferencedAmbientModule,
|
|
88341
88393
|
trackExternalModuleSymbolOfImportTypeNode: trackExternalModuleSymbolOfImportTypeNode,
|
|
88342
88394
|
reportNonlocalAugmentation: reportNonlocalAugmentation,
|
|
88343
|
-
reportNonSerializableProperty: reportNonSerializableProperty
|
|
88395
|
+
reportNonSerializableProperty: reportNonSerializableProperty,
|
|
88396
|
+
reportImportTypeNodeResolutionModeOverride: reportImportTypeNodeResolutionModeOverride,
|
|
88344
88397
|
};
|
|
88345
88398
|
var errorNameNode;
|
|
88346
88399
|
var errorFallbackNode;
|
|
@@ -88462,6 +88515,11 @@ var ts;
|
|
|
88462
88515
|
context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
|
|
88463
88516
|
}
|
|
88464
88517
|
}
|
|
88518
|
+
function reportImportTypeNodeResolutionModeOverride() {
|
|
88519
|
+
if (!ts.isNightly() && (errorNameNode || errorFallbackNode)) {
|
|
88520
|
+
context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next));
|
|
88521
|
+
}
|
|
88522
|
+
}
|
|
88465
88523
|
function transformDeclarationsForJS(sourceFile, bundled) {
|
|
88466
88524
|
var oldDiag = getSymbolAccessibilityDiagnostic;
|
|
88467
88525
|
getSymbolAccessibilityDiagnostic = function (s) { return (s.errorNode && ts.canProduceDiagnostics(s.errorNode) ? ts.createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : ({
|
|
@@ -88856,29 +88914,39 @@ var ts;
|
|
|
88856
88914
|
}
|
|
88857
88915
|
function transformImportDeclaration(decl) {
|
|
88858
88916
|
if (!decl.importClause) {
|
|
88859
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88917
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88860
88918
|
}
|
|
88861
88919
|
var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
|
|
88862
88920
|
if (!decl.importClause.namedBindings) {
|
|
88863
|
-
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88921
|
+
return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88864
88922
|
}
|
|
88865
88923
|
if (decl.importClause.namedBindings.kind === 268) {
|
|
88866
88924
|
var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
|
|
88867
|
-
return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88925
|
+
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;
|
|
88868
88926
|
}
|
|
88869
88927
|
var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
|
|
88870
88928
|
if ((bindingList && bindingList.length) || visibleDefaultBinding) {
|
|
88871
|
-
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),
|
|
88929
|
+
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));
|
|
88872
88930
|
}
|
|
88873
88931
|
if (resolver.isImportRequiredByAugmentation(decl)) {
|
|
88874
|
-
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier),
|
|
88932
|
+
return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause));
|
|
88933
|
+
}
|
|
88934
|
+
}
|
|
88935
|
+
function getResolutionModeOverrideForClauseInNightly(assertClause) {
|
|
88936
|
+
var mode = ts.getResolutionModeOverrideForClause(assertClause);
|
|
88937
|
+
if (mode !== undefined) {
|
|
88938
|
+
if (!ts.isNightly()) {
|
|
88939
|
+
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));
|
|
88940
|
+
}
|
|
88941
|
+
return assertClause;
|
|
88875
88942
|
}
|
|
88943
|
+
return undefined;
|
|
88876
88944
|
}
|
|
88877
88945
|
function transformAndReplaceLatePaintedStatements(statements) {
|
|
88878
88946
|
while (ts.length(lateMarkedStatements)) {
|
|
88879
88947
|
var i = lateMarkedStatements.shift();
|
|
88880
88948
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
88881
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
88949
|
+
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));
|
|
88882
88950
|
}
|
|
88883
88951
|
var priorNeedsDeclare = needsDeclare;
|
|
88884
88952
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -89043,7 +89111,7 @@ var ts;
|
|
|
89043
89111
|
return cleanup(input);
|
|
89044
89112
|
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));
|
|
89045
89113
|
}
|
|
89046
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
89114
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
89047
89115
|
}
|
|
89048
89116
|
}
|
|
89049
89117
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -89293,7 +89361,7 @@ var ts;
|
|
|
89293
89361
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
89294
89362
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
89295
89363
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
89296
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
89364
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16);
|
|
89297
89365
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
89298
89366
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
89299
89367
|
errorNode: extendsClause_1,
|
|
@@ -89330,7 +89398,7 @@ var ts;
|
|
|
89330
89398
|
}))));
|
|
89331
89399
|
}
|
|
89332
89400
|
}
|
|
89333
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
89401
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
89334
89402
|
function cleanup(node) {
|
|
89335
89403
|
if (isEnclosingDeclaration(input)) {
|
|
89336
89404
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -90099,13 +90167,13 @@ var ts;
|
|
|
90099
90167
|
if (ts.fileExtensionIs(inputFileName, ".json"))
|
|
90100
90168
|
return;
|
|
90101
90169
|
if (js && configFile.options.sourceMap) {
|
|
90102
|
-
addOutput(js
|
|
90170
|
+
addOutput("".concat(js, ".map"));
|
|
90103
90171
|
}
|
|
90104
90172
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
90105
90173
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
90106
90174
|
addOutput(dts);
|
|
90107
90175
|
if (configFile.options.declarationMap) {
|
|
90108
|
-
addOutput(dts
|
|
90176
|
+
addOutput("".concat(dts, ".map"));
|
|
90109
90177
|
}
|
|
90110
90178
|
}
|
|
90111
90179
|
}
|
|
@@ -90165,7 +90233,7 @@ var ts;
|
|
|
90165
90233
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
90166
90234
|
if (ts.outFile(configFile.options)) {
|
|
90167
90235
|
var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath;
|
|
90168
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
90236
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
90169
90237
|
}
|
|
90170
90238
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
90171
90239
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -90184,7 +90252,7 @@ var ts;
|
|
|
90184
90252
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
90185
90253
|
if (buildInfoPath)
|
|
90186
90254
|
return buildInfoPath;
|
|
90187
|
-
return ts.Debug.fail("project "
|
|
90255
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
90188
90256
|
}
|
|
90189
90257
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
90190
90258
|
function emitFiles(resolver, host, targetSourceFile, _a, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
|
|
@@ -90396,7 +90464,7 @@ var ts;
|
|
|
90396
90464
|
if (!writer.isAtStartOfLine())
|
|
90397
90465
|
writer.rawWrite(newLine);
|
|
90398
90466
|
sourceMapUrlPos = writer.getTextPos();
|
|
90399
|
-
writer.writeComment("//# "
|
|
90467
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL));
|
|
90400
90468
|
}
|
|
90401
90469
|
if (sourceMapFilePath) {
|
|
90402
90470
|
var sourceMap = sourceMapGenerator.toString();
|
|
@@ -90436,7 +90504,7 @@ var ts;
|
|
|
90436
90504
|
if (mapOptions.inlineSourceMap) {
|
|
90437
90505
|
var sourceMapText = sourceMapGenerator.toString();
|
|
90438
90506
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
90439
|
-
return "data:application/json;base64,"
|
|
90507
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
90440
90508
|
}
|
|
90441
90509
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
90442
90510
|
if (mapOptions.mapRoot) {
|
|
@@ -90600,7 +90668,7 @@ var ts;
|
|
|
90600
90668
|
return;
|
|
90601
90669
|
break;
|
|
90602
90670
|
default:
|
|
90603
|
-
ts.Debug.fail("Unexpected path: "
|
|
90671
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
90604
90672
|
}
|
|
90605
90673
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
90606
90674
|
},
|
|
@@ -91413,7 +91481,7 @@ var ts;
|
|
|
91413
91481
|
return writeTokenNode(node, writeKeyword);
|
|
91414
91482
|
if (ts.isTokenKind(node.kind))
|
|
91415
91483
|
return writeTokenNode(node, writePunctuation);
|
|
91416
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
91484
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
91417
91485
|
}
|
|
91418
91486
|
function emitMappedTypeParameter(node) {
|
|
91419
91487
|
emit(node.name);
|
|
@@ -91553,14 +91621,14 @@ var ts;
|
|
|
91553
91621
|
}
|
|
91554
91622
|
}
|
|
91555
91623
|
function emitPlaceholder(hint, node, snippet) {
|
|
91556
|
-
nonEscapingWrite("${"
|
|
91624
|
+
nonEscapingWrite("${".concat(snippet.order, ":"));
|
|
91557
91625
|
pipelineEmitWithHintWorker(hint, node, false);
|
|
91558
91626
|
nonEscapingWrite("}");
|
|
91559
91627
|
}
|
|
91560
91628
|
function emitTabStop(hint, node, snippet) {
|
|
91561
|
-
ts.Debug.assert(node.kind === 236, "A tab stop cannot be attached to a node of kind "
|
|
91629
|
+
ts.Debug.assert(node.kind === 236, "A tab stop cannot be attached to a node of kind ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
91562
91630
|
ts.Debug.assert(hint !== 5, "A tab stop cannot be attached to an embedded statement.");
|
|
91563
|
-
nonEscapingWrite("$"
|
|
91631
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
91564
91632
|
}
|
|
91565
91633
|
function emitIdentifier(node) {
|
|
91566
91634
|
var writeText = node.symbol ? writeSymbol : write;
|
|
@@ -93237,17 +93305,17 @@ var ts;
|
|
|
93237
93305
|
writeLine();
|
|
93238
93306
|
}
|
|
93239
93307
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
93240
|
-
writeComment("/// <amd-module name=\""
|
|
93308
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
93241
93309
|
writeLine();
|
|
93242
93310
|
}
|
|
93243
93311
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
93244
93312
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
93245
93313
|
var dep = _b[_a];
|
|
93246
93314
|
if (dep.name) {
|
|
93247
|
-
writeComment("/// <amd-dependency name=\""
|
|
93315
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
93248
93316
|
}
|
|
93249
93317
|
else {
|
|
93250
|
-
writeComment("/// <amd-dependency path=\""
|
|
93318
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
93251
93319
|
}
|
|
93252
93320
|
writeLine();
|
|
93253
93321
|
}
|
|
@@ -93255,7 +93323,7 @@ var ts;
|
|
|
93255
93323
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
93256
93324
|
var directive = files_2[_c];
|
|
93257
93325
|
var pos = writer.getTextPos();
|
|
93258
|
-
writeComment("/// <reference path=\""
|
|
93326
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
93259
93327
|
if (bundleFileInfo)
|
|
93260
93328
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
93261
93329
|
writeLine();
|
|
@@ -93264,9 +93332,9 @@ var ts;
|
|
|
93264
93332
|
var directive = types_24[_d];
|
|
93265
93333
|
var pos = writer.getTextPos();
|
|
93266
93334
|
var resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile === null || currentSourceFile === void 0 ? void 0 : currentSourceFile.impliedNodeFormat)
|
|
93267
|
-
? "resolution-mode=\""
|
|
93335
|
+
? "resolution-mode=\"".concat(directive.resolutionMode === ts.ModuleKind.ESNext ? "import" : "require", "\"")
|
|
93268
93336
|
: "";
|
|
93269
|
-
writeComment("/// <reference types=\""
|
|
93337
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" ").concat(resolutionMode, "/>"));
|
|
93270
93338
|
if (bundleFileInfo)
|
|
93271
93339
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: !directive.resolutionMode ? "type" : directive.resolutionMode === ts.ModuleKind.ESNext ? "type-import" : "type-require", data: directive.fileName });
|
|
93272
93340
|
writeLine();
|
|
@@ -93274,7 +93342,7 @@ var ts;
|
|
|
93274
93342
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
93275
93343
|
var directive = libs_1[_e];
|
|
93276
93344
|
var pos = writer.getTextPos();
|
|
93277
|
-
writeComment("/// <reference lib=\""
|
|
93345
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
93278
93346
|
if (bundleFileInfo)
|
|
93279
93347
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib", data: directive.fileName });
|
|
93280
93348
|
writeLine();
|
|
@@ -93976,9 +94044,9 @@ var ts;
|
|
|
93976
94044
|
var textSourceNode = node.textSourceNode;
|
|
93977
94045
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
93978
94046
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
93979
|
-
return jsxAttributeEscape ? "\""
|
|
93980
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\""
|
|
93981
|
-
"\""
|
|
94047
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
94048
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
94049
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
93982
94050
|
}
|
|
93983
94051
|
else {
|
|
93984
94052
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -94381,8 +94449,8 @@ var ts;
|
|
|
94381
94449
|
}
|
|
94382
94450
|
function formatSynthesizedComment(comment) {
|
|
94383
94451
|
return comment.kind === 3
|
|
94384
|
-
? "/*"
|
|
94385
|
-
: "//"
|
|
94452
|
+
? "/*".concat(comment.text, "*/")
|
|
94453
|
+
: "//".concat(comment.text);
|
|
94386
94454
|
}
|
|
94387
94455
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
94388
94456
|
enterComment();
|
|
@@ -95016,18 +95084,18 @@ var ts;
|
|
|
95016
95084
|
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;
|
|
95017
95085
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
95018
95086
|
if (!newPath) {
|
|
95019
|
-
writeLog("Project: "
|
|
95087
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
95020
95088
|
return true;
|
|
95021
95089
|
}
|
|
95022
95090
|
fileOrDirectoryPath = newPath;
|
|
95023
95091
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
95024
95092
|
return false;
|
|
95025
95093
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
95026
|
-
writeLog("Project: "
|
|
95094
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
95027
95095
|
return true;
|
|
95028
95096
|
}
|
|
95029
95097
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
95030
|
-
writeLog("Project: "
|
|
95098
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
95031
95099
|
return true;
|
|
95032
95100
|
}
|
|
95033
95101
|
if (!program)
|
|
@@ -95046,7 +95114,7 @@ var ts;
|
|
|
95046
95114
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
95047
95115
|
if (hasSourceFile((filePathWithoutExtension + ".ts")) ||
|
|
95048
95116
|
hasSourceFile((filePathWithoutExtension + ".tsx"))) {
|
|
95049
|
-
writeLog("Project: "
|
|
95117
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
95050
95118
|
return true;
|
|
95051
95119
|
}
|
|
95052
95120
|
return false;
|
|
@@ -95114,36 +95182,36 @@ var ts;
|
|
|
95114
95182
|
host.useCaseSensitiveFileNames();
|
|
95115
95183
|
}
|
|
95116
95184
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
95117
|
-
log("ExcludeWatcher:: Added:: "
|
|
95185
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
95118
95186
|
return {
|
|
95119
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
95187
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
95120
95188
|
};
|
|
95121
95189
|
}
|
|
95122
95190
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
95123
|
-
log("FileWatcher:: Added:: "
|
|
95191
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
95124
95192
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
95125
95193
|
return {
|
|
95126
95194
|
close: function () {
|
|
95127
|
-
log("FileWatcher:: Close:: "
|
|
95195
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
95128
95196
|
watcher.close();
|
|
95129
95197
|
}
|
|
95130
95198
|
};
|
|
95131
95199
|
}
|
|
95132
95200
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
95133
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
95201
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
95134
95202
|
log(watchInfo);
|
|
95135
95203
|
var start = ts.timestamp();
|
|
95136
95204
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
95137
95205
|
var elapsed = ts.timestamp() - start;
|
|
95138
|
-
log("Elapsed:: "
|
|
95206
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
95139
95207
|
return {
|
|
95140
95208
|
close: function () {
|
|
95141
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
95209
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
95142
95210
|
log(watchInfo);
|
|
95143
95211
|
var start = ts.timestamp();
|
|
95144
95212
|
watcher.close();
|
|
95145
95213
|
var elapsed = ts.timestamp() - start;
|
|
95146
|
-
log("Elapsed:: "
|
|
95214
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
95147
95215
|
}
|
|
95148
95216
|
};
|
|
95149
95217
|
}
|
|
@@ -95153,16 +95221,16 @@ var ts;
|
|
|
95153
95221
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
95154
95222
|
args[_i] = arguments[_i];
|
|
95155
95223
|
}
|
|
95156
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
95224
|
+
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));
|
|
95157
95225
|
log(triggerredInfo);
|
|
95158
95226
|
var start = ts.timestamp();
|
|
95159
95227
|
cb.call.apply(cb, __spreadArray([undefined], args, false));
|
|
95160
95228
|
var elapsed = ts.timestamp() - start;
|
|
95161
|
-
log("Elapsed:: "
|
|
95229
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
95162
95230
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
95163
95231
|
}
|
|
95164
95232
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
95165
|
-
return "WatchInfo: "
|
|
95233
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
95166
95234
|
}
|
|
95167
95235
|
}
|
|
95168
95236
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -95456,12 +95524,12 @@ var ts;
|
|
|
95456
95524
|
}
|
|
95457
95525
|
ts.formatDiagnostics = formatDiagnostics;
|
|
95458
95526
|
function formatDiagnostic(diagnostic, host) {
|
|
95459
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
95527
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
95460
95528
|
if (diagnostic.file) {
|
|
95461
95529
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
|
|
95462
95530
|
var fileName = diagnostic.file.fileName;
|
|
95463
95531
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
95464
|
-
return relativeFileName
|
|
95532
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
95465
95533
|
}
|
|
95466
95534
|
return errorMessage;
|
|
95467
95535
|
}
|
|
@@ -95539,9 +95607,9 @@ var ts;
|
|
|
95539
95607
|
var output = "";
|
|
95540
95608
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
95541
95609
|
output += ":";
|
|
95542
|
-
output += color(""
|
|
95610
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
95543
95611
|
output += ":";
|
|
95544
|
-
output += color(""
|
|
95612
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
95545
95613
|
return output;
|
|
95546
95614
|
}
|
|
95547
95615
|
ts.formatLocation = formatLocation;
|
|
@@ -95555,7 +95623,7 @@ var ts;
|
|
|
95555
95623
|
output += " - ";
|
|
95556
95624
|
}
|
|
95557
95625
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
95558
|
-
output += formatColorAndReset(" TS"
|
|
95626
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
95559
95627
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
95560
95628
|
if (diagnostic.file) {
|
|
95561
95629
|
output += host.getNewLine();
|
|
@@ -95616,7 +95684,7 @@ var ts;
|
|
|
95616
95684
|
var result = void 0;
|
|
95617
95685
|
var mode = getModeForFileReference(name, containingFileMode);
|
|
95618
95686
|
var strName = ts.isString(name) ? name : name.fileName.toLowerCase();
|
|
95619
|
-
var cacheKey = mode !== undefined ? mode
|
|
95687
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(strName) : strName;
|
|
95620
95688
|
if (cache.has(cacheKey)) {
|
|
95621
95689
|
result = cache.get(cacheKey);
|
|
95622
95690
|
}
|
|
@@ -95711,7 +95779,7 @@ var ts;
|
|
|
95711
95779
|
var result = void 0;
|
|
95712
95780
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
95713
95781
|
i++;
|
|
95714
|
-
var cacheKey = mode !== undefined ? mode
|
|
95782
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
95715
95783
|
if (cache.has(cacheKey)) {
|
|
95716
95784
|
result = cache.get(cacheKey);
|
|
95717
95785
|
}
|
|
@@ -97572,7 +97640,7 @@ var ts;
|
|
|
97572
97640
|
ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective);
|
|
97573
97641
|
var mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
97574
97642
|
if (mode && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node16 && ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
|
|
97575
|
-
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.
|
|
97643
|
+
programDiagnostics.add(ts.createDiagnosticForRange(file, ref, ts.Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext));
|
|
97576
97644
|
}
|
|
97577
97645
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: ts.FileIncludeKind.TypeReferenceDirective, file: file.path, index: index, });
|
|
97578
97646
|
}
|
|
@@ -97627,7 +97695,7 @@ var ts;
|
|
|
97627
97695
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
97628
97696
|
i++;
|
|
97629
97697
|
}
|
|
97630
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
97698
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
97631
97699
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
97632
97700
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
97633
97701
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -98381,10 +98449,10 @@ var ts;
|
|
|
98381
98449
|
}
|
|
98382
98450
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
98383
98451
|
var dirPath = host.toPath(dir);
|
|
98384
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
98452
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
98385
98453
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
98386
98454
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
98387
|
-
ts.startsWith(dirPath, declDirPath
|
|
98455
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
98388
98456
|
}
|
|
98389
98457
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
98390
98458
|
var _a;
|
|
@@ -98432,7 +98500,7 @@ var ts;
|
|
|
98432
98500
|
var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));
|
|
98433
98501
|
if (isFile && result) {
|
|
98434
98502
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
98435
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
98503
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
98436
98504
|
}
|
|
98437
98505
|
return result;
|
|
98438
98506
|
}) || false;
|
|
@@ -98810,7 +98878,7 @@ var ts;
|
|
|
98810
98878
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
98811
98879
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98812
98880
|
if (firstDts_1) {
|
|
98813
|
-
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: "
|
|
98881
|
+
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; }))); });
|
|
98814
98882
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98815
98883
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98816
98884
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -99202,7 +99270,7 @@ var ts;
|
|
|
99202
99270
|
ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
|
|
99203
99271
|
return;
|
|
99204
99272
|
}
|
|
99205
|
-
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: "
|
|
99273
|
+
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));
|
|
99206
99274
|
if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
|
|
99207
99275
|
return;
|
|
99208
99276
|
handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
@@ -100220,7 +100288,7 @@ var ts;
|
|
|
100220
100288
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
100221
100289
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
100222
100290
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
100223
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
100291
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
100224
100292
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
100225
100293
|
return {
|
|
100226
100294
|
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator),
|
|
@@ -100612,14 +100680,14 @@ var ts;
|
|
|
100612
100680
|
if (options === void 0) { options = {}; }
|
|
100613
100681
|
var info = getInfo(importingSourceFile.path, host);
|
|
100614
100682
|
var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
|
|
100615
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, true, options.overrideImportMode); });
|
|
100683
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, true, options.overrideImportMode); });
|
|
100616
100684
|
}
|
|
100617
100685
|
moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
|
|
100618
100686
|
function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
|
|
100619
100687
|
if (options === void 0) { options = {}; }
|
|
100620
100688
|
var info = getInfo(importingSourceFileName, host);
|
|
100621
100689
|
var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences, options);
|
|
100622
|
-
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode); }) ||
|
|
100690
|
+
return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode); }) ||
|
|
100623
100691
|
getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
|
|
100624
100692
|
}
|
|
100625
100693
|
function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options) {
|
|
@@ -100685,7 +100753,7 @@ var ts;
|
|
|
100685
100753
|
var relativeSpecifiers;
|
|
100686
100754
|
for (var _i = 0, modulePaths_1 = modulePaths; _i < modulePaths_1.length; _i++) {
|
|
100687
100755
|
var modulePath = modulePaths_1[_i];
|
|
100688
|
-
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, undefined, options.overrideImportMode);
|
|
100756
|
+
var specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, undefined, options.overrideImportMode);
|
|
100689
100757
|
nodeModulesSpecifiers = ts.append(nodeModulesSpecifiers, specifier);
|
|
100690
100758
|
if (specifier && modulePath.isRedirect) {
|
|
100691
100759
|
return nodeModulesSpecifiers;
|
|
@@ -101016,7 +101084,7 @@ var ts;
|
|
|
101016
101084
|
? removeExtensionAndIndexPostFix(relativePath, ending, compilerOptions)
|
|
101017
101085
|
: ts.removeFileExtension(relativePath);
|
|
101018
101086
|
}
|
|
101019
|
-
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, packageNameOnly, overrideMode) {
|
|
101087
|
+
function tryGetModuleNameAsNodeModule(_a, _b, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
|
|
101020
101088
|
var path = _a.path, isRedirect = _a.isRedirect;
|
|
101021
101089
|
var getCanonicalFileName = _b.getCanonicalFileName, sourceDirectory = _b.sourceDirectory;
|
|
101022
101090
|
if (!host.fileExists || !host.readFile) {
|
|
@@ -101029,8 +101097,9 @@ var ts;
|
|
|
101029
101097
|
var moduleSpecifier = path;
|
|
101030
101098
|
var isPackageRootPath = false;
|
|
101031
101099
|
if (!packageNameOnly) {
|
|
101100
|
+
var preferences = getPreferences(host, userPreferences, options, importingSourceFile);
|
|
101032
101101
|
var packageRootIndex = parts.packageRootIndex;
|
|
101033
|
-
var
|
|
101102
|
+
var moduleFileName = void 0;
|
|
101034
101103
|
while (true) {
|
|
101035
101104
|
var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath, blockedByExports = _c.blockedByExports, verbatimFromExports = _c.verbatimFromExports;
|
|
101036
101105
|
if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Classic) {
|
|
@@ -101046,11 +101115,11 @@ var ts;
|
|
|
101046
101115
|
isPackageRootPath = true;
|
|
101047
101116
|
break;
|
|
101048
101117
|
}
|
|
101049
|
-
if (!
|
|
101050
|
-
|
|
101118
|
+
if (!moduleFileName)
|
|
101119
|
+
moduleFileName = moduleFileToTry;
|
|
101051
101120
|
packageRootIndex = path.indexOf(ts.directorySeparator, packageRootIndex + 1);
|
|
101052
101121
|
if (packageRootIndex === -1) {
|
|
101053
|
-
moduleSpecifier =
|
|
101122
|
+
moduleSpecifier = removeExtensionAndIndexPostFix(moduleFileName, preferences.ending, options, host);
|
|
101054
101123
|
break;
|
|
101055
101124
|
}
|
|
101056
101125
|
}
|
|
@@ -101099,7 +101168,7 @@ var ts;
|
|
|
101099
101168
|
moduleFileToTry = ts.combinePaths(packageRootPath, fromPaths);
|
|
101100
101169
|
}
|
|
101101
101170
|
}
|
|
101102
|
-
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main;
|
|
101171
|
+
var mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js";
|
|
101103
101172
|
if (ts.isString(mainFileRelative)) {
|
|
101104
101173
|
var mainExportFile = ts.toPath(mainFileRelative, packageRootPath, getCanonicalFileName);
|
|
101105
101174
|
if (ts.removeFileExtension(mainExportFile) === ts.removeFileExtension(getCanonicalFileName(moduleFileToTry))) {
|
|
@@ -101107,14 +101176,13 @@ var ts;
|
|
|
101107
101176
|
}
|
|
101108
101177
|
}
|
|
101109
101178
|
}
|
|
101110
|
-
|
|
101111
|
-
|
|
101112
|
-
|
|
101113
|
-
|
|
101114
|
-
|
|
101115
|
-
return fullModulePathWithoutExtension.substring(0, parts.fileNameIndex);
|
|
101179
|
+
else {
|
|
101180
|
+
var fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1));
|
|
101181
|
+
if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") {
|
|
101182
|
+
return { moduleFileToTry: moduleFileToTry, packageRootPath: packageRootPath };
|
|
101183
|
+
}
|
|
101116
101184
|
}
|
|
101117
|
-
return
|
|
101185
|
+
return { moduleFileToTry: moduleFileToTry };
|
|
101118
101186
|
}
|
|
101119
101187
|
}
|
|
101120
101188
|
function tryGetAnyFileFromPath(host, path) {
|
|
@@ -101135,15 +101203,21 @@ var ts;
|
|
|
101135
101203
|
return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
|
|
101136
101204
|
});
|
|
101137
101205
|
}
|
|
101138
|
-
function removeExtensionAndIndexPostFix(fileName, ending, options) {
|
|
101206
|
+
function removeExtensionAndIndexPostFix(fileName, ending, options, host) {
|
|
101139
101207
|
if (ts.fileExtensionIsOneOf(fileName, [".json", ".mjs", ".cjs"]))
|
|
101140
101208
|
return fileName;
|
|
101141
101209
|
var noExtension = ts.removeFileExtension(fileName);
|
|
101210
|
+
if (fileName === noExtension)
|
|
101211
|
+
return fileName;
|
|
101142
101212
|
if (ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".d.cts", ".cts"]))
|
|
101143
101213
|
return noExtension + getJSExtensionForFile(fileName, options);
|
|
101144
101214
|
switch (ending) {
|
|
101145
101215
|
case 0:
|
|
101146
|
-
|
|
101216
|
+
var withoutIndex = ts.removeSuffix(noExtension, "/index");
|
|
101217
|
+
if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) {
|
|
101218
|
+
return noExtension;
|
|
101219
|
+
}
|
|
101220
|
+
return withoutIndex;
|
|
101147
101221
|
case 1:
|
|
101148
101222
|
return noExtension;
|
|
101149
101223
|
case 2:
|
|
@@ -101154,7 +101228,7 @@ var ts;
|
|
|
101154
101228
|
}
|
|
101155
101229
|
function getJSExtensionForFile(fileName, options) {
|
|
101156
101230
|
var _a;
|
|
101157
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
101231
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
101158
101232
|
}
|
|
101159
101233
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
101160
101234
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -101244,8 +101318,8 @@ var ts;
|
|
|
101244
101318
|
return pretty ?
|
|
101245
101319
|
function (diagnostic, newLine, options) {
|
|
101246
101320
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
101247
|
-
var output = "["
|
|
101248
|
-
output += ""
|
|
101321
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
101322
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
101249
101323
|
system.write(output);
|
|
101250
101324
|
} :
|
|
101251
101325
|
function (diagnostic, newLine, options) {
|
|
@@ -101253,8 +101327,8 @@ var ts;
|
|
|
101253
101327
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
101254
101328
|
output += newLine;
|
|
101255
101329
|
}
|
|
101256
|
-
output += getLocaleTimeString(system)
|
|
101257
|
-
output += ""
|
|
101330
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
101331
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
101258
101332
|
system.write(output);
|
|
101259
101333
|
};
|
|
101260
101334
|
}
|
|
@@ -101276,7 +101350,7 @@ var ts;
|
|
|
101276
101350
|
.map(function (errorDiagnostic) {
|
|
101277
101351
|
if (errorDiagnostic.file === undefined)
|
|
101278
101352
|
return;
|
|
101279
|
-
return ""
|
|
101353
|
+
return "".concat(errorDiagnostic.file.fileName);
|
|
101280
101354
|
});
|
|
101281
101355
|
return filesInError.map(function (fileName) {
|
|
101282
101356
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -101309,7 +101383,7 @@ var ts;
|
|
|
101309
101383
|
if (errorCount === 0)
|
|
101310
101384
|
return "";
|
|
101311
101385
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
101312
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName
|
|
101386
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return "".concat(fileInError.fileName, ":").concat(fileInError.line); })
|
|
101313
101387
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
101314
101388
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
101315
101389
|
var d = errorCount === 1 ?
|
|
@@ -101322,7 +101396,7 @@ var ts;
|
|
|
101322
101396
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
101323
101397
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
101324
101398
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
101325
|
-
return ""
|
|
101399
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine).concat(suffix);
|
|
101326
101400
|
}
|
|
101327
101401
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
101328
101402
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -101345,7 +101419,7 @@ var ts;
|
|
|
101345
101419
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
101346
101420
|
: "";
|
|
101347
101421
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
101348
|
-
tabularData += ""
|
|
101422
|
+
tabularData += "".concat(leftPadding).concat(errorCount, " ").concat(fileRef, "\n");
|
|
101349
101423
|
});
|
|
101350
101424
|
return tabularData;
|
|
101351
101425
|
}
|
|
@@ -101372,9 +101446,9 @@ var ts;
|
|
|
101372
101446
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
101373
101447
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
101374
101448
|
var file = _c[_i];
|
|
101375
|
-
write(""
|
|
101376
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
101377
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
101449
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
101450
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
101451
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
101378
101452
|
}
|
|
101379
101453
|
}
|
|
101380
101454
|
ts.explainFiles = explainFiles;
|
|
@@ -101412,7 +101486,7 @@ var ts;
|
|
|
101412
101486
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json"))
|
|
101413
101487
|
return false;
|
|
101414
101488
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
101415
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
101489
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
101416
101490
|
});
|
|
101417
101491
|
}
|
|
101418
101492
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -101421,7 +101495,7 @@ var ts;
|
|
|
101421
101495
|
var options = program.getCompilerOptions();
|
|
101422
101496
|
if (ts.isReferencedFile(reason)) {
|
|
101423
101497
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
101424
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
101498
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
101425
101499
|
var message = void 0;
|
|
101426
101500
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
101427
101501
|
switch (reason.kind) {
|
|
@@ -101532,7 +101606,7 @@ var ts;
|
|
|
101532
101606
|
var currentDir_1 = program.getCurrentDirectory();
|
|
101533
101607
|
ts.forEach(emittedFiles, function (file) {
|
|
101534
101608
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
101535
|
-
write("TSFILE: "
|
|
101609
|
+
write("TSFILE: ".concat(filepath));
|
|
101536
101610
|
});
|
|
101537
101611
|
listFiles(program, write);
|
|
101538
101612
|
}
|
|
@@ -101842,7 +101916,7 @@ var ts;
|
|
|
101842
101916
|
}
|
|
101843
101917
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
101844
101918
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
101845
|
-
writeLog("Current directory: "
|
|
101919
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
101846
101920
|
var configFileWatcher;
|
|
101847
101921
|
if (configFileName) {
|
|
101848
101922
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -101989,10 +102063,10 @@ var ts;
|
|
|
101989
102063
|
}
|
|
101990
102064
|
function createNewProgram(hasInvalidatedResolution) {
|
|
101991
102065
|
writeLog("CreatingProgramWith::");
|
|
101992
|
-
writeLog(" roots: "
|
|
101993
|
-
writeLog(" options: "
|
|
102066
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
102067
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
101994
102068
|
if (projectReferences)
|
|
101995
|
-
writeLog(" projectReferences: "
|
|
102069
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
101996
102070
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
101997
102071
|
hasChangedCompilerOptions = false;
|
|
101998
102072
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -102134,7 +102208,7 @@ var ts;
|
|
|
102134
102208
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
102135
102209
|
}
|
|
102136
102210
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
102137
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
102211
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
102138
102212
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
102139
102213
|
}
|
|
102140
102214
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -102183,6 +102257,7 @@ var ts;
|
|
|
102183
102257
|
}
|
|
102184
102258
|
function reloadFileNamesFromConfigFile() {
|
|
102185
102259
|
writeLog("Reloading new file names and options");
|
|
102260
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
102186
102261
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
102187
102262
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
102188
102263
|
hasChangedConfigFileParsingErrors = true;
|
|
@@ -102190,7 +102265,7 @@ var ts;
|
|
|
102190
102265
|
synchronizeProgram();
|
|
102191
102266
|
}
|
|
102192
102267
|
function reloadConfigFile() {
|
|
102193
|
-
writeLog("Reloading config file: "
|
|
102268
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
102194
102269
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
102195
102270
|
if (cachedDirectoryStructureHost) {
|
|
102196
102271
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -102228,7 +102303,7 @@ var ts;
|
|
|
102228
102303
|
return config.parsedCommandLine;
|
|
102229
102304
|
}
|
|
102230
102305
|
}
|
|
102231
|
-
writeLog("Loading config file: "
|
|
102306
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
102232
102307
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
102233
102308
|
host.getParsedCommandLine(configFileName) :
|
|
102234
102309
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -102478,8 +102553,8 @@ var ts;
|
|
|
102478
102553
|
ts.getBuildOrderFromAnyBuildOrder = getBuildOrderFromAnyBuildOrder;
|
|
102479
102554
|
function createBuilderStatusReporter(system, pretty) {
|
|
102480
102555
|
return function (diagnostic) {
|
|
102481
|
-
var output = pretty ? "["
|
|
102482
|
-
output += ""
|
|
102556
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
102557
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
102483
102558
|
system.write(output);
|
|
102484
102559
|
};
|
|
102485
102560
|
}
|
|
@@ -103222,7 +103297,7 @@ var ts;
|
|
|
103222
103297
|
function listEmittedFile(_a, proj, file) {
|
|
103223
103298
|
var write = _a.write;
|
|
103224
103299
|
if (write && proj.options.listEmittedFiles) {
|
|
103225
|
-
write("TSFILE: "
|
|
103300
|
+
write("TSFILE: ".concat(file));
|
|
103226
103301
|
}
|
|
103227
103302
|
}
|
|
103228
103303
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -103251,7 +103326,7 @@ var ts;
|
|
|
103251
103326
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
103252
103327
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
103253
103328
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
103254
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
103329
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
103255
103330
|
if (canEmitBuildInfo)
|
|
103256
103331
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
103257
103332
|
afterProgramDone(state, program, config);
|
|
@@ -103277,7 +103352,7 @@ var ts;
|
|
|
103277
103352
|
if (!host.fileExists(inputFile)) {
|
|
103278
103353
|
return {
|
|
103279
103354
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
103280
|
-
reason: inputFile
|
|
103355
|
+
reason: "".concat(inputFile, " does not exist")
|
|
103281
103356
|
};
|
|
103282
103357
|
}
|
|
103283
103358
|
if (!force) {
|
|
@@ -103602,7 +103677,7 @@ var ts;
|
|
|
103602
103677
|
}
|
|
103603
103678
|
}
|
|
103604
103679
|
if (filesToDelete) {
|
|
103605
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
103680
|
+
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(""));
|
|
103606
103681
|
}
|
|
103607
103682
|
return ts.ExitStatus.Success;
|
|
103608
103683
|
}
|
|
@@ -103952,7 +104027,7 @@ var ts;
|
|
|
103952
104027
|
};
|
|
103953
104028
|
}
|
|
103954
104029
|
function bold(str) {
|
|
103955
|
-
return "\u001B[1m"
|
|
104030
|
+
return "\u001B[1m".concat(str, "\u001B[22m");
|
|
103956
104031
|
}
|
|
103957
104032
|
var isWindows = sys.getEnvironmentVariable("OS") && ts.stringContains(sys.getEnvironmentVariable("OS").toLowerCase(), "windows");
|
|
103958
104033
|
var isWindowsTerminal = sys.getEnvironmentVariable("WT_SESSION");
|
|
@@ -103961,19 +104036,19 @@ var ts;
|
|
|
103961
104036
|
if (isWindows && !isWindowsTerminal && !isVSCode) {
|
|
103962
104037
|
return brightWhite(str);
|
|
103963
104038
|
}
|
|
103964
|
-
return "\u001B[94m"
|
|
104039
|
+
return "\u001B[94m".concat(str, "\u001B[39m");
|
|
103965
104040
|
}
|
|
103966
104041
|
var supportsRicherColors = sys.getEnvironmentVariable("COLORTERM") === "truecolor" || sys.getEnvironmentVariable("TERM") === "xterm-256color";
|
|
103967
104042
|
function blueBackground(str) {
|
|
103968
104043
|
if (supportsRicherColors) {
|
|
103969
|
-
return "\u001B[48;5;68m"
|
|
104044
|
+
return "\u001B[48;5;68m".concat(str, "\u001B[39;49m");
|
|
103970
104045
|
}
|
|
103971
104046
|
else {
|
|
103972
|
-
return "\u001B[44m"
|
|
104047
|
+
return "\u001B[44m".concat(str, "\u001B[39;49m");
|
|
103973
104048
|
}
|
|
103974
104049
|
}
|
|
103975
104050
|
function brightWhite(str) {
|
|
103976
|
-
return "\u001B[97m"
|
|
104051
|
+
return "\u001B[97m".concat(str, "\u001B[39m");
|
|
103977
104052
|
}
|
|
103978
104053
|
return {
|
|
103979
104054
|
bold: bold,
|
|
@@ -103983,7 +104058,7 @@ var ts;
|
|
|
103983
104058
|
};
|
|
103984
104059
|
}
|
|
103985
104060
|
function getDisplayNameTextOfOption(option) {
|
|
103986
|
-
return "--"
|
|
104061
|
+
return "--".concat(option.name).concat(option.shortName ? ", -".concat(option.shortName) : "");
|
|
103987
104062
|
}
|
|
103988
104063
|
function generateOptionOutput(sys, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
103989
104064
|
var _a, _b;
|
|
@@ -104020,13 +104095,13 @@ var ts;
|
|
|
104020
104095
|
text.push(sys.newLine);
|
|
104021
104096
|
if (showAdditionalInfoOutput(valueCandidates, option)) {
|
|
104022
104097
|
if (valueCandidates) {
|
|
104023
|
-
text.push(valueCandidates.valueType
|
|
104098
|
+
text.push("".concat(valueCandidates.valueType, " ").concat(valueCandidates.possibleValues));
|
|
104024
104099
|
}
|
|
104025
104100
|
if (defaultValueDescription) {
|
|
104026
104101
|
if (valueCandidates)
|
|
104027
104102
|
text.push(sys.newLine);
|
|
104028
104103
|
var diagType = ts.getDiagnosticText(ts.Diagnostics.default_Colon);
|
|
104029
|
-
text.push(diagType
|
|
104104
|
+
text.push("".concat(diagType, " ").concat(defaultValueDescription));
|
|
104030
104105
|
}
|
|
104031
104106
|
text.push(sys.newLine);
|
|
104032
104107
|
}
|
|
@@ -104075,7 +104150,7 @@ var ts;
|
|
|
104075
104150
|
}
|
|
104076
104151
|
var curRight = remainRight.substr(0, rightCharacterNumber);
|
|
104077
104152
|
remainRight = remainRight.slice(rightCharacterNumber);
|
|
104078
|
-
res.push(""
|
|
104153
|
+
res.push("".concat(curLeft).concat(curRight));
|
|
104079
104154
|
isFirstLine = false;
|
|
104080
104155
|
}
|
|
104081
104156
|
return res;
|
|
@@ -104176,7 +104251,7 @@ var ts;
|
|
|
104176
104251
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
104177
104252
|
}
|
|
104178
104253
|
categoryMap.forEach(function (value, key) {
|
|
104179
|
-
res.push("### "
|
|
104254
|
+
res.push("### ".concat(key).concat(sys.newLine).concat(sys.newLine));
|
|
104180
104255
|
res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, value), true);
|
|
104181
104256
|
});
|
|
104182
104257
|
if (afterOptionsDescription) {
|
|
@@ -104186,7 +104261,7 @@ var ts;
|
|
|
104186
104261
|
}
|
|
104187
104262
|
function printEasyHelp(sys, simpleOptions) {
|
|
104188
104263
|
var colors = createColors(sys);
|
|
104189
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104264
|
+
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);
|
|
104190
104265
|
output.push(colors.bold(ts.getDiagnosticText(ts.Diagnostics.COMMON_COMMANDS)) + sys.newLine + sys.newLine);
|
|
104191
104266
|
example("tsc", ts.Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
104192
104267
|
example("tsc app.ts util.ts", ts.Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -104212,7 +104287,7 @@ var ts;
|
|
|
104212
104287
|
}
|
|
104213
104288
|
}
|
|
104214
104289
|
function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
|
|
104215
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104290
|
+
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);
|
|
104216
104291
|
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);
|
|
104217
104292
|
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);
|
|
104218
104293
|
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);
|
|
@@ -104222,7 +104297,7 @@ var ts;
|
|
|
104222
104297
|
}
|
|
104223
104298
|
}
|
|
104224
104299
|
function printBuildHelp(sys, buildOptions) {
|
|
104225
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
104300
|
+
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);
|
|
104226
104301
|
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);
|
|
104227
104302
|
for (var _i = 0, output_3 = output; _i < output_3.length; _i++) {
|
|
104228
104303
|
var line = output_3[_i];
|
|
@@ -104603,7 +104678,7 @@ var ts;
|
|
|
104603
104678
|
reportCountStatistic("Subtype cache size", caches.subtype);
|
|
104604
104679
|
reportCountStatistic("Strict subtype cache size", caches.strictSubtype);
|
|
104605
104680
|
if (isPerformanceEnabled) {
|
|
104606
|
-
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(name
|
|
104681
|
+
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic("".concat(name, " time"), duration); });
|
|
104607
104682
|
}
|
|
104608
104683
|
}
|
|
104609
104684
|
else if (isPerformanceEnabled) {
|
|
@@ -104674,7 +104749,7 @@ var ts;
|
|
|
104674
104749
|
// This file actually uses arguments passed on commandline and executes it
|
|
104675
104750
|
ts.Debug.loggingHost = {
|
|
104676
104751
|
log: function (_level, s) {
|
|
104677
|
-
ts.sys.write(""
|
|
104752
|
+
ts.sys.write("".concat(s || "").concat(ts.sys.newLine));
|
|
104678
104753
|
}
|
|
104679
104754
|
};
|
|
104680
104755
|
if (ts.Debug.isDebugging) {
|