typescript 4.6.0-dev.20220208 → 4.6.1-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cancellationToken.js +1 -1
- package/lib/cs/diagnosticMessages.generated.json +1 -2
- package/lib/es/diagnosticMessages.generated.json +1 -2
- package/lib/fr/diagnosticMessages.generated.json +1 -2
- package/lib/it/diagnosticMessages.generated.json +1 -2
- package/lib/ja/diagnosticMessages.generated.json +1 -2
- package/lib/ko/diagnosticMessages.generated.json +1 -2
- package/lib/pl/diagnosticMessages.generated.json +1 -2
- package/lib/pt-br/diagnosticMessages.generated.json +1 -2
- package/lib/tr/diagnosticMessages.generated.json +1 -2
- package/lib/tsc.js +449 -355
- package/lib/tsserver.js +903 -685
- package/lib/tsserverlibrary.js +878 -660
- package/lib/typescript.js +783 -565
- package/lib/typescriptServices.js +783 -565
- package/lib/typingsInstaller.js +520 -415
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -2
- 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.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".1-rc");
|
|
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;
|
|
@@ -1293,7 +1293,7 @@ var ts;
|
|
|
1293
1293
|
function cast(value, test) {
|
|
1294
1294
|
if (value !== undefined && test(value))
|
|
1295
1295
|
return value;
|
|
1296
|
-
return ts.Debug.fail("Invalid cast. The supplied value "
|
|
1296
|
+
return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
|
|
1297
1297
|
}
|
|
1298
1298
|
ts.cast = cast;
|
|
1299
1299
|
function noop(_) { }
|
|
@@ -1343,7 +1343,7 @@ var ts;
|
|
|
1343
1343
|
function memoizeOne(callback) {
|
|
1344
1344
|
var map = new ts.Map();
|
|
1345
1345
|
return function (arg) {
|
|
1346
|
-
var key = typeof arg
|
|
1346
|
+
var key = "".concat(typeof arg, ":").concat(arg);
|
|
1347
1347
|
var value = map.get(key);
|
|
1348
1348
|
if (value === undefined && !map.has(key)) {
|
|
1349
1349
|
value = callback(arg);
|
|
@@ -1678,7 +1678,7 @@ var ts;
|
|
|
1678
1678
|
ts.createGetCanonicalFileName = createGetCanonicalFileName;
|
|
1679
1679
|
function patternText(_a) {
|
|
1680
1680
|
var prefix = _a.prefix, suffix = _a.suffix;
|
|
1681
|
-
return prefix
|
|
1681
|
+
return "".concat(prefix, "*").concat(suffix);
|
|
1682
1682
|
}
|
|
1683
1683
|
ts.patternText = patternText;
|
|
1684
1684
|
function matchedText(pattern, candidate) {
|
|
@@ -1947,7 +1947,7 @@ var ts;
|
|
|
1947
1947
|
}
|
|
1948
1948
|
function fail(message, stackCrawlMark) {
|
|
1949
1949
|
debugger;
|
|
1950
|
-
var e = new Error(message ? "Debug Failure. "
|
|
1950
|
+
var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
|
|
1951
1951
|
if (Error.captureStackTrace) {
|
|
1952
1952
|
Error.captureStackTrace(e, stackCrawlMark || fail);
|
|
1953
1953
|
}
|
|
@@ -1955,12 +1955,12 @@ var ts;
|
|
|
1955
1955
|
}
|
|
1956
1956
|
Debug.fail = fail;
|
|
1957
1957
|
function failBadSyntaxKind(node, message, stackCrawlMark) {
|
|
1958
|
-
return fail((message || "Unexpected node."
|
|
1958
|
+
return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
|
|
1959
1959
|
}
|
|
1960
1960
|
Debug.failBadSyntaxKind = failBadSyntaxKind;
|
|
1961
1961
|
function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
|
|
1962
1962
|
if (!expression) {
|
|
1963
|
-
message = message ? "False expression: "
|
|
1963
|
+
message = message ? "False expression: ".concat(message) : "False expression.";
|
|
1964
1964
|
if (verboseDebugInfo) {
|
|
1965
1965
|
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
|
|
1966
1966
|
}
|
|
@@ -1970,26 +1970,26 @@ var ts;
|
|
|
1970
1970
|
Debug.assert = assert;
|
|
1971
1971
|
function assertEqual(a, b, msg, msg2, stackCrawlMark) {
|
|
1972
1972
|
if (a !== b) {
|
|
1973
|
-
var message = msg ? msg2 ? msg
|
|
1974
|
-
fail("Expected "
|
|
1973
|
+
var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
|
|
1974
|
+
fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
1977
|
Debug.assertEqual = assertEqual;
|
|
1978
1978
|
function assertLessThan(a, b, msg, stackCrawlMark) {
|
|
1979
1979
|
if (a >= b) {
|
|
1980
|
-
fail("Expected "
|
|
1980
|
+
fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
1983
|
Debug.assertLessThan = assertLessThan;
|
|
1984
1984
|
function assertLessThanOrEqual(a, b, stackCrawlMark) {
|
|
1985
1985
|
if (a > b) {
|
|
1986
|
-
fail("Expected "
|
|
1986
|
+
fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
1989
|
Debug.assertLessThanOrEqual = assertLessThanOrEqual;
|
|
1990
1990
|
function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
|
|
1991
1991
|
if (a < b) {
|
|
1992
|
-
fail("Expected "
|
|
1992
|
+
fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
1995
|
Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
|
|
@@ -2019,42 +2019,42 @@ var ts;
|
|
|
2019
2019
|
function assertNever(member, message, stackCrawlMark) {
|
|
2020
2020
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2021
2021
|
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2022
|
-
return fail(message
|
|
2022
|
+
return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
|
|
2023
2023
|
}
|
|
2024
2024
|
Debug.assertNever = assertNever;
|
|
2025
2025
|
function assertEachNode(nodes, test, message, stackCrawlMark) {
|
|
2026
2026
|
if (shouldAssertFunction(1, "assertEachNode")) {
|
|
2027
|
-
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '"
|
|
2027
|
+
assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
Debug.assertEachNode = assertEachNode;
|
|
2031
2031
|
function assertNode(node, test, message, stackCrawlMark) {
|
|
2032
2032
|
if (shouldAssertFunction(1, "assertNode")) {
|
|
2033
|
-
assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node "
|
|
2033
|
+
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);
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
2036
|
Debug.assertNode = assertNode;
|
|
2037
2037
|
function assertNotNode(node, test, message, stackCrawlMark) {
|
|
2038
2038
|
if (shouldAssertFunction(1, "assertNotNode")) {
|
|
2039
|
-
assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node "
|
|
2039
|
+
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);
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
2042
|
Debug.assertNotNode = assertNotNode;
|
|
2043
2043
|
function assertOptionalNode(node, test, message, stackCrawlMark) {
|
|
2044
2044
|
if (shouldAssertFunction(1, "assertOptionalNode")) {
|
|
2045
|
-
assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node "
|
|
2045
|
+
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);
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
2048
|
Debug.assertOptionalNode = assertOptionalNode;
|
|
2049
2049
|
function assertOptionalToken(node, kind, message, stackCrawlMark) {
|
|
2050
2050
|
if (shouldAssertFunction(1, "assertOptionalToken")) {
|
|
2051
|
-
assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node "
|
|
2051
|
+
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);
|
|
2052
2052
|
}
|
|
2053
2053
|
}
|
|
2054
2054
|
Debug.assertOptionalToken = assertOptionalToken;
|
|
2055
2055
|
function assertMissingNode(node, message, stackCrawlMark) {
|
|
2056
2056
|
if (shouldAssertFunction(1, "assertMissingNode")) {
|
|
2057
|
-
assert(node === undefined, message || "Unexpected node.", function () { return "Node "
|
|
2057
|
+
assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
Debug.assertMissingNode = assertMissingNode;
|
|
@@ -2075,7 +2075,7 @@ var ts;
|
|
|
2075
2075
|
}
|
|
2076
2076
|
Debug.getFunctionName = getFunctionName;
|
|
2077
2077
|
function formatSymbol(symbol) {
|
|
2078
|
-
return "{ name: "
|
|
2078
|
+
return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
|
|
2079
2079
|
}
|
|
2080
2080
|
Debug.formatSymbol = formatSymbol;
|
|
2081
2081
|
function formatEnum(value, enumObject, isFlags) {
|
|
@@ -2093,7 +2093,7 @@ var ts;
|
|
|
2093
2093
|
break;
|
|
2094
2094
|
}
|
|
2095
2095
|
if (enumValue !== 0 && enumValue & value) {
|
|
2096
|
-
result = ""
|
|
2096
|
+
result = "".concat(result).concat(result ? "|" : "").concat(enumName);
|
|
2097
2097
|
remainingFlags &= ~enumValue;
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
@@ -2202,7 +2202,7 @@ var ts;
|
|
|
2202
2202
|
this.flags & 1 ? "FlowUnreachable" :
|
|
2203
2203
|
"UnknownFlow";
|
|
2204
2204
|
var remainingFlags = this.flags & ~(2048 - 1);
|
|
2205
|
-
return ""
|
|
2205
|
+
return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
|
|
2206
2206
|
}
|
|
2207
2207
|
},
|
|
2208
2208
|
__debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, true); } },
|
|
@@ -2232,7 +2232,7 @@ var ts;
|
|
|
2232
2232
|
__tsDebuggerDisplay: {
|
|
2233
2233
|
value: function (defaultValue) {
|
|
2234
2234
|
defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
|
|
2235
|
-
return "NodeArray "
|
|
2235
|
+
return "NodeArray ".concat(defaultValue);
|
|
2236
2236
|
}
|
|
2237
2237
|
}
|
|
2238
2238
|
});
|
|
@@ -2278,7 +2278,7 @@ var ts;
|
|
|
2278
2278
|
var symbolHeader = this.flags & 33554432 ? "TransientSymbol" :
|
|
2279
2279
|
"Symbol";
|
|
2280
2280
|
var remainingSymbolFlags = this.flags & ~33554432;
|
|
2281
|
-
return symbolHeader
|
|
2281
|
+
return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
|
|
2282
2282
|
}
|
|
2283
2283
|
},
|
|
2284
2284
|
__debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
|
|
@@ -2287,11 +2287,11 @@ var ts;
|
|
|
2287
2287
|
__tsDebuggerDisplay: {
|
|
2288
2288
|
value: function () {
|
|
2289
2289
|
var typeHeader = this.flags & 98304 ? "NullableType" :
|
|
2290
|
-
this.flags & 384 ? "LiteralType "
|
|
2291
|
-
this.flags & 2048 ? "LiteralType "
|
|
2290
|
+
this.flags & 384 ? "LiteralType ".concat(JSON.stringify(this.value)) :
|
|
2291
|
+
this.flags & 2048 ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
|
|
2292
2292
|
this.flags & 8192 ? "UniqueESSymbolType" :
|
|
2293
2293
|
this.flags & 32 ? "EnumType" :
|
|
2294
|
-
this.flags & 67359327 ? "IntrinsicType "
|
|
2294
|
+
this.flags & 67359327 ? "IntrinsicType ".concat(this.intrinsicName) :
|
|
2295
2295
|
this.flags & 1048576 ? "UnionType" :
|
|
2296
2296
|
this.flags & 2097152 ? "IntersectionType" :
|
|
2297
2297
|
this.flags & 4194304 ? "IndexType" :
|
|
@@ -2310,7 +2310,7 @@ var ts;
|
|
|
2310
2310
|
"ObjectType" :
|
|
2311
2311
|
"Type";
|
|
2312
2312
|
var remainingObjectFlags = this.flags & 524288 ? this.objectFlags & ~1343 : 0;
|
|
2313
|
-
return ""
|
|
2313
|
+
return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
|
|
2314
2314
|
}
|
|
2315
2315
|
},
|
|
2316
2316
|
__debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
|
|
@@ -2344,11 +2344,11 @@ var ts;
|
|
|
2344
2344
|
__tsDebuggerDisplay: {
|
|
2345
2345
|
value: function () {
|
|
2346
2346
|
var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
|
|
2347
|
-
ts.isIdentifier(this) ? "Identifier '"
|
|
2348
|
-
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '"
|
|
2349
|
-
ts.isStringLiteral(this) ? "StringLiteral "
|
|
2350
|
-
ts.isNumericLiteral(this) ? "NumericLiteral "
|
|
2351
|
-
ts.isBigIntLiteral(this) ? "BigIntLiteral "
|
|
2347
|
+
ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
|
|
2348
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
|
|
2349
|
+
ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
|
|
2350
|
+
ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
|
|
2351
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
|
|
2352
2352
|
ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
|
|
2353
2353
|
ts.isParameter(this) ? "ParameterDeclaration" :
|
|
2354
2354
|
ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
|
|
@@ -2380,7 +2380,7 @@ var ts;
|
|
|
2380
2380
|
ts.isNamedTupleMember(this) ? "NamedTupleMember" :
|
|
2381
2381
|
ts.isImportTypeNode(this) ? "ImportTypeNode" :
|
|
2382
2382
|
formatSyntaxKind(this.kind);
|
|
2383
|
-
return ""
|
|
2383
|
+
return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
|
|
2384
2384
|
}
|
|
2385
2385
|
},
|
|
2386
2386
|
__debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
|
|
@@ -2424,10 +2424,10 @@ var ts;
|
|
|
2424
2424
|
Debug.enableDebugInfo = enableDebugInfo;
|
|
2425
2425
|
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
2426
2426
|
var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
2427
|
-
deprecationMessage += "'"
|
|
2428
|
-
deprecationMessage += since ? "has been deprecated since v"
|
|
2429
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v"
|
|
2430
|
-
deprecationMessage += message ? " "
|
|
2427
|
+
deprecationMessage += "'".concat(name, "' ");
|
|
2428
|
+
deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
|
|
2429
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
|
|
2430
|
+
deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
|
|
2431
2431
|
return deprecationMessage;
|
|
2432
2432
|
}
|
|
2433
2433
|
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
@@ -2524,11 +2524,11 @@ var ts;
|
|
|
2524
2524
|
}
|
|
2525
2525
|
};
|
|
2526
2526
|
Version.prototype.toString = function () {
|
|
2527
|
-
var result = this.major
|
|
2527
|
+
var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
|
|
2528
2528
|
if (ts.some(this.prerelease))
|
|
2529
|
-
result += "-"
|
|
2529
|
+
result += "-".concat(this.prerelease.join("."));
|
|
2530
2530
|
if (ts.some(this.build))
|
|
2531
|
-
result += "+"
|
|
2531
|
+
result += "+".concat(this.build.join("."));
|
|
2532
2532
|
return result;
|
|
2533
2533
|
};
|
|
2534
2534
|
Version.zero = new Version(0, 0, 0);
|
|
@@ -2750,7 +2750,7 @@ var ts;
|
|
|
2750
2750
|
return ts.map(comparators, formatComparator).join(" ");
|
|
2751
2751
|
}
|
|
2752
2752
|
function formatComparator(comparator) {
|
|
2753
|
-
return ""
|
|
2753
|
+
return "".concat(comparator.operator).concat(comparator.operand);
|
|
2754
2754
|
}
|
|
2755
2755
|
})(ts || (ts = {}));
|
|
2756
2756
|
var ts;
|
|
@@ -2979,7 +2979,7 @@ var ts;
|
|
|
2979
2979
|
fs = require("fs");
|
|
2980
2980
|
}
|
|
2981
2981
|
catch (e) {
|
|
2982
|
-
throw new Error("tracing requires having fs\n(original error: "
|
|
2982
|
+
throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
2985
|
mode = tracingMode;
|
|
@@ -2990,11 +2990,11 @@ var ts;
|
|
|
2990
2990
|
if (!fs.existsSync(traceDir)) {
|
|
2991
2991
|
fs.mkdirSync(traceDir, { recursive: true });
|
|
2992
2992
|
}
|
|
2993
|
-
var countPart = mode === "build" ? "."
|
|
2994
|
-
: mode === "server" ? "."
|
|
2993
|
+
var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
|
|
2994
|
+
: mode === "server" ? ".".concat(process.pid)
|
|
2995
2995
|
: "";
|
|
2996
|
-
var tracePath = ts.combinePaths(traceDir, "trace"
|
|
2997
|
-
var typesPath = ts.combinePaths(traceDir, "types"
|
|
2996
|
+
var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
|
|
2997
|
+
var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
|
|
2998
2998
|
legend.push({
|
|
2999
2999
|
configFilePath: configFilePath,
|
|
3000
3000
|
tracePath: tracePath,
|
|
@@ -3062,7 +3062,7 @@ var ts;
|
|
|
3062
3062
|
writeEvent("E", phase, name, args, undefined, endTime);
|
|
3063
3063
|
}
|
|
3064
3064
|
else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
|
|
3065
|
-
writeEvent("X", phase, name, args, "\"dur\":"
|
|
3065
|
+
writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
|
|
3066
3066
|
}
|
|
3067
3067
|
}
|
|
3068
3068
|
function writeEvent(eventType, phase, name, args, extras, time) {
|
|
@@ -3070,11 +3070,11 @@ var ts;
|
|
|
3070
3070
|
if (mode === "server" && phase === "checkTypes")
|
|
3071
3071
|
return;
|
|
3072
3072
|
ts.performance.mark("beginTracing");
|
|
3073
|
-
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\""
|
|
3073
|
+
fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
|
|
3074
3074
|
if (extras)
|
|
3075
|
-
fs.writeSync(traceFd, ","
|
|
3075
|
+
fs.writeSync(traceFd, ",".concat(extras));
|
|
3076
3076
|
if (args)
|
|
3077
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3077
|
+
fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
|
|
3078
3078
|
fs.writeSync(traceFd, "}");
|
|
3079
3079
|
ts.performance.mark("endTracing");
|
|
3080
3080
|
ts.performance.measure("Tracing", "beginTracing", "endTracing");
|
|
@@ -3394,7 +3394,7 @@ var ts;
|
|
|
3394
3394
|
pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
|
|
3395
3395
|
ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
|
|
3396
3396
|
function getLevel(envVar, level) {
|
|
3397
|
-
return system.getEnvironmentVariable(envVar
|
|
3397
|
+
return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
|
|
3398
3398
|
}
|
|
3399
3399
|
function getCustomLevels(baseVariable) {
|
|
3400
3400
|
var customLevels;
|
|
@@ -3818,7 +3818,7 @@ var ts;
|
|
|
3818
3818
|
}
|
|
3819
3819
|
function onTimerToUpdateChildWatches() {
|
|
3820
3820
|
timerToUpdateChildWatches = undefined;
|
|
3821
|
-
sysLog("sysLog:: onTimerToUpdateChildWatches:: "
|
|
3821
|
+
sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
|
|
3822
3822
|
var start = ts.timestamp();
|
|
3823
3823
|
var invokeMap = new ts.Map();
|
|
3824
3824
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
|
@@ -3829,7 +3829,7 @@ var ts;
|
|
|
3829
3829
|
var hasChanges = updateChildWatches(dirName, dirPath, options);
|
|
3830
3830
|
invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
|
|
3831
3831
|
}
|
|
3832
|
-
sysLog("sysLog:: invokingWatchers:: Elapsed:: "
|
|
3832
|
+
sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
|
|
3833
3833
|
callbackCache.forEach(function (callbacks, rootDirName) {
|
|
3834
3834
|
var existing = invokeMap.get(rootDirName);
|
|
3835
3835
|
if (existing) {
|
|
@@ -3845,7 +3845,7 @@ var ts;
|
|
|
3845
3845
|
}
|
|
3846
3846
|
});
|
|
3847
3847
|
var elapsed = ts.timestamp() - start;
|
|
3848
|
-
sysLog("sysLog:: Elapsed:: "
|
|
3848
|
+
sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
|
|
3849
3849
|
}
|
|
3850
3850
|
function removeChildWatches(parentWatcher) {
|
|
3851
3851
|
if (!parentWatcher)
|
|
@@ -4237,7 +4237,7 @@ var ts;
|
|
|
4237
4237
|
var externalFileCounter = 0;
|
|
4238
4238
|
var remappedPaths = new ts.Map();
|
|
4239
4239
|
var normalizedDir = ts.normalizeSlashes(__dirname);
|
|
4240
|
-
var fileUrlRoot = "file://"
|
|
4240
|
+
var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
|
|
4241
4241
|
for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
|
|
4242
4242
|
var node = _a[_i];
|
|
4243
4243
|
if (node.callFrame.url) {
|
|
@@ -4246,7 +4246,7 @@ var ts;
|
|
|
4246
4246
|
node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), true);
|
|
4247
4247
|
}
|
|
4248
4248
|
else if (!nativePattern.test(url)) {
|
|
4249
|
-
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external"
|
|
4249
|
+
node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
|
|
4250
4250
|
externalFileCounter++;
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
@@ -4262,7 +4262,7 @@ var ts;
|
|
|
4262
4262
|
if (!err) {
|
|
4263
4263
|
try {
|
|
4264
4264
|
if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
|
|
4265
|
-
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-")
|
|
4265
|
+
profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
4268
|
catch (_c) {
|
|
@@ -4347,7 +4347,7 @@ var ts;
|
|
|
4347
4347
|
}
|
|
4348
4348
|
};
|
|
4349
4349
|
function invokeCallbackAndUpdateWatcher(createWatcher) {
|
|
4350
|
-
sysLog("sysLog:: "
|
|
4350
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
|
|
4351
4351
|
callback("rename", "");
|
|
4352
4352
|
if (watcher) {
|
|
4353
4353
|
watcher.close();
|
|
@@ -4364,7 +4364,7 @@ var ts;
|
|
|
4364
4364
|
}
|
|
4365
4365
|
}
|
|
4366
4366
|
if (hitSystemWatcherLimit) {
|
|
4367
|
-
sysLog("sysLog:: "
|
|
4367
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
|
|
4368
4368
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4369
4369
|
}
|
|
4370
4370
|
try {
|
|
@@ -4376,7 +4376,7 @@ var ts;
|
|
|
4376
4376
|
}
|
|
4377
4377
|
catch (e) {
|
|
4378
4378
|
hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
|
|
4379
|
-
sysLog("sysLog:: "
|
|
4379
|
+
sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
|
|
4380
4380
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4381
4381
|
}
|
|
4382
4382
|
}
|
|
@@ -5259,10 +5259,10 @@ var ts;
|
|
|
5259
5259
|
A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, ts.DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."),
|
|
5260
5260
|
A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, ts.DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."),
|
|
5261
5261
|
An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, ts.DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."),
|
|
5262
|
-
|
|
5263
|
-
|
|
5262
|
+
An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."),
|
|
5263
|
+
An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."),
|
|
5264
5264
|
An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, ts.DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."),
|
|
5265
|
-
|
|
5265
|
+
A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, ts.DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."),
|
|
5266
5266
|
The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, ts.DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."),
|
|
5267
5267
|
The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, ts.DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."),
|
|
5268
5268
|
Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, ts.DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."),
|
|
@@ -5294,6 +5294,7 @@ var ts;
|
|
|
5294
5294
|
An_optional_element_cannot_follow_a_rest_element: diag(1266, ts.DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."),
|
|
5295
5295
|
Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, ts.DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."),
|
|
5296
5296
|
An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),
|
|
5297
|
+
Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided: diag(1269, ts.DiagnosticCategory.Error, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269", "Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided."),
|
|
5297
5298
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5298
5299
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
5299
5300
|
Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, ts.DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),
|
|
@@ -5430,6 +5431,8 @@ var ts;
|
|
|
5430
5431
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
5431
5432
|
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
5432
5433
|
catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
5434
|
+
An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."),
|
|
5435
|
+
An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."),
|
|
5433
5436
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
5434
5437
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
5435
5438
|
Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
|
|
@@ -6850,6 +6853,9 @@ var ts;
|
|
|
6850
6853
|
Add_all_missing_attributes: diag(95168, ts.DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"),
|
|
6851
6854
|
Add_undefined_to_optional_property_type: diag(95169, ts.DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"),
|
|
6852
6855
|
Convert_named_imports_to_default_import: diag(95170, ts.DiagnosticCategory.Message, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"),
|
|
6856
|
+
Delete_unused_param_tag_0: diag(95171, ts.DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"),
|
|
6857
|
+
Delete_all_unused_param_tags: diag(95172, ts.DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"),
|
|
6858
|
+
Rename_param_tag_name_0_to_1: diag(95173, ts.DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"),
|
|
6853
6859
|
No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
|
|
6854
6860
|
Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
|
|
6855
6861
|
JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
|
|
@@ -7076,7 +7082,7 @@ var ts;
|
|
|
7076
7082
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
7077
7083
|
}
|
|
7078
7084
|
else {
|
|
7079
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
7085
|
+
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"));
|
|
7080
7086
|
}
|
|
7081
7087
|
}
|
|
7082
7088
|
var res = lineStarts[line] + character;
|
|
@@ -9591,7 +9597,7 @@ var ts;
|
|
|
9591
9597
|
: "linkplain";
|
|
9592
9598
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9593
9599
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
9594
|
-
return "{@"
|
|
9600
|
+
return "{@".concat(kind, " ").concat(name).concat(space).concat(link.text, "}");
|
|
9595
9601
|
}
|
|
9596
9602
|
function getEffectiveTypeParameterDeclarations(node) {
|
|
9597
9603
|
if (ts.isJSDocSignature(node)) {
|
|
@@ -10516,6 +10522,10 @@ var ts;
|
|
|
10516
10522
|
return undefined;
|
|
10517
10523
|
}
|
|
10518
10524
|
ts.getDeclarationOfKind = getDeclarationOfKind;
|
|
10525
|
+
function getDeclarationsOfKind(symbol, kind) {
|
|
10526
|
+
return ts.filter(symbol.declarations || ts.emptyArray, function (d) { return d.kind === kind; });
|
|
10527
|
+
}
|
|
10528
|
+
ts.getDeclarationsOfKind = getDeclarationsOfKind;
|
|
10519
10529
|
function createSymbolTable(symbols) {
|
|
10520
10530
|
var result = new ts.Map();
|
|
10521
10531
|
if (symbols) {
|
|
@@ -10681,11 +10691,11 @@ var ts;
|
|
|
10681
10691
|
}
|
|
10682
10692
|
function packageIdToPackageName(_a) {
|
|
10683
10693
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
10684
|
-
return subModuleName ? name
|
|
10694
|
+
return subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
|
|
10685
10695
|
}
|
|
10686
10696
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
10687
10697
|
function packageIdToString(packageId) {
|
|
10688
|
-
return packageIdToPackageName(packageId)
|
|
10698
|
+
return "".concat(packageIdToPackageName(packageId), "@").concat(packageId.version);
|
|
10689
10699
|
}
|
|
10690
10700
|
ts.packageIdToString = packageIdToString;
|
|
10691
10701
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -10735,6 +10745,10 @@ var ts;
|
|
|
10735
10745
|
return getSourceFileOfNode(module.valueDeclaration || getNonAugmentationDeclaration(module));
|
|
10736
10746
|
}
|
|
10737
10747
|
ts.getSourceFileOfModule = getSourceFileOfModule;
|
|
10748
|
+
function isPlainJsFile(file, checkJs) {
|
|
10749
|
+
return !!file && (file.scriptKind === 1 || file.scriptKind === 2) && !file.checkJsDirective && checkJs === undefined;
|
|
10750
|
+
}
|
|
10751
|
+
ts.isPlainJsFile = isPlainJsFile;
|
|
10738
10752
|
function isStatementWithLocals(node) {
|
|
10739
10753
|
switch (node.kind) {
|
|
10740
10754
|
case 234:
|
|
@@ -10755,7 +10769,7 @@ var ts;
|
|
|
10755
10769
|
function nodePosToString(node) {
|
|
10756
10770
|
var file = getSourceFileOfNode(node);
|
|
10757
10771
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
10758
|
-
return file.fileName
|
|
10772
|
+
return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
|
|
10759
10773
|
}
|
|
10760
10774
|
ts.nodePosToString = nodePosToString;
|
|
10761
10775
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -10856,7 +10870,7 @@ var ts;
|
|
|
10856
10870
|
ts.isPinnedComment = isPinnedComment;
|
|
10857
10871
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
10858
10872
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
10859
|
-
""
|
|
10873
|
+
"".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
|
|
10860
10874
|
commentDirective,
|
|
10861
10875
|
]); }));
|
|
10862
10876
|
var usedLines = new ts.Map();
|
|
@@ -10873,10 +10887,10 @@ var ts;
|
|
|
10873
10887
|
});
|
|
10874
10888
|
}
|
|
10875
10889
|
function markUsed(line) {
|
|
10876
|
-
if (!directivesByLine.has(""
|
|
10890
|
+
if (!directivesByLine.has("".concat(line))) {
|
|
10877
10891
|
return false;
|
|
10878
10892
|
}
|
|
10879
|
-
usedLines.set(""
|
|
10893
|
+
usedLines.set("".concat(line), true);
|
|
10880
10894
|
return true;
|
|
10881
10895
|
}
|
|
10882
10896
|
}
|
|
@@ -11075,7 +11089,7 @@ var ts;
|
|
|
11075
11089
|
}
|
|
11076
11090
|
return node.text;
|
|
11077
11091
|
}
|
|
11078
|
-
return ts.Debug.fail("Literal kind '"
|
|
11092
|
+
return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
|
|
11079
11093
|
}
|
|
11080
11094
|
ts.getLiteralText = getLiteralText;
|
|
11081
11095
|
function canUseOriginalText(node, flags) {
|
|
@@ -13410,11 +13424,11 @@ var ts;
|
|
|
13410
13424
|
}
|
|
13411
13425
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
13412
13426
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
13413
|
-
return "__@"
|
|
13427
|
+
return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
|
|
13414
13428
|
}
|
|
13415
13429
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
13416
13430
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
13417
|
-
return "__#"
|
|
13431
|
+
return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
|
|
13418
13432
|
}
|
|
13419
13433
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
13420
13434
|
function isKnownSymbol(symbol) {
|
|
@@ -15711,7 +15725,7 @@ var ts;
|
|
|
15711
15725
|
}
|
|
15712
15726
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
15713
15727
|
function getJSXRuntimeImport(base, options) {
|
|
15714
|
-
return base ? base
|
|
15728
|
+
return base ? "".concat(base, "/").concat(options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
15715
15729
|
}
|
|
15716
15730
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
15717
15731
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -15809,15 +15823,15 @@ var ts;
|
|
|
15809
15823
|
}
|
|
15810
15824
|
var wildcardCharCodes = [42, 63];
|
|
15811
15825
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
15812
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
15826
|
+
var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
|
|
15813
15827
|
var filesMatcher = {
|
|
15814
15828
|
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
|
|
15815
|
-
doubleAsteriskRegexFragment: "(/"
|
|
15829
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
15816
15830
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
15817
15831
|
};
|
|
15818
15832
|
var directoriesMatcher = {
|
|
15819
15833
|
singleAsteriskRegexFragment: "[^/]*",
|
|
15820
|
-
doubleAsteriskRegexFragment: "(/"
|
|
15834
|
+
doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
|
|
15821
15835
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
15822
15836
|
};
|
|
15823
15837
|
var excludeMatcher = {
|
|
@@ -15835,9 +15849,9 @@ var ts;
|
|
|
15835
15849
|
if (!patterns || !patterns.length) {
|
|
15836
15850
|
return undefined;
|
|
15837
15851
|
}
|
|
15838
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
15852
|
+
var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
|
|
15839
15853
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
15840
|
-
return "^("
|
|
15854
|
+
return "^(".concat(pattern, ")").concat(terminator);
|
|
15841
15855
|
}
|
|
15842
15856
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
15843
15857
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -15855,7 +15869,7 @@ var ts;
|
|
|
15855
15869
|
ts.isImplicitGlob = isImplicitGlob;
|
|
15856
15870
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
15857
15871
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
15858
|
-
return pattern && "^("
|
|
15872
|
+
return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
|
|
15859
15873
|
}
|
|
15860
15874
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
15861
15875
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -15921,7 +15935,7 @@ var ts;
|
|
|
15921
15935
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
15922
15936
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
15923
15937
|
return {
|
|
15924
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
15938
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
|
|
15925
15939
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
15926
15940
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
15927
15941
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -16166,7 +16180,7 @@ var ts;
|
|
|
16166
16180
|
ts.resolutionExtensionIsTSOrJson = resolutionExtensionIsTSOrJson;
|
|
16167
16181
|
function extensionFromPath(path) {
|
|
16168
16182
|
var ext = tryGetExtensionFromPath(path);
|
|
16169
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
16183
|
+
return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
|
|
16170
16184
|
}
|
|
16171
16185
|
ts.extensionFromPath = extensionFromPath;
|
|
16172
16186
|
function isAnySupportedFileExtension(path) {
|
|
@@ -21237,7 +21251,7 @@ var ts;
|
|
|
21237
21251
|
case 326: return "augments";
|
|
21238
21252
|
case 327: return "implements";
|
|
21239
21253
|
default:
|
|
21240
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
21254
|
+
return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
|
|
21241
21255
|
}
|
|
21242
21256
|
}
|
|
21243
21257
|
var rawTextScanner;
|
|
@@ -21556,7 +21570,7 @@ var ts;
|
|
|
21556
21570
|
};
|
|
21557
21571
|
var definedTextGetter_1 = function (path) {
|
|
21558
21572
|
var result = textGetter_1(path);
|
|
21559
|
-
return result !== undefined ? result : "/* Input file "
|
|
21573
|
+
return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
|
|
21560
21574
|
};
|
|
21561
21575
|
var buildInfo_1;
|
|
21562
21576
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -25218,7 +25232,7 @@ var ts;
|
|
|
25218
25232
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
25219
25233
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
25220
25234
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
25221
|
-
return keyword
|
|
25235
|
+
return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
|
|
25222
25236
|
}
|
|
25223
25237
|
}
|
|
25224
25238
|
return undefined;
|
|
@@ -30727,7 +30741,7 @@ var ts;
|
|
|
30727
30741
|
if (namedArgRegExCache.has(name)) {
|
|
30728
30742
|
return namedArgRegExCache.get(name);
|
|
30729
30743
|
}
|
|
30730
|
-
var result = new RegExp("(\\s"
|
|
30744
|
+
var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
|
|
30731
30745
|
namedArgRegExCache.set(name, result);
|
|
30732
30746
|
return result;
|
|
30733
30747
|
}
|
|
@@ -32137,8 +32151,8 @@ var ts;
|
|
|
32137
32151
|
}
|
|
32138
32152
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
32139
32153
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
32140
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
32141
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
32154
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
|
|
32155
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
|
|
32142
32156
|
}
|
|
32143
32157
|
function parseCustomTypeOption(opt, value, errors) {
|
|
32144
32158
|
return convertJsonOptionOfCustomType(opt, ts.trimString(value || ""), errors);
|
|
@@ -32855,10 +32869,10 @@ var ts;
|
|
|
32855
32869
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
32856
32870
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
32857
32871
|
if (newValue !== defaultValue) {
|
|
32858
|
-
result.push(""
|
|
32872
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
|
|
32859
32873
|
}
|
|
32860
32874
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
32861
|
-
result.push(""
|
|
32875
|
+
result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
|
|
32862
32876
|
}
|
|
32863
32877
|
});
|
|
32864
32878
|
return result.join(newLine) + newLine;
|
|
@@ -32896,19 +32910,19 @@ var ts;
|
|
|
32896
32910
|
if (entries.length !== 0) {
|
|
32897
32911
|
entries.push({ value: "" });
|
|
32898
32912
|
}
|
|
32899
|
-
entries.push({ value: "/* "
|
|
32913
|
+
entries.push({ value: "/* ".concat(category, " */") });
|
|
32900
32914
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
32901
32915
|
var option = options_1[_i];
|
|
32902
32916
|
var optionName = void 0;
|
|
32903
32917
|
if (compilerOptionsMap.has(option.name)) {
|
|
32904
|
-
optionName = "\""
|
|
32918
|
+
optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
32905
32919
|
}
|
|
32906
32920
|
else {
|
|
32907
|
-
optionName = "// \""
|
|
32921
|
+
optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
|
|
32908
32922
|
}
|
|
32909
32923
|
entries.push({
|
|
32910
32924
|
value: optionName,
|
|
32911
|
-
description: "/* "
|
|
32925
|
+
description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
|
|
32912
32926
|
});
|
|
32913
32927
|
marginLength = Math.max(optionName.length, marginLength);
|
|
32914
32928
|
}
|
|
@@ -32916,24 +32930,24 @@ var ts;
|
|
|
32916
32930
|
var tab = makePadding(2);
|
|
32917
32931
|
var result = [];
|
|
32918
32932
|
result.push("{");
|
|
32919
|
-
result.push(tab
|
|
32920
|
-
result.push(""
|
|
32933
|
+
result.push("".concat(tab, "\"compilerOptions\": {"));
|
|
32934
|
+
result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file), " */"));
|
|
32921
32935
|
result.push("");
|
|
32922
32936
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
32923
32937
|
var entry = entries_2[_a];
|
|
32924
32938
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
32925
|
-
result.push(value && ""
|
|
32939
|
+
result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
|
|
32926
32940
|
}
|
|
32927
32941
|
if (fileNames.length) {
|
|
32928
|
-
result.push(tab
|
|
32929
|
-
result.push(tab
|
|
32942
|
+
result.push("".concat(tab, "},"));
|
|
32943
|
+
result.push("".concat(tab, "\"files\": ["));
|
|
32930
32944
|
for (var i = 0; i < fileNames.length; i++) {
|
|
32931
|
-
result.push(""
|
|
32945
|
+
result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
|
|
32932
32946
|
}
|
|
32933
|
-
result.push(tab
|
|
32947
|
+
result.push("".concat(tab, "]"));
|
|
32934
32948
|
}
|
|
32935
32949
|
else {
|
|
32936
|
-
result.push(tab
|
|
32950
|
+
result.push("".concat(tab, "}"));
|
|
32937
32951
|
}
|
|
32938
32952
|
result.push("}");
|
|
32939
32953
|
return result.join(newLine) + newLine;
|
|
@@ -33283,7 +33297,7 @@ var ts;
|
|
|
33283
33297
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
33284
33298
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
33285
33299
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
|
|
33286
|
-
extendedConfigPath = extendedConfigPath
|
|
33300
|
+
extendedConfigPath = "".concat(extendedConfigPath, ".json");
|
|
33287
33301
|
if (!host.fileExists(extendedConfigPath)) {
|
|
33288
33302
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
33289
33303
|
return undefined;
|
|
@@ -33479,7 +33493,7 @@ var ts;
|
|
|
33479
33493
|
if (ts.fileExtensionIs(file, ".json")) {
|
|
33480
33494
|
if (!jsonOnlyIncludeRegexes) {
|
|
33481
33495
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json"); });
|
|
33482
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
33496
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
|
|
33483
33497
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
33484
33498
|
}
|
|
33485
33499
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -33851,7 +33865,7 @@ var ts;
|
|
|
33851
33865
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
33852
33866
|
if (typeof bestVersionPaths !== "object") {
|
|
33853
33867
|
if (state.traceEnabled) {
|
|
33854
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
33868
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
|
|
33855
33869
|
}
|
|
33856
33870
|
return;
|
|
33857
33871
|
}
|
|
@@ -34220,7 +34234,7 @@ var ts;
|
|
|
34220
34234
|
};
|
|
34221
34235
|
return cache;
|
|
34222
34236
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
34223
|
-
var result = mode === undefined ? specifier : mode
|
|
34237
|
+
var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
|
|
34224
34238
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
34225
34239
|
return result;
|
|
34226
34240
|
}
|
|
@@ -34250,7 +34264,7 @@ var ts;
|
|
|
34250
34264
|
}
|
|
34251
34265
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
34252
34266
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
34253
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode
|
|
34267
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
|
|
34254
34268
|
}
|
|
34255
34269
|
function createPerModuleNameCache() {
|
|
34256
34270
|
var directoryPathMap = new ts.Map();
|
|
@@ -34378,10 +34392,10 @@ var ts;
|
|
|
34378
34392
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
34379
34393
|
break;
|
|
34380
34394
|
default:
|
|
34381
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
34395
|
+
return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
|
|
34382
34396
|
}
|
|
34383
34397
|
if (result && result.resolvedModule)
|
|
34384
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
34398
|
+
ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
|
|
34385
34399
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
34386
34400
|
if (perFolderCache) {
|
|
34387
34401
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -34511,7 +34525,7 @@ var ts;
|
|
|
34511
34525
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
34512
34526
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
34513
34527
|
if (!resolvedModule) {
|
|
34514
|
-
throw new Error("Could not resolve JS module '"
|
|
34528
|
+
throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
|
|
34515
34529
|
}
|
|
34516
34530
|
return resolvedModule.resolvedFileName;
|
|
34517
34531
|
}
|
|
@@ -34610,7 +34624,7 @@ var ts;
|
|
|
34610
34624
|
if (traceEnabled) {
|
|
34611
34625
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
34612
34626
|
}
|
|
34613
|
-
ts.Debug.assert(host.fileExists(real), path
|
|
34627
|
+
ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
|
|
34614
34628
|
return real;
|
|
34615
34629
|
}
|
|
34616
34630
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -35042,7 +35056,7 @@ var ts;
|
|
|
35042
35056
|
return undefined;
|
|
35043
35057
|
}
|
|
35044
35058
|
var trailingParts = parts.slice(nameParts.length);
|
|
35045
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
35059
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
|
|
35046
35060
|
}
|
|
35047
35061
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
35048
35062
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -35354,7 +35368,7 @@ var ts;
|
|
|
35354
35368
|
return mangled;
|
|
35355
35369
|
}
|
|
35356
35370
|
function getTypesPackageName(packageName) {
|
|
35357
|
-
return "@types/"
|
|
35371
|
+
return "@types/".concat(mangleScopedPackageName(packageName));
|
|
35358
35372
|
}
|
|
35359
35373
|
ts.getTypesPackageName = getTypesPackageName;
|
|
35360
35374
|
function mangleScopedPackageName(packageName) {
|
|
@@ -35680,7 +35694,7 @@ var ts;
|
|
|
35680
35694
|
if (name) {
|
|
35681
35695
|
if (ts.isAmbientModule(node)) {
|
|
35682
35696
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
35683
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
35697
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
|
|
35684
35698
|
}
|
|
35685
35699
|
if (name.kind === 161) {
|
|
35686
35700
|
var nameExpression = name.expression;
|
|
@@ -35729,7 +35743,7 @@ var ts;
|
|
|
35729
35743
|
case 315:
|
|
35730
35744
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
35731
35745
|
case 163:
|
|
35732
|
-
ts.Debug.assert(node.parent.kind === 315, "Impossible parameter parent kind", function () { return "parent is: "
|
|
35746
|
+
ts.Debug.assert(node.parent.kind === 315, "Impossible parameter parent kind", function () { return "parent is: ".concat(ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind, ", expected JSDocFunctionType"); });
|
|
35733
35747
|
var functionType = node.parent;
|
|
35734
35748
|
var index = functionType.parameters.indexOf(node);
|
|
35735
35749
|
return "arg" + index;
|
|
@@ -35795,7 +35809,7 @@ var ts;
|
|
|
35795
35809
|
}
|
|
35796
35810
|
var relatedInformation_1 = [];
|
|
35797
35811
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1) && symbol.flags & (2097152 | 788968 | 1920)) {
|
|
35798
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
35812
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
|
|
35799
35813
|
}
|
|
35800
35814
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
35801
35815
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -37617,7 +37631,7 @@ var ts;
|
|
|
37617
37631
|
}
|
|
37618
37632
|
}
|
|
37619
37633
|
function bindSourceFileAsExternalModule() {
|
|
37620
|
-
bindAnonymousDeclaration(file, 512, "\""
|
|
37634
|
+
bindAnonymousDeclaration(file, 512, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
|
|
37621
37635
|
}
|
|
37622
37636
|
function bindExportAssignment(node) {
|
|
37623
37637
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -39325,29 +39339,33 @@ var ts;
|
|
|
39325
39339
|
else {
|
|
39326
39340
|
var isEitherEnum = !!(target.flags & 384 || source.flags & 384);
|
|
39327
39341
|
var isEitherBlockScoped_1 = !!(target.flags & 2 || source.flags & 2);
|
|
39328
|
-
var message = isEitherEnum
|
|
39329
|
-
? ts.Diagnostics.
|
|
39330
|
-
: isEitherBlockScoped_1
|
|
39331
|
-
? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0
|
|
39342
|
+
var message = isEitherEnum ? ts.Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations
|
|
39343
|
+
: isEitherBlockScoped_1 ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0
|
|
39332
39344
|
: ts.Diagnostics.Duplicate_identifier_0;
|
|
39333
39345
|
var sourceSymbolFile = source.declarations && ts.getSourceFileOfNode(source.declarations[0]);
|
|
39334
39346
|
var targetSymbolFile = target.declarations && ts.getSourceFileOfNode(target.declarations[0]);
|
|
39347
|
+
var isSourcePlainJs = ts.isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs);
|
|
39348
|
+
var isTargetPlainJs = ts.isPlainJsFile(targetSymbolFile, compilerOptions.checkJs);
|
|
39335
39349
|
var symbolName_1 = symbolToString(source);
|
|
39336
39350
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
39337
39351
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 ? sourceSymbolFile : targetSymbolFile;
|
|
39338
39352
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
39339
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path
|
|
39353
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
|
|
39340
39354
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
39341
39355
|
});
|
|
39342
39356
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
39343
39357
|
return ({ isBlockScoped: isEitherBlockScoped_1, firstFileLocations: [], secondFileLocations: [] });
|
|
39344
39358
|
});
|
|
39345
|
-
|
|
39346
|
-
|
|
39359
|
+
if (!isSourcePlainJs)
|
|
39360
|
+
addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source);
|
|
39361
|
+
if (!isTargetPlainJs)
|
|
39362
|
+
addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target);
|
|
39347
39363
|
}
|
|
39348
39364
|
else {
|
|
39349
|
-
|
|
39350
|
-
|
|
39365
|
+
if (!isSourcePlainJs)
|
|
39366
|
+
addDuplicateDeclarationErrorsForSymbols(source, message, symbolName_1, target);
|
|
39367
|
+
if (!isTargetPlainJs)
|
|
39368
|
+
addDuplicateDeclarationErrorsForSymbols(target, message, symbolName_1, source);
|
|
39351
39369
|
}
|
|
39352
39370
|
}
|
|
39353
39371
|
return target;
|
|
@@ -39728,6 +39746,8 @@ var ts;
|
|
|
39728
39746
|
useResult = result.flags & 262144
|
|
39729
39747
|
? lastLocation === location.type ||
|
|
39730
39748
|
lastLocation.kind === 163 ||
|
|
39749
|
+
lastLocation.kind === 338 ||
|
|
39750
|
+
lastLocation.kind === 339 ||
|
|
39731
39751
|
lastLocation.kind === 162
|
|
39732
39752
|
: false;
|
|
39733
39753
|
}
|
|
@@ -39916,9 +39936,9 @@ var ts;
|
|
|
39916
39936
|
lastSelfReferenceLocation = location;
|
|
39917
39937
|
}
|
|
39918
39938
|
lastLocation = location;
|
|
39919
|
-
location = ts.isJSDocTemplateTag(location) ?
|
|
39920
|
-
ts.
|
|
39921
|
-
|
|
39939
|
+
location = ts.isJSDocTemplateTag(location) ? ts.getEffectiveContainerForJSDocTemplateTag(location) || location.parent :
|
|
39940
|
+
ts.isJSDocParameterTag(location) || ts.isJSDocReturnTag(location) ? ts.getHostSignatureFromJSDoc(location) || location.parent :
|
|
39941
|
+
location.parent;
|
|
39922
39942
|
}
|
|
39923
39943
|
if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {
|
|
39924
39944
|
result.isReferenced |= meaning;
|
|
@@ -40910,15 +40930,18 @@ var ts;
|
|
|
40910
40930
|
return;
|
|
40911
40931
|
}
|
|
40912
40932
|
var host = ts.getJSDocHost(node);
|
|
40913
|
-
if (host &&
|
|
40914
|
-
ts.isExpressionStatement(host) &&
|
|
40915
|
-
ts.isBinaryExpression(host.expression) &&
|
|
40916
|
-
ts.getAssignmentDeclarationKind(host.expression) === 3) {
|
|
40933
|
+
if (host && ts.isExpressionStatement(host) && ts.isPrototypePropertyAssignment(host.expression)) {
|
|
40917
40934
|
var symbol = getSymbolOfNode(host.expression.left);
|
|
40918
40935
|
if (symbol) {
|
|
40919
40936
|
return getDeclarationOfJSPrototypeContainer(symbol);
|
|
40920
40937
|
}
|
|
40921
40938
|
}
|
|
40939
|
+
if (host && ts.isFunctionExpression(host) && ts.isPrototypePropertyAssignment(host.parent) && ts.isExpressionStatement(host.parent.parent)) {
|
|
40940
|
+
var symbol = getSymbolOfNode(host.parent.left);
|
|
40941
|
+
if (symbol) {
|
|
40942
|
+
return getDeclarationOfJSPrototypeContainer(symbol);
|
|
40943
|
+
}
|
|
40944
|
+
}
|
|
40922
40945
|
if (host && (ts.isObjectLiteralMethod(host) || ts.isPropertyAssignment(host)) &&
|
|
40923
40946
|
ts.isBinaryExpression(host.parent.parent) &&
|
|
40924
40947
|
ts.getAssignmentDeclarationKind(host.parent.parent) === 6) {
|
|
@@ -41611,7 +41634,7 @@ var ts;
|
|
|
41611
41634
|
var links = getSymbolLinks(symbol);
|
|
41612
41635
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
41613
41636
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
41614
|
-
var key = (useOnlyExternalAliasing ? 0 : 1
|
|
41637
|
+
var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
|
|
41615
41638
|
if (cache.has(key)) {
|
|
41616
41639
|
return cache.get(key);
|
|
41617
41640
|
}
|
|
@@ -42379,7 +42402,7 @@ var ts;
|
|
|
42379
42402
|
context.symbolDepth = new ts.Map();
|
|
42380
42403
|
}
|
|
42381
42404
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
42382
|
-
var key = getTypeId(type)
|
|
42405
|
+
var key = "".concat(getTypeId(type), "|").concat(context.flags);
|
|
42383
42406
|
if (links) {
|
|
42384
42407
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
42385
42408
|
}
|
|
@@ -42634,7 +42657,7 @@ var ts;
|
|
|
42634
42657
|
}
|
|
42635
42658
|
}
|
|
42636
42659
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
42637
|
-
typeElements.push(ts.factory.createPropertySignature(undefined, "... "
|
|
42660
|
+
typeElements.push(ts.factory.createPropertySignature(undefined, "... ".concat(properties.length - i, " more ..."), undefined, undefined));
|
|
42638
42661
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
42639
42662
|
break;
|
|
42640
42663
|
}
|
|
@@ -42742,7 +42765,7 @@ var ts;
|
|
|
42742
42765
|
else if (types.length > 2) {
|
|
42743
42766
|
return [
|
|
42744
42767
|
typeToTypeNodeHelper(types[0], context),
|
|
42745
|
-
ts.factory.createTypeReferenceNode("... "
|
|
42768
|
+
ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), undefined),
|
|
42746
42769
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
42747
42770
|
];
|
|
42748
42771
|
}
|
|
@@ -42755,7 +42778,7 @@ var ts;
|
|
|
42755
42778
|
var type = types_2[_i];
|
|
42756
42779
|
i++;
|
|
42757
42780
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
42758
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
42781
|
+
result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), undefined));
|
|
42759
42782
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
42760
42783
|
if (typeNode_1) {
|
|
42761
42784
|
result_5.push(typeNode_1);
|
|
@@ -43231,7 +43254,7 @@ var ts;
|
|
|
43231
43254
|
var text = rawtext;
|
|
43232
43255
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
43233
43256
|
i++;
|
|
43234
|
-
text = rawtext
|
|
43257
|
+
text = "".concat(rawtext, "_").concat(i);
|
|
43235
43258
|
}
|
|
43236
43259
|
if (text !== rawtext) {
|
|
43237
43260
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -43513,7 +43536,7 @@ var ts;
|
|
|
43513
43536
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
43514
43537
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
43515
43538
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
43516
|
-
: "arg"
|
|
43539
|
+
: "arg".concat(index);
|
|
43517
43540
|
}
|
|
43518
43541
|
function rewriteModuleSpecifier(parent, lit) {
|
|
43519
43542
|
if (bundled) {
|
|
@@ -44322,7 +44345,7 @@ var ts;
|
|
|
44322
44345
|
}
|
|
44323
44346
|
return results_1;
|
|
44324
44347
|
}
|
|
44325
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
44348
|
+
return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
|
|
44326
44349
|
};
|
|
44327
44350
|
}
|
|
44328
44351
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -44392,7 +44415,7 @@ var ts;
|
|
|
44392
44415
|
if (ref) {
|
|
44393
44416
|
return ref;
|
|
44394
44417
|
}
|
|
44395
|
-
var tempName = getUnusedName(rootName
|
|
44418
|
+
var tempName = getUnusedName("".concat(rootName, "_base"));
|
|
44396
44419
|
var statement = ts.factory.createVariableStatement(undefined, ts.factory.createVariableDeclarationList([
|
|
44397
44420
|
ts.factory.createVariableDeclaration(tempName, undefined, typeToTypeNodeHelper(staticType, context))
|
|
44398
44421
|
], 2));
|
|
@@ -44437,7 +44460,7 @@ var ts;
|
|
|
44437
44460
|
var original = input;
|
|
44438
44461
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
44439
44462
|
i++;
|
|
44440
|
-
input = original
|
|
44463
|
+
input = "".concat(original, "_").concat(i);
|
|
44441
44464
|
}
|
|
44442
44465
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
44443
44466
|
if (id) {
|
|
@@ -44543,15 +44566,15 @@ var ts;
|
|
|
44543
44566
|
if (nameType.flags & 384) {
|
|
44544
44567
|
var name = "" + nameType.value;
|
|
44545
44568
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
44546
|
-
return "\""
|
|
44569
|
+
return "\"".concat(ts.escapeString(name, 34), "\"");
|
|
44547
44570
|
}
|
|
44548
44571
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
44549
|
-
return "["
|
|
44572
|
+
return "[".concat(name, "]");
|
|
44550
44573
|
}
|
|
44551
44574
|
return name;
|
|
44552
44575
|
}
|
|
44553
44576
|
if (nameType.flags & 8192) {
|
|
44554
|
-
return "["
|
|
44577
|
+
return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
|
|
44555
44578
|
}
|
|
44556
44579
|
}
|
|
44557
44580
|
}
|
|
@@ -44801,9 +44824,12 @@ var ts;
|
|
|
44801
44824
|
function isErrorType(type) {
|
|
44802
44825
|
return type === errorType || !!(type.flags & 1 && type.aliasSymbol);
|
|
44803
44826
|
}
|
|
44804
|
-
function getTypeForBindingElementParent(node) {
|
|
44827
|
+
function getTypeForBindingElementParent(node, checkMode) {
|
|
44828
|
+
if (checkMode !== 0) {
|
|
44829
|
+
return getTypeForVariableLikeDeclaration(node, false, checkMode);
|
|
44830
|
+
}
|
|
44805
44831
|
var symbol = getSymbolOfNode(node);
|
|
44806
|
-
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
|
|
44832
|
+
return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false, checkMode);
|
|
44807
44833
|
}
|
|
44808
44834
|
function getRestType(source, properties, symbol) {
|
|
44809
44835
|
source = filterType(source, function (t) { return !(t.flags & 98304); });
|
|
@@ -44908,7 +44934,8 @@ var ts;
|
|
|
44908
44934
|
return type.flags & (128 | 256) ? "" + type.value : undefined;
|
|
44909
44935
|
}
|
|
44910
44936
|
function getTypeForBindingElement(declaration) {
|
|
44911
|
-
var
|
|
44937
|
+
var checkMode = declaration.dotDotDotToken ? 32 : 0;
|
|
44938
|
+
var parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode);
|
|
44912
44939
|
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
44913
44940
|
}
|
|
44914
44941
|
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
@@ -44968,9 +44995,9 @@ var ts;
|
|
|
44968
44995
|
return type;
|
|
44969
44996
|
}
|
|
44970
44997
|
if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
|
|
44971
|
-
return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768) ? getNonUndefinedType(type) : type;
|
|
44998
|
+
return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration, 0)) & 32768) ? getNonUndefinedType(type) : type;
|
|
44972
44999
|
}
|
|
44973
|
-
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration)], 2));
|
|
45000
|
+
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0)], 2));
|
|
44974
45001
|
}
|
|
44975
45002
|
function getTypeForDeclarationFromJSDocComment(declaration) {
|
|
44976
45003
|
var jsdocType = ts.getJSDocType(declaration);
|
|
@@ -44992,9 +45019,9 @@ var ts;
|
|
|
44992
45019
|
if (isOptional === void 0) { isOptional = true; }
|
|
44993
45020
|
return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type;
|
|
44994
45021
|
}
|
|
44995
|
-
function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
|
|
45022
|
+
function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) {
|
|
44996
45023
|
if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 242) {
|
|
44997
|
-
var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression)));
|
|
45024
|
+
var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression, checkMode)));
|
|
44998
45025
|
return indexType.flags & (262144 | 4194304) ? getExtractStringType(indexType) : stringType;
|
|
44999
45026
|
}
|
|
45000
45027
|
if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 243) {
|
|
@@ -45037,12 +45064,9 @@ var ts;
|
|
|
45037
45064
|
}
|
|
45038
45065
|
}
|
|
45039
45066
|
if (ts.isInJSFile(declaration)) {
|
|
45040
|
-
var
|
|
45041
|
-
if (
|
|
45042
|
-
|
|
45043
|
-
var pos = func.parameters.indexOf(declaration);
|
|
45044
|
-
return declaration.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos);
|
|
45045
|
-
}
|
|
45067
|
+
var type_1 = getParameterTypeOfTypeTag(func, declaration);
|
|
45068
|
+
if (type_1)
|
|
45069
|
+
return type_1;
|
|
45046
45070
|
}
|
|
45047
45071
|
var type = declaration.symbol.escapedName === "this" ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration);
|
|
45048
45072
|
if (type) {
|
|
@@ -45056,7 +45080,7 @@ var ts;
|
|
|
45056
45080
|
return containerObjectType;
|
|
45057
45081
|
}
|
|
45058
45082
|
}
|
|
45059
|
-
var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration));
|
|
45083
|
+
var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration, checkMode));
|
|
45060
45084
|
return addOptionality(type, isProperty, isOptional);
|
|
45061
45085
|
}
|
|
45062
45086
|
if (ts.isPropertyDeclaration(declaration) && (noImplicitAny || ts.isInJSFile(declaration))) {
|
|
@@ -45389,7 +45413,7 @@ var ts;
|
|
|
45389
45413
|
function getTypeFromBindingElement(element, includePatternInType, reportErrors) {
|
|
45390
45414
|
if (element.initializer) {
|
|
45391
45415
|
var contextualType = ts.isBindingPattern(element.name) ? getTypeFromBindingPattern(element.name, true, false) : unknownType;
|
|
45392
|
-
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, contextualType)));
|
|
45416
|
+
return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0, contextualType)));
|
|
45393
45417
|
}
|
|
45394
45418
|
if (ts.isBindingPattern(element.name)) {
|
|
45395
45419
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors);
|
|
@@ -45455,7 +45479,7 @@ var ts;
|
|
|
45455
45479
|
: getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
|
|
45456
45480
|
}
|
|
45457
45481
|
function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) {
|
|
45458
|
-
return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true), declaration, reportErrors);
|
|
45482
|
+
return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true, 0), declaration, reportErrors);
|
|
45459
45483
|
}
|
|
45460
45484
|
function isGlobalSymbolConstructor(node) {
|
|
45461
45485
|
var symbol = getSymbolOfNode(node);
|
|
@@ -45534,8 +45558,8 @@ var ts;
|
|
|
45534
45558
|
if (typeNode === undefined) {
|
|
45535
45559
|
return useUnknownInCatchVariables ? unknownType : anyType;
|
|
45536
45560
|
}
|
|
45537
|
-
var
|
|
45538
|
-
return isTypeAny(
|
|
45561
|
+
var type_2 = getTypeOfNode(typeNode);
|
|
45562
|
+
return isTypeAny(type_2) || type_2 === unknownType ? type_2 : errorType;
|
|
45539
45563
|
}
|
|
45540
45564
|
if (ts.isSourceFile(declaration) && ts.isJsonSourceFile(declaration)) {
|
|
45541
45565
|
if (!declaration.statements.length) {
|
|
@@ -45666,9 +45690,11 @@ var ts;
|
|
|
45666
45690
|
if (writing === void 0) { writing = false; }
|
|
45667
45691
|
var getter = ts.getDeclarationOfKind(symbol, 171);
|
|
45668
45692
|
var setter = ts.getDeclarationOfKind(symbol, 172);
|
|
45669
|
-
|
|
45670
|
-
|
|
45671
|
-
|
|
45693
|
+
if (writing) {
|
|
45694
|
+
var setterType_1 = getAnnotatedAccessorType(setter);
|
|
45695
|
+
if (setterType_1) {
|
|
45696
|
+
return instantiateTypeIfNeeded(setterType_1, symbol);
|
|
45697
|
+
}
|
|
45672
45698
|
}
|
|
45673
45699
|
if (getter && ts.isInJSFile(getter)) {
|
|
45674
45700
|
var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
|
|
@@ -45680,6 +45706,7 @@ var ts;
|
|
|
45680
45706
|
if (getterType) {
|
|
45681
45707
|
return instantiateTypeIfNeeded(getterType, symbol);
|
|
45682
45708
|
}
|
|
45709
|
+
var setterType = getAnnotatedAccessorType(setter);
|
|
45683
45710
|
if (setterType) {
|
|
45684
45711
|
return setterType;
|
|
45685
45712
|
}
|
|
@@ -45747,11 +45774,11 @@ var ts;
|
|
|
45747
45774
|
return errorType;
|
|
45748
45775
|
}
|
|
45749
45776
|
var exportEquals = getMergedSymbol(symbol.exports.get("export="));
|
|
45750
|
-
var
|
|
45777
|
+
var type_3 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? undefined : resolvedModule);
|
|
45751
45778
|
if (!popTypeResolution()) {
|
|
45752
45779
|
return reportCircularityError(symbol);
|
|
45753
45780
|
}
|
|
45754
|
-
return
|
|
45781
|
+
return type_3;
|
|
45755
45782
|
}
|
|
45756
45783
|
}
|
|
45757
45784
|
var type = createObjectType(16, symbol);
|
|
@@ -45815,6 +45842,31 @@ var ts;
|
|
|
45815
45842
|
}
|
|
45816
45843
|
return links.type;
|
|
45817
45844
|
}
|
|
45845
|
+
function getWriteTypeOfSymbolWithDeferredType(symbol) {
|
|
45846
|
+
var links = getSymbolLinks(symbol);
|
|
45847
|
+
if (!links.writeType && links.deferralWriteConstituents) {
|
|
45848
|
+
ts.Debug.assertIsDefined(links.deferralParent);
|
|
45849
|
+
ts.Debug.assertIsDefined(links.deferralConstituents);
|
|
45850
|
+
links.writeType = links.deferralParent.flags & 1048576 ? getUnionType(links.deferralWriteConstituents) : getIntersectionType(links.deferralWriteConstituents);
|
|
45851
|
+
}
|
|
45852
|
+
return links.writeType;
|
|
45853
|
+
}
|
|
45854
|
+
function getWriteTypeOfSymbol(symbol) {
|
|
45855
|
+
var checkFlags = ts.getCheckFlags(symbol);
|
|
45856
|
+
if (checkFlags & 65536) {
|
|
45857
|
+
var writeType = getWriteTypeOfSymbolWithDeferredType(symbol);
|
|
45858
|
+
if (writeType) {
|
|
45859
|
+
return writeType;
|
|
45860
|
+
}
|
|
45861
|
+
}
|
|
45862
|
+
if (symbol.flags & 33554432) {
|
|
45863
|
+
var writeType = symbol.writeType;
|
|
45864
|
+
if (writeType) {
|
|
45865
|
+
return writeType;
|
|
45866
|
+
}
|
|
45867
|
+
}
|
|
45868
|
+
return getSetAccessorTypeOfSymbol(symbol);
|
|
45869
|
+
}
|
|
45818
45870
|
function getSetAccessorTypeOfSymbol(symbol) {
|
|
45819
45871
|
if (symbol.flags & 98304) {
|
|
45820
45872
|
var type = getTypeOfSetAccessor(symbol);
|
|
@@ -46967,7 +47019,7 @@ var ts;
|
|
|
46967
47019
|
!leftName ? rightName :
|
|
46968
47020
|
!rightName ? leftName :
|
|
46969
47021
|
undefined;
|
|
46970
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
47022
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
46971
47023
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
46972
47024
|
params[i] = paramSymbol;
|
|
46973
47025
|
}
|
|
@@ -47659,10 +47711,10 @@ var ts;
|
|
|
47659
47711
|
var baseTypes = [];
|
|
47660
47712
|
var different = false;
|
|
47661
47713
|
for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
|
|
47662
|
-
var
|
|
47663
|
-
var baseType = getBaseConstraint(
|
|
47714
|
+
var type_4 = types_7[_i];
|
|
47715
|
+
var baseType = getBaseConstraint(type_4);
|
|
47664
47716
|
if (baseType) {
|
|
47665
|
-
if (baseType !==
|
|
47717
|
+
if (baseType !== type_4) {
|
|
47666
47718
|
different = true;
|
|
47667
47719
|
}
|
|
47668
47720
|
baseTypes.push(baseType);
|
|
@@ -47868,6 +47920,7 @@ var ts;
|
|
|
47868
47920
|
var firstType;
|
|
47869
47921
|
var nameType;
|
|
47870
47922
|
var propTypes = [];
|
|
47923
|
+
var writeTypes;
|
|
47871
47924
|
var firstValueDeclaration;
|
|
47872
47925
|
var hasNonUniformValueDeclaration = false;
|
|
47873
47926
|
for (var _d = 0, props_1 = props; _d < props_1.length; _d++) {
|
|
@@ -47884,6 +47937,10 @@ var ts;
|
|
|
47884
47937
|
firstType = type;
|
|
47885
47938
|
nameType = getSymbolLinks(prop).nameType;
|
|
47886
47939
|
}
|
|
47940
|
+
var writeType = getWriteTypeOfSymbol(prop);
|
|
47941
|
+
if (writeTypes || writeType !== type) {
|
|
47942
|
+
writeTypes = ts.append(!writeTypes ? propTypes.slice() : writeTypes, writeType);
|
|
47943
|
+
}
|
|
47887
47944
|
else if (type !== firstType) {
|
|
47888
47945
|
checkFlags |= 64;
|
|
47889
47946
|
}
|
|
@@ -47910,9 +47967,13 @@ var ts;
|
|
|
47910
47967
|
result.checkFlags |= 65536;
|
|
47911
47968
|
result.deferralParent = containingType;
|
|
47912
47969
|
result.deferralConstituents = propTypes;
|
|
47970
|
+
result.deferralWriteConstituents = writeTypes;
|
|
47913
47971
|
}
|
|
47914
47972
|
else {
|
|
47915
47973
|
result.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes);
|
|
47974
|
+
if (writeTypes) {
|
|
47975
|
+
result.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes);
|
|
47976
|
+
}
|
|
47916
47977
|
}
|
|
47917
47978
|
return result;
|
|
47918
47979
|
}
|
|
@@ -48263,6 +48324,13 @@ var ts;
|
|
|
48263
48324
|
var typeTag = ts.getJSDocTypeTag(node);
|
|
48264
48325
|
return (typeTag === null || typeTag === void 0 ? void 0 : typeTag.typeExpression) && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
|
|
48265
48326
|
}
|
|
48327
|
+
function getParameterTypeOfTypeTag(func, parameter) {
|
|
48328
|
+
var signature = getSignatureOfTypeTag(func);
|
|
48329
|
+
if (!signature)
|
|
48330
|
+
return undefined;
|
|
48331
|
+
var pos = func.parameters.indexOf(parameter);
|
|
48332
|
+
return parameter.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos);
|
|
48333
|
+
}
|
|
48266
48334
|
function getReturnTypeOfTypeTag(node) {
|
|
48267
48335
|
var signature = getSignatureOfTypeTag(node);
|
|
48268
48336
|
return signature && getReturnTypeOfSignature(signature);
|
|
@@ -48664,7 +48732,7 @@ var ts;
|
|
|
48664
48732
|
return result;
|
|
48665
48733
|
}
|
|
48666
48734
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
48667
|
-
return aliasSymbol ? "@"
|
|
48735
|
+
return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
|
|
48668
48736
|
}
|
|
48669
48737
|
function getPropagatingFlagsOfTypes(types, excludeKinds) {
|
|
48670
48738
|
var result = 0;
|
|
@@ -48827,7 +48895,7 @@ var ts;
|
|
|
48827
48895
|
return undefined;
|
|
48828
48896
|
}
|
|
48829
48897
|
function getSymbolPath(symbol) {
|
|
48830
|
-
return symbol.parent ? getSymbolPath(symbol.parent)
|
|
48898
|
+
return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
|
|
48831
48899
|
}
|
|
48832
48900
|
function getUnresolvedSymbolForEntityName(name) {
|
|
48833
48901
|
var identifier = name.kind === 160 ? name.right :
|
|
@@ -48838,7 +48906,7 @@ var ts;
|
|
|
48838
48906
|
var parentSymbol = name.kind === 160 ? getUnresolvedSymbolForEntityName(name.left) :
|
|
48839
48907
|
name.kind === 205 ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
48840
48908
|
undefined;
|
|
48841
|
-
var path = parentSymbol ? getSymbolPath(parentSymbol)
|
|
48909
|
+
var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
|
|
48842
48910
|
var result = unresolvedSymbols.get(path);
|
|
48843
48911
|
if (!result) {
|
|
48844
48912
|
unresolvedSymbols.set(path, result = createSymbol(524288, text, 1048576));
|
|
@@ -48904,7 +48972,7 @@ var ts;
|
|
|
48904
48972
|
if (substitute.flags & 3 || substitute === baseType) {
|
|
48905
48973
|
return baseType;
|
|
48906
48974
|
}
|
|
48907
|
-
var id = getTypeId(baseType)
|
|
48975
|
+
var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
|
|
48908
48976
|
var cached = substitutionTypes.get(id);
|
|
48909
48977
|
if (cached) {
|
|
48910
48978
|
return cached;
|
|
@@ -49748,9 +49816,9 @@ var ts;
|
|
|
49748
49816
|
return types[0];
|
|
49749
49817
|
}
|
|
49750
49818
|
var typeKey = !origin ? getTypeListId(types) :
|
|
49751
|
-
origin.flags & 1048576 ? "|"
|
|
49752
|
-
origin.flags & 2097152 ? "&"
|
|
49753
|
-
"#"
|
|
49819
|
+
origin.flags & 1048576 ? "|".concat(getTypeListId(origin.types)) :
|
|
49820
|
+
origin.flags & 2097152 ? "&".concat(getTypeListId(origin.types)) :
|
|
49821
|
+
"#".concat(origin.type.id, "|").concat(getTypeListId(types));
|
|
49754
49822
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
49755
49823
|
var type = unionTypes.get(id);
|
|
49756
49824
|
if (!type) {
|
|
@@ -50200,7 +50268,7 @@ var ts;
|
|
|
50200
50268
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4); })) {
|
|
50201
50269
|
return stringType;
|
|
50202
50270
|
}
|
|
50203
|
-
var id = getTypeListId(newTypes)
|
|
50271
|
+
var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
|
|
50204
50272
|
var type = templateLiteralTypes.get(id);
|
|
50205
50273
|
if (!type) {
|
|
50206
50274
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -50260,7 +50328,7 @@ var ts;
|
|
|
50260
50328
|
return str;
|
|
50261
50329
|
}
|
|
50262
50330
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
50263
|
-
var id = getSymbolId(symbol)
|
|
50331
|
+
var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
|
|
50264
50332
|
var result = stringMappingTypes.get(id);
|
|
50265
50333
|
if (!result) {
|
|
50266
50334
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -51168,7 +51236,7 @@ var ts;
|
|
|
51168
51236
|
function createUniqueESSymbolType(symbol) {
|
|
51169
51237
|
var type = createType(8192);
|
|
51170
51238
|
type.symbol = symbol;
|
|
51171
|
-
type.escapedName = "__@"
|
|
51239
|
+
type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
|
|
51172
51240
|
return type;
|
|
51173
51241
|
}
|
|
51174
51242
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -52689,20 +52757,20 @@ var ts;
|
|
|
52689
52757
|
switch (msg.code) {
|
|
52690
52758
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
52691
52759
|
if (path.indexOf("new ") === 0) {
|
|
52692
|
-
path = "("
|
|
52760
|
+
path = "(".concat(path, ")");
|
|
52693
52761
|
}
|
|
52694
52762
|
var str = "" + args[0];
|
|
52695
52763
|
if (path.length === 0) {
|
|
52696
|
-
path = ""
|
|
52764
|
+
path = "".concat(str);
|
|
52697
52765
|
}
|
|
52698
52766
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
52699
|
-
path = path
|
|
52767
|
+
path = "".concat(path, ".").concat(str);
|
|
52700
52768
|
}
|
|
52701
52769
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
52702
|
-
path = ""
|
|
52770
|
+
path = "".concat(path).concat(str);
|
|
52703
52771
|
}
|
|
52704
52772
|
else {
|
|
52705
|
-
path = path
|
|
52773
|
+
path = "".concat(path, "[").concat(str, "]");
|
|
52706
52774
|
}
|
|
52707
52775
|
break;
|
|
52708
52776
|
}
|
|
@@ -52729,7 +52797,7 @@ var ts;
|
|
|
52729
52797
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
52730
52798
|
? ""
|
|
52731
52799
|
: "...";
|
|
52732
|
-
path = ""
|
|
52800
|
+
path = "".concat(prefix).concat(path, "(").concat(params, ")");
|
|
52733
52801
|
}
|
|
52734
52802
|
break;
|
|
52735
52803
|
}
|
|
@@ -52742,7 +52810,7 @@ var ts;
|
|
|
52742
52810
|
break;
|
|
52743
52811
|
}
|
|
52744
52812
|
default:
|
|
52745
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
52813
|
+
return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
|
|
52746
52814
|
}
|
|
52747
52815
|
}
|
|
52748
52816
|
if (path) {
|
|
@@ -54590,7 +54658,7 @@ var ts;
|
|
|
54590
54658
|
var constraintMarker = "";
|
|
54591
54659
|
var sourceId = getTypeReferenceId(source, 0);
|
|
54592
54660
|
var targetId = getTypeReferenceId(target, 0);
|
|
54593
|
-
return ""
|
|
54661
|
+
return "".concat(constraintMarker).concat(sourceId, ",").concat(targetId).concat(postFix);
|
|
54594
54662
|
function getTypeReferenceId(type, depth) {
|
|
54595
54663
|
if (depth === void 0) { depth = 0; }
|
|
54596
54664
|
var result = "" + type.target.id;
|
|
@@ -54626,7 +54694,7 @@ var ts;
|
|
|
54626
54694
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
54627
54695
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
54628
54696
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
54629
|
-
source.id
|
|
54697
|
+
"".concat(source.id, ",").concat(target.id).concat(postFix);
|
|
54630
54698
|
}
|
|
54631
54699
|
function forEachProperty(prop, callback) {
|
|
54632
54700
|
if (ts.getCheckFlags(prop) & 6) {
|
|
@@ -56449,10 +56517,10 @@ var ts;
|
|
|
56449
56517
|
case 79:
|
|
56450
56518
|
if (!ts.isThisInTypeQuery(node)) {
|
|
56451
56519
|
var symbol = getResolvedSymbol(node);
|
|
56452
|
-
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1"
|
|
56520
|
+
return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
|
|
56453
56521
|
}
|
|
56454
56522
|
case 108:
|
|
56455
|
-
return "0|"
|
|
56523
|
+
return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
|
|
56456
56524
|
case 229:
|
|
56457
56525
|
case 211:
|
|
56458
56526
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -58377,16 +58445,18 @@ var ts;
|
|
|
58377
58445
|
function isGenericTypeWithoutNullableConstraint(type) {
|
|
58378
58446
|
return !!(type.flags & 465829888 && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304));
|
|
58379
58447
|
}
|
|
58380
|
-
function
|
|
58448
|
+
function hasContextualTypeWithNoGenericTypes(node, checkMode) {
|
|
58381
58449
|
var contextualType = (ts.isIdentifier(node) || ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) &&
|
|
58382
58450
|
!((ts.isJsxOpeningElement(node.parent) || ts.isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) &&
|
|
58383
|
-
|
|
58451
|
+
(checkMode && checkMode & 32 ?
|
|
58452
|
+
getContextualType(node, 8)
|
|
58453
|
+
: getContextualType(node));
|
|
58384
58454
|
return contextualType && !isGenericType(contextualType);
|
|
58385
58455
|
}
|
|
58386
58456
|
function getNarrowableTypeForReference(type, reference, checkMode) {
|
|
58387
58457
|
var substituteConstraints = !(checkMode && checkMode & 2) &&
|
|
58388
58458
|
someType(type, isGenericTypeWithUnionConstraint) &&
|
|
58389
|
-
(isConstraintPosition(type, reference) ||
|
|
58459
|
+
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
|
|
58390
58460
|
return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t; }) : type;
|
|
58391
58461
|
}
|
|
58392
58462
|
function isExportOrExportExpression(location) {
|
|
@@ -58428,7 +58498,7 @@ var ts;
|
|
|
58428
58498
|
var links = getNodeLinks(location);
|
|
58429
58499
|
if (!(links.flags & 268435456)) {
|
|
58430
58500
|
links.flags |= 268435456;
|
|
58431
|
-
var parentType = getTypeForBindingElementParent(parent);
|
|
58501
|
+
var parentType = getTypeForBindingElementParent(parent, 0);
|
|
58432
58502
|
links.flags &= ~268435456;
|
|
58433
58503
|
if (parentType && parentType.flags & 1048576 && !(parent.kind === 163 && isSymbolAssigned(symbol))) {
|
|
58434
58504
|
var pattern = declaration.parent;
|
|
@@ -59099,7 +59169,7 @@ var ts;
|
|
|
59099
59169
|
var parent = declaration.parent.parent;
|
|
59100
59170
|
var name = declaration.propertyName || declaration.name;
|
|
59101
59171
|
var parentType = getContextualTypeForVariableLikeDeclaration(parent) ||
|
|
59102
|
-
parent.kind !== 202 && parent.initializer && checkDeclarationInitializer(parent);
|
|
59172
|
+
parent.kind !== 202 && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 32 : 0);
|
|
59103
59173
|
if (!parentType || ts.isBindingPattern(name) || ts.isComputedNonLiteralName(name))
|
|
59104
59174
|
return undefined;
|
|
59105
59175
|
if (parent.name.kind === 201) {
|
|
@@ -59767,7 +59837,7 @@ var ts;
|
|
|
59767
59837
|
!leftName ? rightName :
|
|
59768
59838
|
!rightName ? leftName :
|
|
59769
59839
|
undefined;
|
|
59770
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
59840
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
|
|
59771
59841
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
59772
59842
|
params[i] = paramSymbol;
|
|
59773
59843
|
}
|
|
@@ -61014,7 +61084,7 @@ var ts;
|
|
|
61014
61084
|
error(right, ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, ts.idText(right));
|
|
61015
61085
|
return errorType;
|
|
61016
61086
|
}
|
|
61017
|
-
propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ?
|
|
61087
|
+
propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
|
|
61018
61088
|
}
|
|
61019
61089
|
return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
|
|
61020
61090
|
}
|
|
@@ -63106,8 +63176,8 @@ var ts;
|
|
|
63106
63176
|
if (hasDefaultOnly && type && !isErrorType(type)) {
|
|
63107
63177
|
var synthType = type;
|
|
63108
63178
|
if (!synthType.defaultOnlyType) {
|
|
63109
|
-
var
|
|
63110
|
-
synthType.defaultOnlyType =
|
|
63179
|
+
var type_5 = createDefaultPropertyWrapperForModule(symbol, originalSymbol);
|
|
63180
|
+
synthType.defaultOnlyType = type_5;
|
|
63111
63181
|
}
|
|
63112
63182
|
return synthType.defaultOnlyType;
|
|
63113
63183
|
}
|
|
@@ -63773,11 +63843,11 @@ var ts;
|
|
|
63773
63843
|
var operandType = getTypeOfExpression(node.expression.expression);
|
|
63774
63844
|
var witnesses = getSwitchClauseTypeOfWitnesses(node, false);
|
|
63775
63845
|
var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, true);
|
|
63776
|
-
var
|
|
63777
|
-
if (
|
|
63846
|
+
var type_6 = getBaseConstraintOfType(operandType) || operandType;
|
|
63847
|
+
if (type_6.flags & 3) {
|
|
63778
63848
|
return (556800 & notEqualFacts_1) === 556800;
|
|
63779
63849
|
}
|
|
63780
|
-
return !!(filterType(
|
|
63850
|
+
return !!(filterType(type_6, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072);
|
|
63781
63851
|
}
|
|
63782
63852
|
var type = getTypeOfExpression(node.expression);
|
|
63783
63853
|
if (!isLiteralType(type)) {
|
|
@@ -65068,11 +65138,11 @@ var ts;
|
|
|
65068
65138
|
}
|
|
65069
65139
|
}
|
|
65070
65140
|
function checkExpressionCached(node, checkMode) {
|
|
65141
|
+
if (checkMode && checkMode !== 0) {
|
|
65142
|
+
return checkExpression(node, checkMode);
|
|
65143
|
+
}
|
|
65071
65144
|
var links = getNodeLinks(node);
|
|
65072
65145
|
if (!links.resolvedType) {
|
|
65073
|
-
if (checkMode && checkMode !== 0) {
|
|
65074
|
-
return checkExpression(node, checkMode);
|
|
65075
|
-
}
|
|
65076
65146
|
var saveFlowLoopStart = flowLoopStart;
|
|
65077
65147
|
var saveFlowTypeCache = flowTypeCache;
|
|
65078
65148
|
flowLoopStart = flowLoopCount;
|
|
@@ -65089,10 +65159,12 @@ var ts;
|
|
|
65089
65159
|
node.kind === 228 ||
|
|
65090
65160
|
ts.isJSDocTypeAssertion(node);
|
|
65091
65161
|
}
|
|
65092
|
-
function checkDeclarationInitializer(declaration, contextualType) {
|
|
65162
|
+
function checkDeclarationInitializer(declaration, checkMode, contextualType) {
|
|
65093
65163
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
65094
65164
|
var type = getQuickTypeOfExpression(initializer) ||
|
|
65095
|
-
(contextualType ?
|
|
65165
|
+
(contextualType ?
|
|
65166
|
+
checkExpressionWithContextualType(initializer, contextualType, undefined, checkMode || 0)
|
|
65167
|
+
: checkExpressionCached(initializer, checkMode));
|
|
65096
65168
|
return ts.isParameter(declaration) && declaration.name.kind === 201 &&
|
|
65097
65169
|
isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ?
|
|
65098
65170
|
padTupleType(type, declaration.name) : type;
|
|
@@ -65660,6 +65732,7 @@ var ts;
|
|
|
65660
65732
|
}
|
|
65661
65733
|
}
|
|
65662
65734
|
checkTypeParameters(ts.getEffectiveTypeParameterDeclarations(node));
|
|
65735
|
+
checkUnmatchedJSDocParameters(node);
|
|
65663
65736
|
ts.forEach(node.parameters, checkParameter);
|
|
65664
65737
|
if (node.type) {
|
|
65665
65738
|
checkSourceElement(node.type);
|
|
@@ -66941,28 +67014,6 @@ var ts;
|
|
|
66941
67014
|
}
|
|
66942
67015
|
function checkJSDocParameterTag(node) {
|
|
66943
67016
|
checkSourceElement(node.typeExpression);
|
|
66944
|
-
if (!ts.getParameterSymbolFromJSDoc(node)) {
|
|
66945
|
-
var decl = ts.getHostSignatureFromJSDoc(node);
|
|
66946
|
-
if (decl) {
|
|
66947
|
-
var i = ts.getJSDocTags(decl).filter(ts.isJSDocParameterTag).indexOf(node);
|
|
66948
|
-
if (i > -1 && i < decl.parameters.length && ts.isBindingPattern(decl.parameters[i].name)) {
|
|
66949
|
-
return;
|
|
66950
|
-
}
|
|
66951
|
-
if (!containsArgumentsReference(decl)) {
|
|
66952
|
-
if (ts.isQualifiedName(node.name)) {
|
|
66953
|
-
error(node.name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(node.name), ts.entityNameToString(node.name.left));
|
|
66954
|
-
}
|
|
66955
|
-
else {
|
|
66956
|
-
error(node.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(node.name));
|
|
66957
|
-
}
|
|
66958
|
-
}
|
|
66959
|
-
else if (ts.findLast(ts.getJSDocTags(decl), ts.isJSDocParameterTag) === node &&
|
|
66960
|
-
node.typeExpression && node.typeExpression.type &&
|
|
66961
|
-
!isArrayType(getTypeFromTypeNode(node.typeExpression.type))) {
|
|
66962
|
-
error(node.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(node.name.kind === 160 ? node.name.right : node.name));
|
|
66963
|
-
}
|
|
66964
|
-
}
|
|
66965
|
-
}
|
|
66966
67017
|
}
|
|
66967
67018
|
function checkJSDocPropertyTag(node) {
|
|
66968
67019
|
checkSourceElement(node.typeExpression);
|
|
@@ -67563,7 +67614,8 @@ var ts;
|
|
|
67563
67614
|
checkComputedPropertyName(node.propertyName);
|
|
67564
67615
|
}
|
|
67565
67616
|
var parent = node.parent.parent;
|
|
67566
|
-
var
|
|
67617
|
+
var parentCheckMode = node.dotDotDotToken ? 32 : 0;
|
|
67618
|
+
var parentType = getTypeForBindingElementParent(parent, parentCheckMode);
|
|
67567
67619
|
var name = node.propertyName || node.name;
|
|
67568
67620
|
if (parentType && !ts.isBindingPattern(name)) {
|
|
67569
67621
|
var exprType = getLiteralTypeFromPropertyName(name);
|
|
@@ -68204,7 +68256,7 @@ var ts;
|
|
|
68204
68256
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
68205
68257
|
var ctorType = getGlobalESSymbolConstructorSymbol(false);
|
|
68206
68258
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
68207
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
68259
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
|
|
68208
68260
|
}
|
|
68209
68261
|
function getIterationTypesOfIterableSlow(type, resolver, errorNode) {
|
|
68210
68262
|
var _a;
|
|
@@ -68527,7 +68579,7 @@ var ts;
|
|
|
68527
68579
|
var declaration = catchClause.variableDeclaration;
|
|
68528
68580
|
var typeNode = ts.getEffectiveTypeAnnotationNode(ts.getRootDeclaration(declaration));
|
|
68529
68581
|
if (typeNode) {
|
|
68530
|
-
var type = getTypeForVariableLikeDeclaration(declaration, false);
|
|
68582
|
+
var type = getTypeForVariableLikeDeclaration(declaration, false, 0);
|
|
68531
68583
|
if (type && !(type.flags & 3)) {
|
|
68532
68584
|
grammarErrorOnFirstToken(typeNode, ts.Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
|
|
68533
68585
|
}
|
|
@@ -68645,6 +68697,45 @@ var ts;
|
|
|
68645
68697
|
error(name, ts.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ts.ModuleKind[moduleKind]);
|
|
68646
68698
|
}
|
|
68647
68699
|
}
|
|
68700
|
+
function checkUnmatchedJSDocParameters(node) {
|
|
68701
|
+
var jsdocParameters = ts.filter(ts.getJSDocTags(node), ts.isJSDocParameterTag);
|
|
68702
|
+
if (!ts.length(jsdocParameters))
|
|
68703
|
+
return;
|
|
68704
|
+
var isJs = ts.isInJSFile(node);
|
|
68705
|
+
var parameters = new ts.Set();
|
|
68706
|
+
var excludedParameters = new ts.Set();
|
|
68707
|
+
ts.forEach(node.parameters, function (_a, index) {
|
|
68708
|
+
var name = _a.name;
|
|
68709
|
+
if (ts.isIdentifier(name)) {
|
|
68710
|
+
parameters.add(name.escapedText);
|
|
68711
|
+
}
|
|
68712
|
+
if (ts.isBindingPattern(name)) {
|
|
68713
|
+
excludedParameters.add(index);
|
|
68714
|
+
}
|
|
68715
|
+
});
|
|
68716
|
+
var containsArguments = containsArgumentsReference(node);
|
|
68717
|
+
if (containsArguments) {
|
|
68718
|
+
var lastJSDocParam = ts.lastOrUndefined(jsdocParameters);
|
|
68719
|
+
if (lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
|
|
68720
|
+
lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
|
|
68721
|
+
errorOrSuggestion(isJs, lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
|
|
68722
|
+
}
|
|
68723
|
+
}
|
|
68724
|
+
else {
|
|
68725
|
+
ts.forEach(jsdocParameters, function (_a, index) {
|
|
68726
|
+
var name = _a.name;
|
|
68727
|
+
if (excludedParameters.has(index) || ts.isIdentifier(name) && parameters.has(name.escapedText)) {
|
|
68728
|
+
return;
|
|
68729
|
+
}
|
|
68730
|
+
if (ts.isQualifiedName(name)) {
|
|
68731
|
+
errorOrSuggestion(isJs, name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
|
|
68732
|
+
}
|
|
68733
|
+
else {
|
|
68734
|
+
errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
|
|
68735
|
+
}
|
|
68736
|
+
});
|
|
68737
|
+
}
|
|
68738
|
+
}
|
|
68648
68739
|
function checkTypeParameters(typeParameterDeclarations) {
|
|
68649
68740
|
if (typeParameterDeclarations) {
|
|
68650
68741
|
var seenDefault = false;
|
|
@@ -69521,7 +69612,7 @@ var ts;
|
|
|
69521
69612
|
var isAmbientExternalModule = ts.isAmbientModule(node);
|
|
69522
69613
|
var contextErrorMessage = isAmbientExternalModule
|
|
69523
69614
|
? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file
|
|
69524
|
-
: ts.Diagnostics.
|
|
69615
|
+
: ts.Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module;
|
|
69525
69616
|
if (checkGrammarModuleElementContext(node, contextErrorMessage)) {
|
|
69526
69617
|
return;
|
|
69527
69618
|
}
|
|
@@ -69722,6 +69813,9 @@ var ts;
|
|
|
69722
69813
|
var name = ts.idText(node.kind === 269 ? node.propertyName || node.name : node.name);
|
|
69723
69814
|
addTypeOnlyDeclarationRelatedInfo(error(node, message, name), isType ? undefined : typeOnlyAlias, name);
|
|
69724
69815
|
}
|
|
69816
|
+
if (isType && node.kind === 264 && ts.hasEffectiveModifier(node, 1)) {
|
|
69817
|
+
error(node, ts.Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided);
|
|
69818
|
+
}
|
|
69725
69819
|
break;
|
|
69726
69820
|
}
|
|
69727
69821
|
case 274: {
|
|
@@ -69802,7 +69896,7 @@ var ts;
|
|
|
69802
69896
|
}
|
|
69803
69897
|
}
|
|
69804
69898
|
function checkImportDeclaration(node) {
|
|
69805
|
-
if (checkGrammarModuleElementContext(node, ts.Diagnostics.
|
|
69899
|
+
if (checkGrammarModuleElementContext(node, ts.isInJSFile(node) ? ts.Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : ts.Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
|
|
69806
69900
|
return;
|
|
69807
69901
|
}
|
|
69808
69902
|
if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasEffectiveModifiers(node)) {
|
|
@@ -69833,7 +69927,7 @@ var ts;
|
|
|
69833
69927
|
checkAssertClause(node);
|
|
69834
69928
|
}
|
|
69835
69929
|
function checkImportEqualsDeclaration(node) {
|
|
69836
|
-
if (checkGrammarModuleElementContext(node, ts.Diagnostics.
|
|
69930
|
+
if (checkGrammarModuleElementContext(node, ts.isInJSFile(node) ? ts.Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : ts.Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
|
|
69837
69931
|
return;
|
|
69838
69932
|
}
|
|
69839
69933
|
checkGrammarDecoratorsAndModifiers(node);
|
|
@@ -69867,7 +69961,7 @@ var ts;
|
|
|
69867
69961
|
}
|
|
69868
69962
|
}
|
|
69869
69963
|
function checkExportDeclaration(node) {
|
|
69870
|
-
if (checkGrammarModuleElementContext(node, ts.Diagnostics.
|
|
69964
|
+
if (checkGrammarModuleElementContext(node, ts.isInJSFile(node) ? ts.Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : ts.Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) {
|
|
69871
69965
|
return;
|
|
69872
69966
|
}
|
|
69873
69967
|
if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasEffectiveModifiers(node)) {
|
|
@@ -70985,7 +71079,7 @@ var ts;
|
|
|
70985
71079
|
return errorType;
|
|
70986
71080
|
}
|
|
70987
71081
|
if (ts.isBindingPattern(node)) {
|
|
70988
|
-
return getTypeForVariableLikeDeclaration(node.parent, true) || errorType;
|
|
71082
|
+
return getTypeForVariableLikeDeclaration(node.parent, true, 0) || errorType;
|
|
70989
71083
|
}
|
|
70990
71084
|
if (isInRightSideOfImportOrExportAssignment(node)) {
|
|
70991
71085
|
var symbol = getSymbolAtLocation(node);
|
|
@@ -74488,7 +74582,7 @@ var ts;
|
|
|
74488
74582
|
value >= 52 && value < 62 ? 48 + value - 52 :
|
|
74489
74583
|
value === 62 ? 43 :
|
|
74490
74584
|
value === 63 ? 47 :
|
|
74491
|
-
ts.Debug.fail(value
|
|
74585
|
+
ts.Debug.fail("".concat(value, ": not a base64 value"));
|
|
74492
74586
|
}
|
|
74493
74587
|
function base64FormatDecode(ch) {
|
|
74494
74588
|
return ch >= 65 && ch <= 90 ? ch - 65 :
|
|
@@ -74561,7 +74655,7 @@ var ts;
|
|
|
74561
74655
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
74562
74656
|
if (decoder.error !== undefined) {
|
|
74563
74657
|
if (host.log) {
|
|
74564
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
74658
|
+
host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
|
|
74565
74659
|
}
|
|
74566
74660
|
decodedMappings = ts.emptyArray;
|
|
74567
74661
|
}
|
|
@@ -77004,7 +77098,7 @@ var ts;
|
|
|
77004
77098
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
77005
77099
|
? ts.declarationNameToString(originalNode.name)
|
|
77006
77100
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
77007
|
-
ts.addSyntheticTrailingComment(substitute, 3, " "
|
|
77101
|
+
ts.addSyntheticTrailingComment(substitute, 3, " ".concat(propertyName, " "));
|
|
77008
77102
|
}
|
|
77009
77103
|
return substitute;
|
|
77010
77104
|
}
|
|
@@ -78254,8 +78348,8 @@ var ts;
|
|
|
78254
78348
|
}
|
|
78255
78349
|
function createHoistedVariableForClass(name, node) {
|
|
78256
78350
|
var className = getPrivateIdentifierEnvironment().className;
|
|
78257
|
-
var prefix = className ? "_"
|
|
78258
|
-
var identifier = factory.createUniqueName(prefix
|
|
78351
|
+
var prefix = className ? "_".concat(className) : "";
|
|
78352
|
+
var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16);
|
|
78259
78353
|
if (resolver.getNodeCheckFlags(node) & 524288) {
|
|
78260
78354
|
addBlockScopedVariable(identifier);
|
|
78261
78355
|
}
|
|
@@ -79913,7 +80007,7 @@ var ts;
|
|
|
79913
80007
|
specifierSourceImports = new ts.Map();
|
|
79914
80008
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
79915
80009
|
}
|
|
79916
|
-
var generatedName = factory.createUniqueName("_"
|
|
80010
|
+
var generatedName = factory.createUniqueName("_".concat(name), 16 | 32 | 64);
|
|
79917
80011
|
var specifier = factory.createImportSpecifier(false, factory.createIdentifier(name), generatedName);
|
|
79918
80012
|
generatedName.generatedImportReference = specifier;
|
|
79919
80013
|
specifierSourceImports.set(name, specifier);
|
|
@@ -80854,11 +80948,11 @@ var ts;
|
|
|
80854
80948
|
}
|
|
80855
80949
|
else {
|
|
80856
80950
|
if (node.kind === 245) {
|
|
80857
|
-
labelMarker = "break-"
|
|
80951
|
+
labelMarker = "break-".concat(label.escapedText);
|
|
80858
80952
|
setLabeledJump(convertedLoopState, true, ts.idText(label), labelMarker);
|
|
80859
80953
|
}
|
|
80860
80954
|
else {
|
|
80861
|
-
labelMarker = "continue-"
|
|
80955
|
+
labelMarker = "continue-".concat(label.escapedText);
|
|
80862
80956
|
setLabeledJump(convertedLoopState, false, ts.idText(label), labelMarker);
|
|
80863
80957
|
}
|
|
80864
80958
|
}
|
|
@@ -86513,7 +86607,7 @@ var ts;
|
|
|
86513
86607
|
return getTypeAliasDeclarationVisibilityError;
|
|
86514
86608
|
}
|
|
86515
86609
|
else {
|
|
86516
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
86610
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
|
|
86517
86611
|
}
|
|
86518
86612
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
86519
86613
|
if (node.kind === 253 || node.kind === 202) {
|
|
@@ -86710,7 +86804,7 @@ var ts;
|
|
|
86710
86804
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
86711
86805
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
86712
86806
|
default:
|
|
86713
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
86807
|
+
return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
|
|
86714
86808
|
}
|
|
86715
86809
|
}
|
|
86716
86810
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -87397,7 +87491,7 @@ var ts;
|
|
|
87397
87491
|
while (ts.length(lateMarkedStatements)) {
|
|
87398
87492
|
var i = lateMarkedStatements.shift();
|
|
87399
87493
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
87400
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
87494
|
+
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));
|
|
87401
87495
|
}
|
|
87402
87496
|
var priorNeedsDeclare = needsDeclare;
|
|
87403
87497
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -87562,7 +87656,7 @@ var ts;
|
|
|
87562
87656
|
return cleanup(input);
|
|
87563
87657
|
return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
|
|
87564
87658
|
}
|
|
87565
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
87659
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
|
|
87566
87660
|
}
|
|
87567
87661
|
}
|
|
87568
87662
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -87806,7 +87900,7 @@ var ts;
|
|
|
87806
87900
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
87807
87901
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
87808
87902
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
87809
|
-
var newId_1 = factory.createUniqueName(oldId
|
|
87903
|
+
var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16);
|
|
87810
87904
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
87811
87905
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
87812
87906
|
errorNode: extendsClause_1,
|
|
@@ -87843,7 +87937,7 @@ var ts;
|
|
|
87843
87937
|
}))));
|
|
87844
87938
|
}
|
|
87845
87939
|
}
|
|
87846
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
87940
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
|
|
87847
87941
|
function cleanup(node) {
|
|
87848
87942
|
if (isEnclosingDeclaration(input)) {
|
|
87849
87943
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -88612,13 +88706,13 @@ var ts;
|
|
|
88612
88706
|
if (ts.fileExtensionIs(inputFileName, ".json"))
|
|
88613
88707
|
return;
|
|
88614
88708
|
if (js && configFile.options.sourceMap) {
|
|
88615
|
-
addOutput(js
|
|
88709
|
+
addOutput("".concat(js, ".map"));
|
|
88616
88710
|
}
|
|
88617
88711
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
88618
88712
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
88619
88713
|
addOutput(dts);
|
|
88620
88714
|
if (configFile.options.declarationMap) {
|
|
88621
|
-
addOutput(dts
|
|
88715
|
+
addOutput("".concat(dts, ".map"));
|
|
88622
88716
|
}
|
|
88623
88717
|
}
|
|
88624
88718
|
}
|
|
@@ -88678,7 +88772,7 @@ var ts;
|
|
|
88678
88772
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
88679
88773
|
if (ts.outFile(configFile.options)) {
|
|
88680
88774
|
var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath;
|
|
88681
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
88775
|
+
return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
88682
88776
|
}
|
|
88683
88777
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
88684
88778
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -88697,7 +88791,7 @@ var ts;
|
|
|
88697
88791
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
88698
88792
|
if (buildInfoPath)
|
|
88699
88793
|
return buildInfoPath;
|
|
88700
|
-
return ts.Debug.fail("project "
|
|
88794
|
+
return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
|
|
88701
88795
|
}
|
|
88702
88796
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
88703
88797
|
function emitFiles(resolver, host, targetSourceFile, _a, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
|
|
@@ -88907,7 +89001,7 @@ var ts;
|
|
|
88907
89001
|
if (sourceMappingURL) {
|
|
88908
89002
|
if (!writer.isAtStartOfLine())
|
|
88909
89003
|
writer.rawWrite(newLine);
|
|
88910
|
-
writer.writeComment("//# "
|
|
89004
|
+
writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL));
|
|
88911
89005
|
}
|
|
88912
89006
|
if (sourceMapFilePath) {
|
|
88913
89007
|
var sourceMap = sourceMapGenerator.toString();
|
|
@@ -88947,7 +89041,7 @@ var ts;
|
|
|
88947
89041
|
if (mapOptions.inlineSourceMap) {
|
|
88948
89042
|
var sourceMapText = sourceMapGenerator.toString();
|
|
88949
89043
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
88950
|
-
return "data:application/json;base64,"
|
|
89044
|
+
return "data:application/json;base64,".concat(base64SourceMapText);
|
|
88951
89045
|
}
|
|
88952
89046
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
88953
89047
|
if (mapOptions.mapRoot) {
|
|
@@ -89111,7 +89205,7 @@ var ts;
|
|
|
89111
89205
|
return;
|
|
89112
89206
|
break;
|
|
89113
89207
|
default:
|
|
89114
|
-
ts.Debug.fail("Unexpected path: "
|
|
89208
|
+
ts.Debug.fail("Unexpected path: ".concat(name));
|
|
89115
89209
|
}
|
|
89116
89210
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
89117
89211
|
},
|
|
@@ -89919,7 +90013,7 @@ var ts;
|
|
|
89919
90013
|
return writeTokenNode(node, writeKeyword);
|
|
89920
90014
|
if (ts.isTokenKind(node.kind))
|
|
89921
90015
|
return writeTokenNode(node, writePunctuation);
|
|
89922
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
90016
|
+
ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
89923
90017
|
}
|
|
89924
90018
|
function emitMappedTypeParameter(node) {
|
|
89925
90019
|
emit(node.name);
|
|
@@ -90059,14 +90153,14 @@ var ts;
|
|
|
90059
90153
|
}
|
|
90060
90154
|
}
|
|
90061
90155
|
function emitPlaceholder(hint, node, snippet) {
|
|
90062
|
-
nonEscapingWrite("${"
|
|
90156
|
+
nonEscapingWrite("${".concat(snippet.order, ":"));
|
|
90063
90157
|
pipelineEmitWithHintWorker(hint, node, false);
|
|
90064
90158
|
nonEscapingWrite("}");
|
|
90065
90159
|
}
|
|
90066
90160
|
function emitTabStop(hint, node, snippet) {
|
|
90067
|
-
ts.Debug.assert(node.kind === 235, "A tab stop cannot be attached to a node of kind "
|
|
90161
|
+
ts.Debug.assert(node.kind === 235, "A tab stop cannot be attached to a node of kind ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
|
|
90068
90162
|
ts.Debug.assert(hint !== 5, "A tab stop cannot be attached to an embedded statement.");
|
|
90069
|
-
nonEscapingWrite("$"
|
|
90163
|
+
nonEscapingWrite("$".concat(snippet.order));
|
|
90070
90164
|
}
|
|
90071
90165
|
function emitIdentifier(node) {
|
|
90072
90166
|
var writeText = node.symbol ? writeSymbol : write;
|
|
@@ -91729,17 +91823,17 @@ var ts;
|
|
|
91729
91823
|
writeLine();
|
|
91730
91824
|
}
|
|
91731
91825
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
91732
|
-
writeComment("/// <amd-module name=\""
|
|
91826
|
+
writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
|
|
91733
91827
|
writeLine();
|
|
91734
91828
|
}
|
|
91735
91829
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
91736
91830
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
91737
91831
|
var dep = _b[_a];
|
|
91738
91832
|
if (dep.name) {
|
|
91739
|
-
writeComment("/// <amd-dependency name=\""
|
|
91833
|
+
writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
|
|
91740
91834
|
}
|
|
91741
91835
|
else {
|
|
91742
|
-
writeComment("/// <amd-dependency path=\""
|
|
91836
|
+
writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
|
|
91743
91837
|
}
|
|
91744
91838
|
writeLine();
|
|
91745
91839
|
}
|
|
@@ -91747,7 +91841,7 @@ var ts;
|
|
|
91747
91841
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
91748
91842
|
var directive = files_2[_c];
|
|
91749
91843
|
var pos = writer.getTextPos();
|
|
91750
|
-
writeComment("/// <reference path=\""
|
|
91844
|
+
writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
|
|
91751
91845
|
if (bundleFileInfo)
|
|
91752
91846
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
91753
91847
|
writeLine();
|
|
@@ -91755,7 +91849,7 @@ var ts;
|
|
|
91755
91849
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
91756
91850
|
var directive = types_24[_d];
|
|
91757
91851
|
var pos = writer.getTextPos();
|
|
91758
|
-
writeComment("/// <reference types=\""
|
|
91852
|
+
writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
|
|
91759
91853
|
if (bundleFileInfo)
|
|
91760
91854
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type", data: directive.fileName });
|
|
91761
91855
|
writeLine();
|
|
@@ -91763,7 +91857,7 @@ var ts;
|
|
|
91763
91857
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
91764
91858
|
var directive = libs_1[_e];
|
|
91765
91859
|
var pos = writer.getTextPos();
|
|
91766
|
-
writeComment("/// <reference lib=\""
|
|
91860
|
+
writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
|
|
91767
91861
|
if (bundleFileInfo)
|
|
91768
91862
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib", data: directive.fileName });
|
|
91769
91863
|
writeLine();
|
|
@@ -92462,9 +92556,9 @@ var ts;
|
|
|
92462
92556
|
var textSourceNode = node.textSourceNode;
|
|
92463
92557
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
92464
92558
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
92465
|
-
return jsxAttributeEscape ? "\""
|
|
92466
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\""
|
|
92467
|
-
"\""
|
|
92559
|
+
return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
|
|
92560
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"".concat(ts.escapeString(text), "\"") :
|
|
92561
|
+
"\"".concat(ts.escapeNonAsciiString(text), "\"");
|
|
92468
92562
|
}
|
|
92469
92563
|
else {
|
|
92470
92564
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -92863,8 +92957,8 @@ var ts;
|
|
|
92863
92957
|
}
|
|
92864
92958
|
function formatSynthesizedComment(comment) {
|
|
92865
92959
|
return comment.kind === 3
|
|
92866
|
-
? "/*"
|
|
92867
|
-
: "//"
|
|
92960
|
+
? "/*".concat(comment.text, "*/")
|
|
92961
|
+
: "//".concat(comment.text);
|
|
92868
92962
|
}
|
|
92869
92963
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
92870
92964
|
enterComment();
|
|
@@ -93478,18 +93572,18 @@ var ts;
|
|
|
93478
93572
|
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;
|
|
93479
93573
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
93480
93574
|
if (!newPath) {
|
|
93481
|
-
writeLog("Project: "
|
|
93575
|
+
writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
|
|
93482
93576
|
return true;
|
|
93483
93577
|
}
|
|
93484
93578
|
fileOrDirectoryPath = newPath;
|
|
93485
93579
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
93486
93580
|
return false;
|
|
93487
93581
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
93488
|
-
writeLog("Project: "
|
|
93582
|
+
writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
|
|
93489
93583
|
return true;
|
|
93490
93584
|
}
|
|
93491
93585
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
93492
|
-
writeLog("Project: "
|
|
93586
|
+
writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
|
|
93493
93587
|
return true;
|
|
93494
93588
|
}
|
|
93495
93589
|
if (!program)
|
|
@@ -93508,7 +93602,7 @@ var ts;
|
|
|
93508
93602
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
93509
93603
|
if (hasSourceFile((filePathWithoutExtension + ".ts")) ||
|
|
93510
93604
|
hasSourceFile((filePathWithoutExtension + ".tsx"))) {
|
|
93511
|
-
writeLog("Project: "
|
|
93605
|
+
writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
|
|
93512
93606
|
return true;
|
|
93513
93607
|
}
|
|
93514
93608
|
return false;
|
|
@@ -93576,36 +93670,36 @@ var ts;
|
|
|
93576
93670
|
host.useCaseSensitiveFileNames();
|
|
93577
93671
|
}
|
|
93578
93672
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
93579
|
-
log("ExcludeWatcher:: Added:: "
|
|
93673
|
+
log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
93580
93674
|
return {
|
|
93581
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
93675
|
+
close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
|
|
93582
93676
|
};
|
|
93583
93677
|
}
|
|
93584
93678
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
93585
|
-
log("FileWatcher:: Added:: "
|
|
93679
|
+
log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
93586
93680
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
93587
93681
|
return {
|
|
93588
93682
|
close: function () {
|
|
93589
|
-
log("FileWatcher:: Close:: "
|
|
93683
|
+
log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
|
|
93590
93684
|
watcher.close();
|
|
93591
93685
|
}
|
|
93592
93686
|
};
|
|
93593
93687
|
}
|
|
93594
93688
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
93595
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
93689
|
+
var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
93596
93690
|
log(watchInfo);
|
|
93597
93691
|
var start = ts.timestamp();
|
|
93598
93692
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
93599
93693
|
var elapsed = ts.timestamp() - start;
|
|
93600
|
-
log("Elapsed:: "
|
|
93694
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
93601
93695
|
return {
|
|
93602
93696
|
close: function () {
|
|
93603
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
93697
|
+
var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
93604
93698
|
log(watchInfo);
|
|
93605
93699
|
var start = ts.timestamp();
|
|
93606
93700
|
watcher.close();
|
|
93607
93701
|
var elapsed = ts.timestamp() - start;
|
|
93608
|
-
log("Elapsed:: "
|
|
93702
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
|
|
93609
93703
|
}
|
|
93610
93704
|
};
|
|
93611
93705
|
}
|
|
@@ -93615,16 +93709,16 @@ var ts;
|
|
|
93615
93709
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
93616
93710
|
args[_i] = arguments[_i];
|
|
93617
93711
|
}
|
|
93618
|
-
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"
|
|
93712
|
+
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));
|
|
93619
93713
|
log(triggerredInfo);
|
|
93620
93714
|
var start = ts.timestamp();
|
|
93621
93715
|
cb.call.apply(cb, __spreadArray([undefined], args, false));
|
|
93622
93716
|
var elapsed = ts.timestamp() - start;
|
|
93623
|
-
log("Elapsed:: "
|
|
93717
|
+
log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
|
|
93624
93718
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
93625
93719
|
}
|
|
93626
93720
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
93627
|
-
return "WatchInfo: "
|
|
93721
|
+
return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
|
|
93628
93722
|
}
|
|
93629
93723
|
}
|
|
93630
93724
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -93914,12 +94008,12 @@ var ts;
|
|
|
93914
94008
|
}
|
|
93915
94009
|
ts.formatDiagnostics = formatDiagnostics;
|
|
93916
94010
|
function formatDiagnostic(diagnostic, host) {
|
|
93917
|
-
var errorMessage = ts.diagnosticCategoryName(diagnostic)
|
|
94011
|
+
var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
|
|
93918
94012
|
if (diagnostic.file) {
|
|
93919
94013
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
|
|
93920
94014
|
var fileName = diagnostic.file.fileName;
|
|
93921
94015
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
93922
|
-
return relativeFileName
|
|
94016
|
+
return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
|
|
93923
94017
|
}
|
|
93924
94018
|
return errorMessage;
|
|
93925
94019
|
}
|
|
@@ -93997,9 +94091,9 @@ var ts;
|
|
|
93997
94091
|
var output = "";
|
|
93998
94092
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
93999
94093
|
output += ":";
|
|
94000
|
-
output += color(""
|
|
94094
|
+
output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
94001
94095
|
output += ":";
|
|
94002
|
-
output += color(""
|
|
94096
|
+
output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
94003
94097
|
return output;
|
|
94004
94098
|
}
|
|
94005
94099
|
ts.formatLocation = formatLocation;
|
|
@@ -94013,7 +94107,7 @@ var ts;
|
|
|
94013
94107
|
output += " - ";
|
|
94014
94108
|
}
|
|
94015
94109
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
94016
|
-
output += formatColorAndReset(" TS"
|
|
94110
|
+
output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
|
|
94017
94111
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
94018
94112
|
if (diagnostic.file) {
|
|
94019
94113
|
output += host.getNewLine();
|
|
@@ -94113,7 +94207,7 @@ var ts;
|
|
|
94113
94207
|
var result = void 0;
|
|
94114
94208
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
94115
94209
|
i++;
|
|
94116
|
-
var cacheKey = mode !== undefined ? mode
|
|
94210
|
+
var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
|
|
94117
94211
|
if (cache.has(cacheKey)) {
|
|
94118
94212
|
result = cache.get(cacheKey);
|
|
94119
94213
|
}
|
|
@@ -94311,9 +94405,9 @@ var ts;
|
|
|
94311
94405
|
ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code,
|
|
94312
94406
|
ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter.code,
|
|
94313
94407
|
ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code,
|
|
94314
|
-
ts.Diagnostics.
|
|
94408
|
+
ts.Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code,
|
|
94315
94409
|
ts.Diagnostics.An_export_declaration_cannot_have_modifiers.code,
|
|
94316
|
-
ts.Diagnostics.
|
|
94410
|
+
ts.Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code,
|
|
94317
94411
|
ts.Diagnostics.An_import_declaration_cannot_have_modifiers.code,
|
|
94318
94412
|
ts.Diagnostics.An_object_member_cannot_be_declared_optional.code,
|
|
94319
94413
|
ts.Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element.code,
|
|
@@ -95211,7 +95305,7 @@ var ts;
|
|
|
95211
95305
|
ts.Debug.assert(!!sourceFile.bindDiagnostics);
|
|
95212
95306
|
var isJs = sourceFile.scriptKind === 1 || sourceFile.scriptKind === 2;
|
|
95213
95307
|
var isCheckJs = isJs && ts.isCheckJsEnabledForFile(sourceFile, options);
|
|
95214
|
-
var isPlainJs =
|
|
95308
|
+
var isPlainJs = ts.isPlainJsFile(sourceFile, options.checkJs);
|
|
95215
95309
|
var isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;
|
|
95216
95310
|
var includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === 3 || sourceFile.scriptKind === 4
|
|
95217
95311
|
|| sourceFile.scriptKind === 5 || isPlainJs || isCheckJs || sourceFile.scriptKind === 7);
|
|
@@ -95984,7 +96078,7 @@ var ts;
|
|
|
95984
96078
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
95985
96079
|
i++;
|
|
95986
96080
|
}
|
|
95987
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
96081
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
|
|
95988
96082
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
95989
96083
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
95990
96084
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -96753,10 +96847,10 @@ var ts;
|
|
|
96753
96847
|
}
|
|
96754
96848
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
96755
96849
|
var dirPath = host.toPath(dir);
|
|
96756
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
96850
|
+
var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
|
|
96757
96851
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
96758
96852
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
96759
|
-
ts.startsWith(dirPath, declDirPath
|
|
96853
|
+
ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
|
|
96760
96854
|
}
|
|
96761
96855
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
96762
96856
|
var _a;
|
|
@@ -96804,7 +96898,7 @@ var ts;
|
|
|
96804
96898
|
var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));
|
|
96805
96899
|
if (isFile && result) {
|
|
96806
96900
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
96807
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
96901
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
|
|
96808
96902
|
}
|
|
96809
96903
|
return result;
|
|
96810
96904
|
}) || false;
|
|
@@ -97188,7 +97282,7 @@ var ts;
|
|
|
97188
97282
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
97189
97283
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
97190
97284
|
if (firstDts_1) {
|
|
97191
|
-
ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts", ".d.mts", ".d.cts"]), "File extension for signature expected to be dts", function () { return "Found: "
|
|
97285
|
+
ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts", ".d.mts", ".d.cts"]), "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; }))); });
|
|
97192
97286
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
97193
97287
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
97194
97288
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -97584,7 +97678,7 @@ var ts;
|
|
|
97584
97678
|
return;
|
|
97585
97679
|
}
|
|
97586
97680
|
else {
|
|
97587
|
-
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: "
|
|
97681
|
+
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));
|
|
97588
97682
|
}
|
|
97589
97683
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
97590
97684
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -98556,7 +98650,7 @@ var ts;
|
|
|
98556
98650
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
98557
98651
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
98558
98652
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
98559
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
98653
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
|
|
98560
98654
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
98561
98655
|
return {
|
|
98562
98656
|
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator),
|
|
@@ -99478,7 +99572,7 @@ var ts;
|
|
|
99478
99572
|
}
|
|
99479
99573
|
function getJSExtensionForFile(fileName, options) {
|
|
99480
99574
|
var _a;
|
|
99481
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
99575
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
|
|
99482
99576
|
}
|
|
99483
99577
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
99484
99578
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -99568,8 +99662,8 @@ var ts;
|
|
|
99568
99662
|
return pretty ?
|
|
99569
99663
|
function (diagnostic, newLine, options) {
|
|
99570
99664
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
99571
|
-
var output = "["
|
|
99572
|
-
output += ""
|
|
99665
|
+
var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
|
|
99666
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
|
|
99573
99667
|
system.write(output);
|
|
99574
99668
|
} :
|
|
99575
99669
|
function (diagnostic, newLine, options) {
|
|
@@ -99577,8 +99671,8 @@ var ts;
|
|
|
99577
99671
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
99578
99672
|
output += newLine;
|
|
99579
99673
|
}
|
|
99580
|
-
output += getLocaleTimeString(system)
|
|
99581
|
-
output += ""
|
|
99674
|
+
output += "".concat(getLocaleTimeString(system), " - ");
|
|
99675
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
|
|
99582
99676
|
system.write(output);
|
|
99583
99677
|
};
|
|
99584
99678
|
}
|
|
@@ -99600,7 +99694,7 @@ var ts;
|
|
|
99600
99694
|
.map(function (errorDiagnostic) {
|
|
99601
99695
|
if (errorDiagnostic.file === undefined)
|
|
99602
99696
|
return;
|
|
99603
|
-
return ""
|
|
99697
|
+
return "".concat(errorDiagnostic.file.fileName);
|
|
99604
99698
|
});
|
|
99605
99699
|
return filesInError.map(function (fileName) {
|
|
99606
99700
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -99633,7 +99727,7 @@ var ts;
|
|
|
99633
99727
|
if (errorCount === 0)
|
|
99634
99728
|
return "";
|
|
99635
99729
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
99636
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName
|
|
99730
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return "".concat(fileInError.fileName, ":").concat(fileInError.line); })
|
|
99637
99731
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
99638
99732
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
99639
99733
|
var d = errorCount === 1 ?
|
|
@@ -99646,7 +99740,7 @@ var ts;
|
|
|
99646
99740
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
99647
99741
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
99648
99742
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
99649
|
-
return ""
|
|
99743
|
+
return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine).concat(suffix);
|
|
99650
99744
|
}
|
|
99651
99745
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
99652
99746
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -99669,7 +99763,7 @@ var ts;
|
|
|
99669
99763
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
99670
99764
|
: "";
|
|
99671
99765
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
99672
|
-
tabularData += ""
|
|
99766
|
+
tabularData += "".concat(leftPadding).concat(errorCount, " ").concat(fileRef, "\n");
|
|
99673
99767
|
});
|
|
99674
99768
|
return tabularData;
|
|
99675
99769
|
}
|
|
@@ -99696,9 +99790,9 @@ var ts;
|
|
|
99696
99790
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
99697
99791
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
99698
99792
|
var file = _c[_i];
|
|
99699
|
-
write(""
|
|
99700
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
99701
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
99793
|
+
write("".concat(toFileName(file, relativeFileName)));
|
|
99794
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
|
|
99795
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" ".concat(d.messageText)); });
|
|
99702
99796
|
}
|
|
99703
99797
|
}
|
|
99704
99798
|
ts.explainFiles = explainFiles;
|
|
@@ -99736,7 +99830,7 @@ var ts;
|
|
|
99736
99830
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json"))
|
|
99737
99831
|
return false;
|
|
99738
99832
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
99739
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
99833
|
+
return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
|
|
99740
99834
|
});
|
|
99741
99835
|
}
|
|
99742
99836
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -99745,7 +99839,7 @@ var ts;
|
|
|
99745
99839
|
var options = program.getCompilerOptions();
|
|
99746
99840
|
if (ts.isReferencedFile(reason)) {
|
|
99747
99841
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
99748
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
99842
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
|
|
99749
99843
|
var message = void 0;
|
|
99750
99844
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
99751
99845
|
switch (reason.kind) {
|
|
@@ -99856,7 +99950,7 @@ var ts;
|
|
|
99856
99950
|
var currentDir_1 = program.getCurrentDirectory();
|
|
99857
99951
|
ts.forEach(emittedFiles, function (file) {
|
|
99858
99952
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
99859
|
-
write("TSFILE: "
|
|
99953
|
+
write("TSFILE: ".concat(filepath));
|
|
99860
99954
|
});
|
|
99861
99955
|
listFiles(program, write);
|
|
99862
99956
|
}
|
|
@@ -100163,7 +100257,7 @@ var ts;
|
|
|
100163
100257
|
}
|
|
100164
100258
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
100165
100259
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
100166
|
-
writeLog("Current directory: "
|
|
100260
|
+
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
100167
100261
|
var configFileWatcher;
|
|
100168
100262
|
if (configFileName) {
|
|
100169
100263
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -100310,10 +100404,10 @@ var ts;
|
|
|
100310
100404
|
}
|
|
100311
100405
|
function createNewProgram(hasInvalidatedResolution) {
|
|
100312
100406
|
writeLog("CreatingProgramWith::");
|
|
100313
|
-
writeLog(" roots: "
|
|
100314
|
-
writeLog(" options: "
|
|
100407
|
+
writeLog(" roots: ".concat(JSON.stringify(rootFileNames)));
|
|
100408
|
+
writeLog(" options: ".concat(JSON.stringify(compilerOptions)));
|
|
100315
100409
|
if (projectReferences)
|
|
100316
|
-
writeLog(" projectReferences: "
|
|
100410
|
+
writeLog(" projectReferences: ".concat(JSON.stringify(projectReferences)));
|
|
100317
100411
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
100318
100412
|
hasChangedCompilerOptions = false;
|
|
100319
100413
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -100455,7 +100549,7 @@ var ts;
|
|
|
100455
100549
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
100456
100550
|
}
|
|
100457
100551
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
100458
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
100552
|
+
writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
|
|
100459
100553
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
100460
100554
|
}
|
|
100461
100555
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -100511,7 +100605,7 @@ var ts;
|
|
|
100511
100605
|
synchronizeProgram();
|
|
100512
100606
|
}
|
|
100513
100607
|
function reloadConfigFile() {
|
|
100514
|
-
writeLog("Reloading config file: "
|
|
100608
|
+
writeLog("Reloading config file: ".concat(configFileName));
|
|
100515
100609
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
100516
100610
|
if (cachedDirectoryStructureHost) {
|
|
100517
100611
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -100549,7 +100643,7 @@ var ts;
|
|
|
100549
100643
|
return config.parsedCommandLine;
|
|
100550
100644
|
}
|
|
100551
100645
|
}
|
|
100552
|
-
writeLog("Loading config file: "
|
|
100646
|
+
writeLog("Loading config file: ".concat(configFileName));
|
|
100553
100647
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
100554
100648
|
host.getParsedCommandLine(configFileName) :
|
|
100555
100649
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -100802,8 +100896,8 @@ var ts;
|
|
|
100802
100896
|
ts.getBuildOrderFromAnyBuildOrder = getBuildOrderFromAnyBuildOrder;
|
|
100803
100897
|
function createBuilderStatusReporter(system, pretty) {
|
|
100804
100898
|
return function (diagnostic) {
|
|
100805
|
-
var output = pretty ? "["
|
|
100806
|
-
output += ""
|
|
100899
|
+
var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
|
|
100900
|
+
output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
|
|
100807
100901
|
system.write(output);
|
|
100808
100902
|
};
|
|
100809
100903
|
}
|
|
@@ -101546,7 +101640,7 @@ var ts;
|
|
|
101546
101640
|
function listEmittedFile(_a, proj, file) {
|
|
101547
101641
|
var write = _a.write;
|
|
101548
101642
|
if (write && proj.options.listEmittedFiles) {
|
|
101549
|
-
write("TSFILE: "
|
|
101643
|
+
write("TSFILE: ".concat(file));
|
|
101550
101644
|
}
|
|
101551
101645
|
}
|
|
101552
101646
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -101575,7 +101669,7 @@ var ts;
|
|
|
101575
101669
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
101576
101670
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
101577
101671
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
101578
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType
|
|
101672
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
|
|
101579
101673
|
if (canEmitBuildInfo)
|
|
101580
101674
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
101581
101675
|
afterProgramDone(state, program, config);
|
|
@@ -101601,7 +101695,7 @@ var ts;
|
|
|
101601
101695
|
if (!host.fileExists(inputFile)) {
|
|
101602
101696
|
return {
|
|
101603
101697
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
101604
|
-
reason: inputFile
|
|
101698
|
+
reason: "".concat(inputFile, " does not exist")
|
|
101605
101699
|
};
|
|
101606
101700
|
}
|
|
101607
101701
|
if (!force) {
|
|
@@ -101926,7 +102020,7 @@ var ts;
|
|
|
101926
102020
|
}
|
|
101927
102021
|
}
|
|
101928
102022
|
if (filesToDelete) {
|
|
101929
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
102023
|
+
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(""));
|
|
101930
102024
|
}
|
|
101931
102025
|
return ts.ExitStatus.Success;
|
|
101932
102026
|
}
|
|
@@ -102276,7 +102370,7 @@ var ts;
|
|
|
102276
102370
|
};
|
|
102277
102371
|
}
|
|
102278
102372
|
function bold(str) {
|
|
102279
|
-
return "\u001B[1m"
|
|
102373
|
+
return "\u001B[1m".concat(str, "\u001B[22m");
|
|
102280
102374
|
}
|
|
102281
102375
|
var isWindows = sys.getEnvironmentVariable("OS") && ts.stringContains(sys.getEnvironmentVariable("OS").toLowerCase(), "windows");
|
|
102282
102376
|
var isWindowsTerminal = sys.getEnvironmentVariable("WT_SESSION");
|
|
@@ -102285,19 +102379,19 @@ var ts;
|
|
|
102285
102379
|
if (isWindows && !isWindowsTerminal && !isVSCode) {
|
|
102286
102380
|
return brightWhite(str);
|
|
102287
102381
|
}
|
|
102288
|
-
return "\u001B[94m"
|
|
102382
|
+
return "\u001B[94m".concat(str, "\u001B[39m");
|
|
102289
102383
|
}
|
|
102290
102384
|
var supportsRicherColors = sys.getEnvironmentVariable("COLORTERM") === "truecolor" || sys.getEnvironmentVariable("TERM") === "xterm-256color";
|
|
102291
102385
|
function blueBackground(str) {
|
|
102292
102386
|
if (supportsRicherColors) {
|
|
102293
|
-
return "\u001B[48;5;68m"
|
|
102387
|
+
return "\u001B[48;5;68m".concat(str, "\u001B[39;49m");
|
|
102294
102388
|
}
|
|
102295
102389
|
else {
|
|
102296
|
-
return "\u001B[44m"
|
|
102390
|
+
return "\u001B[44m".concat(str, "\u001B[39;49m");
|
|
102297
102391
|
}
|
|
102298
102392
|
}
|
|
102299
102393
|
function brightWhite(str) {
|
|
102300
|
-
return "\u001B[97m"
|
|
102394
|
+
return "\u001B[97m".concat(str, "\u001B[39m");
|
|
102301
102395
|
}
|
|
102302
102396
|
return {
|
|
102303
102397
|
bold: bold,
|
|
@@ -102307,7 +102401,7 @@ var ts;
|
|
|
102307
102401
|
};
|
|
102308
102402
|
}
|
|
102309
102403
|
function getDisplayNameTextOfOption(option) {
|
|
102310
|
-
return "--"
|
|
102404
|
+
return "--".concat(option.name).concat(option.shortName ? ", -".concat(option.shortName) : "");
|
|
102311
102405
|
}
|
|
102312
102406
|
function generateOptionOutput(sys, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
102313
102407
|
var _a, _b;
|
|
@@ -102344,13 +102438,13 @@ var ts;
|
|
|
102344
102438
|
text.push(sys.newLine);
|
|
102345
102439
|
if (showAdditionalInfoOutput(valueCandidates, option)) {
|
|
102346
102440
|
if (valueCandidates) {
|
|
102347
|
-
text.push(valueCandidates.valueType
|
|
102441
|
+
text.push("".concat(valueCandidates.valueType, " ").concat(valueCandidates.possibleValues));
|
|
102348
102442
|
}
|
|
102349
102443
|
if (defaultValueDescription) {
|
|
102350
102444
|
if (valueCandidates)
|
|
102351
102445
|
text.push(sys.newLine);
|
|
102352
102446
|
var diagType = ts.getDiagnosticText(ts.Diagnostics.default_Colon);
|
|
102353
|
-
text.push(diagType
|
|
102447
|
+
text.push("".concat(diagType, " ").concat(defaultValueDescription));
|
|
102354
102448
|
}
|
|
102355
102449
|
text.push(sys.newLine);
|
|
102356
102450
|
}
|
|
@@ -102399,7 +102493,7 @@ var ts;
|
|
|
102399
102493
|
}
|
|
102400
102494
|
var curRight = remainRight.substr(0, rightCharacterNumber);
|
|
102401
102495
|
remainRight = remainRight.slice(rightCharacterNumber);
|
|
102402
|
-
res.push(""
|
|
102496
|
+
res.push("".concat(curLeft).concat(curRight));
|
|
102403
102497
|
isFirstLine = false;
|
|
102404
102498
|
}
|
|
102405
102499
|
return res;
|
|
@@ -102500,7 +102594,7 @@ var ts;
|
|
|
102500
102594
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
102501
102595
|
}
|
|
102502
102596
|
categoryMap.forEach(function (value, key) {
|
|
102503
|
-
res.push("### "
|
|
102597
|
+
res.push("### ".concat(key).concat(sys.newLine).concat(sys.newLine));
|
|
102504
102598
|
res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, value), true);
|
|
102505
102599
|
});
|
|
102506
102600
|
if (afterOptionsDescription) {
|
|
@@ -102510,7 +102604,7 @@ var ts;
|
|
|
102510
102604
|
}
|
|
102511
102605
|
function printEasyHelp(sys, simpleOptions) {
|
|
102512
102606
|
var colors = createColors(sys);
|
|
102513
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
102607
|
+
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);
|
|
102514
102608
|
output.push(colors.bold(ts.getDiagnosticText(ts.Diagnostics.COMMON_COMMANDS)) + sys.newLine + sys.newLine);
|
|
102515
102609
|
example("tsc", ts.Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
102516
102610
|
example("tsc app.ts util.ts", ts.Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -102536,7 +102630,7 @@ var ts;
|
|
|
102536
102630
|
}
|
|
102537
102631
|
}
|
|
102538
102632
|
function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
|
|
102539
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
102633
|
+
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);
|
|
102540
102634
|
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/tsconfig-reference")), true);
|
|
102541
102635
|
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);
|
|
102542
102636
|
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);
|
|
@@ -102546,7 +102640,7 @@ var ts;
|
|
|
102546
102640
|
}
|
|
102547
102641
|
}
|
|
102548
102642
|
function printBuildHelp(sys, buildOptions) {
|
|
102549
|
-
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler)
|
|
102643
|
+
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);
|
|
102550
102644
|
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);
|
|
102551
102645
|
for (var _i = 0, output_3 = output; _i < output_3.length; _i++) {
|
|
102552
102646
|
var line = output_3[_i];
|
|
@@ -102927,7 +103021,7 @@ var ts;
|
|
|
102927
103021
|
reportCountStatistic("Subtype cache size", caches.subtype);
|
|
102928
103022
|
reportCountStatistic("Strict subtype cache size", caches.strictSubtype);
|
|
102929
103023
|
if (isPerformanceEnabled) {
|
|
102930
|
-
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(name
|
|
103024
|
+
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic("".concat(name, " time"), duration); });
|
|
102931
103025
|
}
|
|
102932
103026
|
}
|
|
102933
103027
|
else if (isPerformanceEnabled) {
|
|
@@ -102998,7 +103092,7 @@ var ts;
|
|
|
102998
103092
|
// This file actually uses arguments passed on commandline and executes it
|
|
102999
103093
|
ts.Debug.loggingHost = {
|
|
103000
103094
|
log: function (_level, s) {
|
|
103001
|
-
ts.sys.write(""
|
|
103095
|
+
ts.sys.write("".concat(s || "").concat(ts.sys.newLine));
|
|
103002
103096
|
}
|
|
103003
103097
|
};
|
|
103004
103098
|
if (ts.Debug.isDebugging) {
|