typescript 4.6.1-rc → 4.7.0-dev.20220215
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 +9 -3
- package/lib/de/diagnosticMessages.generated.json +9 -3
- package/lib/es/diagnosticMessages.generated.json +9 -3
- package/lib/fr/diagnosticMessages.generated.json +9 -3
- package/lib/it/diagnosticMessages.generated.json +9 -3
- package/lib/ja/diagnosticMessages.generated.json +9 -3
- package/lib/ko/diagnosticMessages.generated.json +9 -3
- package/lib/pl/diagnosticMessages.generated.json +9 -3
- package/lib/pt-br/diagnosticMessages.generated.json +9 -3
- package/lib/ru/diagnosticMessages.generated.json +9 -3
- package/lib/tr/diagnosticMessages.generated.json +9 -3
- package/lib/tsc.js +306 -284
- package/lib/tsserver.js +694 -581
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +669 -556
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +574 -461
- package/lib/typescriptServices.d.ts +1 -1
- package/lib/typescriptServices.js +574 -461
- package/lib/typingsInstaller.js +385 -339
- package/lib/zh-cn/diagnosticMessages.generated.json +9 -3
- package/lib/zh-tw/diagnosticMessages.generated.json +9 -3
- 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 ||
|
|
25
|
+
return to.concat(ar || from);
|
|
26
26
|
};
|
|
27
27
|
var __assign = (this && this.__assign) || function () {
|
|
28
28
|
__assign = Object.assign || function(t) {
|
|
@@ -68,8 +68,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
68
68
|
};
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
|
-
ts.versionMajorMinor = "4.
|
|
72
|
-
ts.version =
|
|
71
|
+
ts.versionMajorMinor = "4.7";
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220215";
|
|
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 " + 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 " + value + " did not pass the test '" + 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 =
|
|
1346
|
+
var key = typeof arg + ":" + 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
|
|
1681
|
+
return prefix + "*" + 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. " + 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(
|
|
1958
|
+
return fail((message || "Unexpected node.") + "\r\nNode " + 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: " + 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 ?
|
|
1974
|
-
fail("Expected "
|
|
1973
|
+
var message = msg ? msg2 ? msg + " " + msg2 : msg : "";
|
|
1974
|
+
fail("Expected " + a + " === " + b + ". " + 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 " + a + " < " + b + ". " + (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 " + a + " <= " + 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 " + a + " >= " + 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(
|
|
2022
|
+
return fail(message + " " + 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 '" + 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 " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " did not pass test '" + 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 " + formatSyntaxKind(node.kind) + " should not have passed test '" + 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 " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " did not pass test '" + 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 " + formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind) + " was not a '" + 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 " + 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: " + ts.unescapeLeadingUnderscores(symbol.escapedName) + "; flags: " + formatSymbolFlags(symbol.flags) + "; declarations: " + 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 = "" + result + (result ? "|" : "") + 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 "" + flowHeader + (remainingFlags ? " (" + 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 " + 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
|
|
2281
|
+
return symbolHeader + " '" + ts.symbolName(this) + "'" + (remainingSymbolFlags ? " (" + 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 " + JSON.stringify(this.value) :
|
|
2291
|
+
this.flags & 2048 ? "LiteralType " + (this.value.negative ? "-" : "") + 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 " + 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 "" + typeHeader + (this.symbol ? " '" + ts.symbolName(this.symbol) + "'" : "") + (remainingObjectFlags ? " (" + 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 '" + ts.idText(this) + "'" :
|
|
2348
|
+
ts.isPrivateIdentifier(this) ? "PrivateIdentifier '" + ts.idText(this) + "'" :
|
|
2349
|
+
ts.isStringLiteral(this) ? "StringLiteral " + JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...") :
|
|
2350
|
+
ts.isNumericLiteral(this) ? "NumericLiteral " + this.text :
|
|
2351
|
+
ts.isBigIntLiteral(this) ? "BigIntLiteral " + 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 "" + nodeHeader + (this.flags ? " (" + 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 += "'" + name + "' ";
|
|
2428
|
+
deprecationMessage += since ? "has been deprecated since v" + since : "is deprecated";
|
|
2429
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v" + errorAfter + "." : ".";
|
|
2430
|
+
deprecationMessage += message ? " " + 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 =
|
|
2527
|
+
var result = this.major + "." + this.minor + "." + this.patch;
|
|
2528
2528
|
if (ts.some(this.prerelease))
|
|
2529
|
-
result += "-"
|
|
2529
|
+
result += "-" + this.prerelease.join(".");
|
|
2530
2530
|
if (ts.some(this.build))
|
|
2531
|
-
result += "+"
|
|
2531
|
+
result += "+" + 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 "" + comparator.operator + 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: " + (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" ? "." + process.pid + "-" + ++traceCount
|
|
2994
|
+
: mode === "server" ? "." + 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" + countPart + ".json");
|
|
2997
|
+
var typesPath = ts.combinePaths(traceDir, "types" + 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\":" + (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\":\"" + eventType + "\",\"cat\":\"" + phase + "\",\"ts\":" + time + ",\"name\":\"" + name + "\"");
|
|
3074
3074
|
if (extras)
|
|
3075
|
-
fs.writeSync(traceFd, ","
|
|
3075
|
+
fs.writeSync(traceFd, "," + extras);
|
|
3076
3076
|
if (args)
|
|
3077
|
-
fs.writeSync(traceFd, ",\"args\":"
|
|
3077
|
+
fs.writeSync(traceFd, ",\"args\":" + 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(
|
|
3397
|
+
return system.getEnvironmentVariable(envVar + "_" + 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:: " + 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:: " + (ts.timestamp() - start) + "ms:: " + 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:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + 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://" + (ts.getRootLength(normalizedDir) === 1 ? "" : "/") + 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" + 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,
|
|
4265
|
+
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + 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:: " + fileOrDirectory + ":: Changing watcher to " + (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:: " + 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:: " + fileOrDirectory + ":: Changing to fsWatchFile");
|
|
4380
4380
|
return watchPresentFileSystemEntryWithFsWatchFile();
|
|
4381
4381
|
}
|
|
4382
4382
|
}
|
|
@@ -4885,18 +4885,6 @@ var ts;
|
|
|
4885
4885
|
return getCanonicalFileName(nonCanonicalizedPath);
|
|
4886
4886
|
}
|
|
4887
4887
|
ts.toPath = toPath;
|
|
4888
|
-
function normalizePathAndParts(path) {
|
|
4889
|
-
path = normalizeSlashes(path);
|
|
4890
|
-
var _a = reducePathComponents(getPathComponents(path)), root = _a[0], parts = _a.slice(1);
|
|
4891
|
-
if (parts.length) {
|
|
4892
|
-
var joinedParts = root + parts.join(ts.directorySeparator);
|
|
4893
|
-
return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts: parts };
|
|
4894
|
-
}
|
|
4895
|
-
else {
|
|
4896
|
-
return { path: root, parts: parts };
|
|
4897
|
-
}
|
|
4898
|
-
}
|
|
4899
|
-
ts.normalizePathAndParts = normalizePathAndParts;
|
|
4900
4888
|
function removeTrailingDirectorySeparator(path) {
|
|
4901
4889
|
if (hasTrailingDirectorySeparator(path)) {
|
|
4902
4890
|
return path.substr(0, path.length - 1);
|
|
@@ -7082,7 +7070,7 @@ var ts;
|
|
|
7082
7070
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
7083
7071
|
}
|
|
7084
7072
|
else {
|
|
7085
|
-
ts.Debug.fail("Bad line number. Line: "
|
|
7073
|
+
ts.Debug.fail("Bad line number. Line: " + line + ", lineStarts.length: " + lineStarts.length + " , line map is correct? " + (debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
|
|
7086
7074
|
}
|
|
7087
7075
|
}
|
|
7088
7076
|
var res = lineStarts[line] + character;
|
|
@@ -9597,7 +9585,7 @@ var ts;
|
|
|
9597
9585
|
: "linkplain";
|
|
9598
9586
|
var name = link.name ? ts.entityNameToString(link.name) : "";
|
|
9599
9587
|
var space = link.name && link.text.startsWith("://") ? "" : " ";
|
|
9600
|
-
return "{@"
|
|
9588
|
+
return "{@" + kind + " " + name + space + link.text + "}";
|
|
9601
9589
|
}
|
|
9602
9590
|
function getEffectiveTypeParameterDeclarations(node) {
|
|
9603
9591
|
if (ts.isJSDocSignature(node)) {
|
|
@@ -10691,11 +10679,11 @@ var ts;
|
|
|
10691
10679
|
}
|
|
10692
10680
|
function packageIdToPackageName(_a) {
|
|
10693
10681
|
var name = _a.name, subModuleName = _a.subModuleName;
|
|
10694
|
-
return subModuleName ?
|
|
10682
|
+
return subModuleName ? name + "/" + subModuleName : name;
|
|
10695
10683
|
}
|
|
10696
10684
|
ts.packageIdToPackageName = packageIdToPackageName;
|
|
10697
10685
|
function packageIdToString(packageId) {
|
|
10698
|
-
return
|
|
10686
|
+
return packageIdToPackageName(packageId) + "@" + packageId.version;
|
|
10699
10687
|
}
|
|
10700
10688
|
ts.packageIdToString = packageIdToString;
|
|
10701
10689
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
@@ -10769,7 +10757,7 @@ var ts;
|
|
|
10769
10757
|
function nodePosToString(node) {
|
|
10770
10758
|
var file = getSourceFileOfNode(node);
|
|
10771
10759
|
var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
|
|
10772
|
-
return
|
|
10760
|
+
return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")";
|
|
10773
10761
|
}
|
|
10774
10762
|
ts.nodePosToString = nodePosToString;
|
|
10775
10763
|
function getEndLinePosition(line, sourceFile) {
|
|
@@ -10870,7 +10858,7 @@ var ts;
|
|
|
10870
10858
|
ts.isPinnedComment = isPinnedComment;
|
|
10871
10859
|
function createCommentDirectivesMap(sourceFile, commentDirectives) {
|
|
10872
10860
|
var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
|
|
10873
|
-
""
|
|
10861
|
+
"" + ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line,
|
|
10874
10862
|
commentDirective,
|
|
10875
10863
|
]); }));
|
|
10876
10864
|
var usedLines = new ts.Map();
|
|
@@ -10887,10 +10875,10 @@ var ts;
|
|
|
10887
10875
|
});
|
|
10888
10876
|
}
|
|
10889
10877
|
function markUsed(line) {
|
|
10890
|
-
if (!directivesByLine.has(""
|
|
10878
|
+
if (!directivesByLine.has("" + line)) {
|
|
10891
10879
|
return false;
|
|
10892
10880
|
}
|
|
10893
|
-
usedLines.set(""
|
|
10881
|
+
usedLines.set("" + line, true);
|
|
10894
10882
|
return true;
|
|
10895
10883
|
}
|
|
10896
10884
|
}
|
|
@@ -11089,7 +11077,7 @@ var ts;
|
|
|
11089
11077
|
}
|
|
11090
11078
|
return node.text;
|
|
11091
11079
|
}
|
|
11092
|
-
return ts.Debug.fail("Literal kind '"
|
|
11080
|
+
return ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
|
|
11093
11081
|
}
|
|
11094
11082
|
ts.getLiteralText = getLiteralText;
|
|
11095
11083
|
function canUseOriginalText(node, flags) {
|
|
@@ -13424,11 +13412,11 @@ var ts;
|
|
|
13424
13412
|
}
|
|
13425
13413
|
ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
|
|
13426
13414
|
function getPropertyNameForUniqueESSymbol(symbol) {
|
|
13427
|
-
return "__@"
|
|
13415
|
+
return "__@" + ts.getSymbolId(symbol) + "@" + symbol.escapedName;
|
|
13428
13416
|
}
|
|
13429
13417
|
ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
|
|
13430
13418
|
function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
|
|
13431
|
-
return "__#"
|
|
13419
|
+
return "__#" + ts.getSymbolId(containingClassSymbol) + "@" + description;
|
|
13432
13420
|
}
|
|
13433
13421
|
ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
|
|
13434
13422
|
function isKnownSymbol(symbol) {
|
|
@@ -15725,7 +15713,7 @@ var ts;
|
|
|
15725
15713
|
}
|
|
15726
15714
|
ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
|
|
15727
15715
|
function getJSXRuntimeImport(base, options) {
|
|
15728
|
-
return base ?
|
|
15716
|
+
return base ? base + "/" + (options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
|
|
15729
15717
|
}
|
|
15730
15718
|
ts.getJSXRuntimeImport = getJSXRuntimeImport;
|
|
15731
15719
|
function hasZeroOrOneAsteriskCharacter(str) {
|
|
@@ -15823,15 +15811,15 @@ var ts;
|
|
|
15823
15811
|
}
|
|
15824
15812
|
var wildcardCharCodes = [42, 63];
|
|
15825
15813
|
ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
15826
|
-
var implicitExcludePathRegexPattern = "(?!("
|
|
15814
|
+
var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))";
|
|
15827
15815
|
var filesMatcher = {
|
|
15828
15816
|
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
|
|
15829
|
-
doubleAsteriskRegexFragment: "(/"
|
|
15817
|
+
doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
|
|
15830
15818
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
|
|
15831
15819
|
};
|
|
15832
15820
|
var directoriesMatcher = {
|
|
15833
15821
|
singleAsteriskRegexFragment: "[^/]*",
|
|
15834
|
-
doubleAsteriskRegexFragment: "(/"
|
|
15822
|
+
doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
|
|
15835
15823
|
replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
|
|
15836
15824
|
};
|
|
15837
15825
|
var excludeMatcher = {
|
|
@@ -15849,9 +15837,9 @@ var ts;
|
|
|
15849
15837
|
if (!patterns || !patterns.length) {
|
|
15850
15838
|
return undefined;
|
|
15851
15839
|
}
|
|
15852
|
-
var pattern = patterns.map(function (pattern) { return "("
|
|
15840
|
+
var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
|
|
15853
15841
|
var terminator = usage === "exclude" ? "($|/)" : "$";
|
|
15854
|
-
return "^("
|
|
15842
|
+
return "^(" + pattern + ")" + terminator;
|
|
15855
15843
|
}
|
|
15856
15844
|
ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
|
|
15857
15845
|
function getRegularExpressionsForWildcards(specs, basePath, usage) {
|
|
@@ -15869,7 +15857,7 @@ var ts;
|
|
|
15869
15857
|
ts.isImplicitGlob = isImplicitGlob;
|
|
15870
15858
|
function getPatternFromSpec(spec, basePath, usage) {
|
|
15871
15859
|
var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
|
|
15872
|
-
return pattern && "^("
|
|
15860
|
+
return pattern && "^(" + pattern + ")" + (usage === "exclude" ? "($|/)" : "$");
|
|
15873
15861
|
}
|
|
15874
15862
|
ts.getPatternFromSpec = getPatternFromSpec;
|
|
15875
15863
|
function getSubPatternFromSpec(spec, basePath, usage, _a) {
|
|
@@ -15935,7 +15923,7 @@ var ts;
|
|
|
15935
15923
|
currentDirectory = ts.normalizePath(currentDirectory);
|
|
15936
15924
|
var absolutePath = ts.combinePaths(currentDirectory, path);
|
|
15937
15925
|
return {
|
|
15938
|
-
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^"
|
|
15926
|
+
includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
|
|
15939
15927
|
includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
|
|
15940
15928
|
includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
|
|
15941
15929
|
excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
|
|
@@ -16180,7 +16168,7 @@ var ts;
|
|
|
16180
16168
|
ts.resolutionExtensionIsTSOrJson = resolutionExtensionIsTSOrJson;
|
|
16181
16169
|
function extensionFromPath(path) {
|
|
16182
16170
|
var ext = tryGetExtensionFromPath(path);
|
|
16183
|
-
return ext !== undefined ? ext : ts.Debug.fail("File "
|
|
16171
|
+
return ext !== undefined ? ext : ts.Debug.fail("File " + path + " has unknown extension.");
|
|
16184
16172
|
}
|
|
16185
16173
|
ts.extensionFromPath = extensionFromPath;
|
|
16186
16174
|
function isAnySupportedFileExtension(path) {
|
|
@@ -21251,7 +21239,7 @@ var ts;
|
|
|
21251
21239
|
case 326: return "augments";
|
|
21252
21240
|
case 327: return "implements";
|
|
21253
21241
|
default:
|
|
21254
|
-
return ts.Debug.fail("Unsupported kind: "
|
|
21242
|
+
return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
|
|
21255
21243
|
}
|
|
21256
21244
|
}
|
|
21257
21245
|
var rawTextScanner;
|
|
@@ -21570,7 +21558,7 @@ var ts;
|
|
|
21570
21558
|
};
|
|
21571
21559
|
var definedTextGetter_1 = function (path) {
|
|
21572
21560
|
var result = textGetter_1(path);
|
|
21573
|
-
return result !== undefined ? result : "/* Input file "
|
|
21561
|
+
return result !== undefined ? result : "/* Input file " + path + " was missing */\r\n";
|
|
21574
21562
|
};
|
|
21575
21563
|
var buildInfo_1;
|
|
21576
21564
|
var getAndCacheBuildInfo_1 = function (getText) {
|
|
@@ -25232,7 +25220,7 @@ var ts;
|
|
|
25232
25220
|
for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
|
|
25233
25221
|
var keyword = viableKeywordSuggestions_1[_i];
|
|
25234
25222
|
if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
|
|
25235
|
-
return
|
|
25223
|
+
return keyword + " " + expressionText.slice(keyword.length);
|
|
25236
25224
|
}
|
|
25237
25225
|
}
|
|
25238
25226
|
return undefined;
|
|
@@ -30741,7 +30729,7 @@ var ts;
|
|
|
30741
30729
|
if (namedArgRegExCache.has(name)) {
|
|
30742
30730
|
return namedArgRegExCache.get(name);
|
|
30743
30731
|
}
|
|
30744
|
-
var result = new RegExp("(\\s"
|
|
30732
|
+
var result = new RegExp("(\\s" + name + "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))", "im");
|
|
30745
30733
|
namedArgRegExCache.set(name, result);
|
|
30746
30734
|
return result;
|
|
30747
30735
|
}
|
|
@@ -32151,8 +32139,8 @@ var ts;
|
|
|
32151
32139
|
}
|
|
32152
32140
|
ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
|
|
32153
32141
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
32154
|
-
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'"
|
|
32155
|
-
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--"
|
|
32142
|
+
var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
|
|
32143
|
+
return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
|
|
32156
32144
|
}
|
|
32157
32145
|
function parseCustomTypeOption(opt, value, errors) {
|
|
32158
32146
|
return convertJsonOptionOfCustomType(opt, ts.trimString(value || ""), errors);
|
|
@@ -32869,10 +32857,10 @@ var ts;
|
|
|
32869
32857
|
var newValue = compilerOptionsMap.get(cmd.name);
|
|
32870
32858
|
var defaultValue = getDefaultValueForOption(cmd);
|
|
32871
32859
|
if (newValue !== defaultValue) {
|
|
32872
|
-
result.push(""
|
|
32860
|
+
result.push("" + tab + cmd.name + ": " + newValue);
|
|
32873
32861
|
}
|
|
32874
32862
|
else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
|
|
32875
|
-
result.push(""
|
|
32863
|
+
result.push("" + tab + cmd.name + ": " + defaultValue);
|
|
32876
32864
|
}
|
|
32877
32865
|
});
|
|
32878
32866
|
return result.join(newLine) + newLine;
|
|
@@ -32910,19 +32898,19 @@ var ts;
|
|
|
32910
32898
|
if (entries.length !== 0) {
|
|
32911
32899
|
entries.push({ value: "" });
|
|
32912
32900
|
}
|
|
32913
|
-
entries.push({ value: "/* "
|
|
32901
|
+
entries.push({ value: "/* " + category + " */" });
|
|
32914
32902
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
32915
32903
|
var option = options_1[_i];
|
|
32916
32904
|
var optionName = void 0;
|
|
32917
32905
|
if (compilerOptionsMap.has(option.name)) {
|
|
32918
|
-
optionName = "\""
|
|
32906
|
+
optionName = "\"" + option.name + "\": " + JSON.stringify(compilerOptionsMap.get(option.name)) + ((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
|
|
32919
32907
|
}
|
|
32920
32908
|
else {
|
|
32921
|
-
optionName = "// \""
|
|
32909
|
+
optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
|
|
32922
32910
|
}
|
|
32923
32911
|
entries.push({
|
|
32924
32912
|
value: optionName,
|
|
32925
|
-
description: "/* "
|
|
32913
|
+
description: "/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */"
|
|
32926
32914
|
});
|
|
32927
32915
|
marginLength = Math.max(optionName.length, marginLength);
|
|
32928
32916
|
}
|
|
@@ -32930,24 +32918,24 @@ var ts;
|
|
|
32930
32918
|
var tab = makePadding(2);
|
|
32931
32919
|
var result = [];
|
|
32932
32920
|
result.push("{");
|
|
32933
|
-
result.push(
|
|
32934
|
-
result.push(""
|
|
32921
|
+
result.push(tab + "\"compilerOptions\": {");
|
|
32922
|
+
result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
|
|
32935
32923
|
result.push("");
|
|
32936
32924
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
32937
32925
|
var entry = entries_2[_a];
|
|
32938
32926
|
var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
|
|
32939
|
-
result.push(value && ""
|
|
32927
|
+
result.push(value && "" + tab + tab + value + (description && (makePadding(marginLength - value.length + 2) + description)));
|
|
32940
32928
|
}
|
|
32941
32929
|
if (fileNames.length) {
|
|
32942
|
-
result.push(
|
|
32943
|
-
result.push(
|
|
32930
|
+
result.push(tab + "},");
|
|
32931
|
+
result.push(tab + "\"files\": [");
|
|
32944
32932
|
for (var i = 0; i < fileNames.length; i++) {
|
|
32945
|
-
result.push(""
|
|
32933
|
+
result.push("" + tab + tab + JSON.stringify(fileNames[i]) + (i === fileNames.length - 1 ? "" : ","));
|
|
32946
32934
|
}
|
|
32947
|
-
result.push(
|
|
32935
|
+
result.push(tab + "]");
|
|
32948
32936
|
}
|
|
32949
32937
|
else {
|
|
32950
|
-
result.push(
|
|
32938
|
+
result.push(tab + "}");
|
|
32951
32939
|
}
|
|
32952
32940
|
result.push("}");
|
|
32953
32941
|
return result.join(newLine) + newLine;
|
|
@@ -33297,7 +33285,7 @@ var ts;
|
|
|
33297
33285
|
if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
|
|
33298
33286
|
var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
|
|
33299
33287
|
if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
|
|
33300
|
-
extendedConfigPath =
|
|
33288
|
+
extendedConfigPath = extendedConfigPath + ".json";
|
|
33301
33289
|
if (!host.fileExists(extendedConfigPath)) {
|
|
33302
33290
|
errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
|
|
33303
33291
|
return undefined;
|
|
@@ -33493,7 +33481,7 @@ var ts;
|
|
|
33493
33481
|
if (ts.fileExtensionIs(file, ".json")) {
|
|
33494
33482
|
if (!jsonOnlyIncludeRegexes) {
|
|
33495
33483
|
var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json"); });
|
|
33496
|
-
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^"
|
|
33484
|
+
var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^" + pattern + "$"; });
|
|
33497
33485
|
jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
|
|
33498
33486
|
}
|
|
33499
33487
|
var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
|
|
@@ -33865,7 +33853,7 @@ var ts;
|
|
|
33865
33853
|
var bestVersionKey = result.version, bestVersionPaths = result.paths;
|
|
33866
33854
|
if (typeof bestVersionPaths !== "object") {
|
|
33867
33855
|
if (state.traceEnabled) {
|
|
33868
|
-
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['"
|
|
33856
|
+
trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['" + bestVersionKey + "']", "object", typeof bestVersionPaths);
|
|
33869
33857
|
}
|
|
33870
33858
|
return;
|
|
33871
33859
|
}
|
|
@@ -34034,7 +34022,7 @@ var ts;
|
|
|
34034
34022
|
result_4 = searchResult && searchResult.value;
|
|
34035
34023
|
}
|
|
34036
34024
|
else {
|
|
34037
|
-
var candidate =
|
|
34025
|
+
var candidate = normalizePathForCJSResolution(initialLocationForSecondaryLookup, typeReferenceDirectiveName).path;
|
|
34038
34026
|
result_4 = nodeLoadModuleByRelativeName(Extensions.DtsOnly, candidate, false, moduleResolutionState, true);
|
|
34039
34027
|
}
|
|
34040
34028
|
return resolvedTypeScriptOnly(result_4);
|
|
@@ -34234,7 +34222,7 @@ var ts;
|
|
|
34234
34222
|
};
|
|
34235
34223
|
return cache;
|
|
34236
34224
|
function getUnderlyingCacheKey(specifier, mode) {
|
|
34237
|
-
var result = mode === undefined ? specifier :
|
|
34225
|
+
var result = mode === undefined ? specifier : mode + "|" + specifier;
|
|
34238
34226
|
memoizedReverseKeys.set(result, [specifier, mode]);
|
|
34239
34227
|
return result;
|
|
34240
34228
|
}
|
|
@@ -34264,7 +34252,7 @@ var ts;
|
|
|
34264
34252
|
}
|
|
34265
34253
|
function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
|
|
34266
34254
|
ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
|
|
34267
|
-
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName :
|
|
34255
|
+
return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : mode + "|" + nonRelativeModuleName, createPerModuleNameCache);
|
|
34268
34256
|
}
|
|
34269
34257
|
function createPerModuleNameCache() {
|
|
34270
34258
|
var directoryPathMap = new ts.Map();
|
|
@@ -34392,10 +34380,10 @@ var ts;
|
|
|
34392
34380
|
result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
|
|
34393
34381
|
break;
|
|
34394
34382
|
default:
|
|
34395
|
-
return ts.Debug.fail("Unexpected moduleResolution: "
|
|
34383
|
+
return ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
|
|
34396
34384
|
}
|
|
34397
34385
|
if (result && result.resolvedModule)
|
|
34398
|
-
ts.perfLogger.logInfoEvent("Module \""
|
|
34386
|
+
ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\"");
|
|
34399
34387
|
ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
|
|
34400
34388
|
if (perFolderCache) {
|
|
34401
34389
|
perFolderCache.set(moduleName, resolutionMode, result);
|
|
@@ -34525,7 +34513,7 @@ var ts;
|
|
|
34525
34513
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
34526
34514
|
var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
|
|
34527
34515
|
if (!resolvedModule) {
|
|
34528
|
-
throw new Error("Could not resolve JS module '"
|
|
34516
|
+
throw new Error("Could not resolve JS module '" + moduleName + "' starting at '" + initialDir + "'. Looked in: " + failedLookupLocations.join(", "));
|
|
34529
34517
|
}
|
|
34530
34518
|
return resolvedModule.resolvedFileName;
|
|
34531
34519
|
}
|
|
@@ -34610,12 +34598,19 @@ var ts;
|
|
|
34610
34598
|
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
|
34611
34599
|
}
|
|
34612
34600
|
else {
|
|
34613
|
-
var _a =
|
|
34601
|
+
var _a = normalizePathForCJSResolution(containingDirectory, moduleName), candidate = _a.path, parts = _a.parts;
|
|
34614
34602
|
var resolved_2 = nodeLoadModuleByRelativeName(extensions, candidate, false, state, true);
|
|
34615
34603
|
return resolved_2 && toSearchResult({ resolved: resolved_2, isExternalLibraryImport: ts.contains(parts, "node_modules") });
|
|
34616
34604
|
}
|
|
34617
34605
|
}
|
|
34618
34606
|
}
|
|
34607
|
+
function normalizePathForCJSResolution(containingDirectory, moduleName) {
|
|
34608
|
+
var combined = ts.combinePaths(containingDirectory, moduleName);
|
|
34609
|
+
var parts = ts.getPathComponents(combined);
|
|
34610
|
+
var lastPart = ts.lastOrUndefined(parts);
|
|
34611
|
+
var path = lastPart === "." || lastPart === ".." ? ts.ensureTrailingDirectorySeparator(ts.normalizePath(combined)) : ts.normalizePath(combined);
|
|
34612
|
+
return { path: path, parts: parts };
|
|
34613
|
+
}
|
|
34619
34614
|
function realPath(path, host, traceEnabled) {
|
|
34620
34615
|
if (!host.realpath) {
|
|
34621
34616
|
return path;
|
|
@@ -34624,7 +34619,7 @@ var ts;
|
|
|
34624
34619
|
if (traceEnabled) {
|
|
34625
34620
|
trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
34626
34621
|
}
|
|
34627
|
-
ts.Debug.assert(host.fileExists(real),
|
|
34622
|
+
ts.Debug.assert(host.fileExists(real), path + " linked to nonexistent file " + real);
|
|
34628
34623
|
return real;
|
|
34629
34624
|
}
|
|
34630
34625
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -34657,7 +34652,10 @@ var ts;
|
|
|
34657
34652
|
onlyRecordFailures = true;
|
|
34658
34653
|
}
|
|
34659
34654
|
}
|
|
34660
|
-
|
|
34655
|
+
if (!(state.features & NodeResolutionFeatures.EsmMode)) {
|
|
34656
|
+
return loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson);
|
|
34657
|
+
}
|
|
34658
|
+
return undefined;
|
|
34661
34659
|
}
|
|
34662
34660
|
ts.nodeModulesPathPart = "/node_modules/";
|
|
34663
34661
|
function pathContainsNodeModules(path) {
|
|
@@ -34985,7 +34983,13 @@ var ts;
|
|
|
34985
34983
|
}
|
|
34986
34984
|
}
|
|
34987
34985
|
var nextExtensions = extensions === Extensions.DtsOnly ? Extensions.TypeScript : extensions;
|
|
34988
|
-
|
|
34986
|
+
var features = state.features;
|
|
34987
|
+
if ((jsonContent === null || jsonContent === void 0 ? void 0 : jsonContent.type) !== "module") {
|
|
34988
|
+
state.features &= ~NodeResolutionFeatures.EsmMode;
|
|
34989
|
+
}
|
|
34990
|
+
var result = nodeLoadModuleByRelativeName(nextExtensions, candidate, onlyRecordFailures, state, false);
|
|
34991
|
+
state.features = features;
|
|
34992
|
+
return result;
|
|
34989
34993
|
};
|
|
34990
34994
|
var onlyRecordFailuresForPackageFile = packageFile ? !ts.directoryProbablyExists(ts.getDirectoryPath(packageFile), state.host) : undefined;
|
|
34991
34995
|
var onlyRecordFailuresForIndex = onlyRecordFailures || !ts.directoryProbablyExists(candidate, state.host);
|
|
@@ -35056,7 +35060,7 @@ var ts;
|
|
|
35056
35060
|
return undefined;
|
|
35057
35061
|
}
|
|
35058
35062
|
var trailingParts = parts.slice(nameParts.length);
|
|
35059
|
-
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "."
|
|
35063
|
+
return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : "." + ts.directorySeparator + trailingParts.join(ts.directorySeparator), state, cache, redirectedReference);
|
|
35060
35064
|
}
|
|
35061
35065
|
function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
|
|
35062
35066
|
if (!scope.packageJsonContent.exports) {
|
|
@@ -35314,6 +35318,12 @@ var ts;
|
|
|
35314
35318
|
}
|
|
35315
35319
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
35316
35320
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
|
|
35321
|
+
if (!pathAndExtension && packageInfo
|
|
35322
|
+
&& packageInfo.packageJsonContent.exports === undefined
|
|
35323
|
+
&& packageInfo.packageJsonContent.main === undefined
|
|
35324
|
+
&& state.features & NodeResolutionFeatures.EsmMode) {
|
|
35325
|
+
pathAndExtension = loadModuleFromFile(extensions, ts.combinePaths(candidate, "index.js"), onlyRecordFailures, state);
|
|
35326
|
+
}
|
|
35317
35327
|
return withPackageId(packageInfo, pathAndExtension);
|
|
35318
35328
|
};
|
|
35319
35329
|
if (rest !== "") {
|
|
@@ -35368,7 +35378,7 @@ var ts;
|
|
|
35368
35378
|
return mangled;
|
|
35369
35379
|
}
|
|
35370
35380
|
function getTypesPackageName(packageName) {
|
|
35371
|
-
return "@types/"
|
|
35381
|
+
return "@types/" + mangleScopedPackageName(packageName);
|
|
35372
35382
|
}
|
|
35373
35383
|
ts.getTypesPackageName = getTypesPackageName;
|
|
35374
35384
|
function mangleScopedPackageName(packageName) {
|
|
@@ -35694,7 +35704,7 @@ var ts;
|
|
|
35694
35704
|
if (name) {
|
|
35695
35705
|
if (ts.isAmbientModule(node)) {
|
|
35696
35706
|
var moduleName = ts.getTextOfIdentifierOrLiteral(name);
|
|
35697
|
-
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\""
|
|
35707
|
+
return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
|
|
35698
35708
|
}
|
|
35699
35709
|
if (name.kind === 161) {
|
|
35700
35710
|
var nameExpression = name.expression;
|
|
@@ -35743,7 +35753,7 @@ var ts;
|
|
|
35743
35753
|
case 315:
|
|
35744
35754
|
return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
|
|
35745
35755
|
case 163:
|
|
35746
|
-
ts.Debug.assert(node.parent.kind === 315, "Impossible parameter parent kind", function () { return "parent is: "
|
|
35756
|
+
ts.Debug.assert(node.parent.kind === 315, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
|
|
35747
35757
|
var functionType = node.parent;
|
|
35748
35758
|
var index = functionType.parameters.indexOf(node);
|
|
35749
35759
|
return "arg" + index;
|
|
@@ -35809,7 +35819,7 @@ var ts;
|
|
|
35809
35819
|
}
|
|
35810
35820
|
var relatedInformation_1 = [];
|
|
35811
35821
|
if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1) && symbol.flags & (2097152 | 788968 | 1920)) {
|
|
35812
|
-
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { "
|
|
35822
|
+
relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { " + ts.unescapeLeadingUnderscores(node.name.escapedText) + " }"));
|
|
35813
35823
|
}
|
|
35814
35824
|
var declarationName_1 = ts.getNameOfDeclaration(node) || node;
|
|
35815
35825
|
ts.forEach(symbol.declarations, function (declaration, index) {
|
|
@@ -37631,7 +37641,7 @@ var ts;
|
|
|
37631
37641
|
}
|
|
37632
37642
|
}
|
|
37633
37643
|
function bindSourceFileAsExternalModule() {
|
|
37634
|
-
bindAnonymousDeclaration(file, 512, "\""
|
|
37644
|
+
bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\"");
|
|
37635
37645
|
}
|
|
37636
37646
|
function bindExportAssignment(node) {
|
|
37637
37647
|
if (!container.symbol || !container.symbol.exports) {
|
|
@@ -39350,7 +39360,7 @@ var ts;
|
|
|
39350
39360
|
if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
|
|
39351
39361
|
var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 ? sourceSymbolFile : targetSymbolFile;
|
|
39352
39362
|
var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
|
|
39353
|
-
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates,
|
|
39363
|
+
var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path + "|" + secondFile_1.path, function () {
|
|
39354
39364
|
return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
|
|
39355
39365
|
});
|
|
39356
39366
|
var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
|
|
@@ -41421,8 +41431,13 @@ var ts;
|
|
|
41421
41431
|
return res;
|
|
41422
41432
|
}
|
|
41423
41433
|
var candidates = ts.mapDefined(symbol.declarations, function (d) {
|
|
41424
|
-
if (!ts.isAmbientModule(d) && d.parent
|
|
41425
|
-
|
|
41434
|
+
if (!ts.isAmbientModule(d) && d.parent) {
|
|
41435
|
+
if (hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) {
|
|
41436
|
+
return getSymbolOfNode(d.parent);
|
|
41437
|
+
}
|
|
41438
|
+
if (ts.isModuleBlock(d.parent) && d.parent.parent && resolveExternalModuleSymbol(getSymbolOfNode(d.parent.parent)) === symbol) {
|
|
41439
|
+
return getSymbolOfNode(d.parent.parent);
|
|
41440
|
+
}
|
|
41426
41441
|
}
|
|
41427
41442
|
if (ts.isClassExpression(d) && ts.isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 63 && ts.isAccessExpression(d.parent.left) && ts.isEntityNameExpression(d.parent.left.expression)) {
|
|
41428
41443
|
if (ts.isModuleExportsAccessExpression(d.parent.left) || ts.isExportsIdentifier(d.parent.left.expression)) {
|
|
@@ -41634,7 +41649,7 @@ var ts;
|
|
|
41634
41649
|
var links = getSymbolLinks(symbol);
|
|
41635
41650
|
var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
|
|
41636
41651
|
var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
|
|
41637
|
-
var key =
|
|
41652
|
+
var key = (useOnlyExternalAliasing ? 0 : 1) + "|" + (firstRelevantLocation && getNodeId(firstRelevantLocation)) + "|" + meaning;
|
|
41638
41653
|
if (cache.has(key)) {
|
|
41639
41654
|
return cache.get(key);
|
|
41640
41655
|
}
|
|
@@ -42402,7 +42417,7 @@ var ts;
|
|
|
42402
42417
|
context.symbolDepth = new ts.Map();
|
|
42403
42418
|
}
|
|
42404
42419
|
var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
42405
|
-
var key =
|
|
42420
|
+
var key = getTypeId(type) + "|" + context.flags;
|
|
42406
42421
|
if (links) {
|
|
42407
42422
|
links.serializedTypes || (links.serializedTypes = new ts.Map());
|
|
42408
42423
|
}
|
|
@@ -42657,7 +42672,7 @@ var ts;
|
|
|
42657
42672
|
}
|
|
42658
42673
|
}
|
|
42659
42674
|
if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
|
|
42660
|
-
typeElements.push(ts.factory.createPropertySignature(undefined, "... "
|
|
42675
|
+
typeElements.push(ts.factory.createPropertySignature(undefined, "... " + (properties.length - i) + " more ...", undefined, undefined));
|
|
42661
42676
|
addPropertyToElementList(properties[properties.length - 1], context, typeElements);
|
|
42662
42677
|
break;
|
|
42663
42678
|
}
|
|
@@ -42765,7 +42780,7 @@ var ts;
|
|
|
42765
42780
|
else if (types.length > 2) {
|
|
42766
42781
|
return [
|
|
42767
42782
|
typeToTypeNodeHelper(types[0], context),
|
|
42768
|
-
ts.factory.createTypeReferenceNode("... "
|
|
42783
|
+
ts.factory.createTypeReferenceNode("... " + (types.length - 2) + " more ...", undefined),
|
|
42769
42784
|
typeToTypeNodeHelper(types[types.length - 1], context)
|
|
42770
42785
|
];
|
|
42771
42786
|
}
|
|
@@ -42778,7 +42793,7 @@ var ts;
|
|
|
42778
42793
|
var type = types_2[_i];
|
|
42779
42794
|
i++;
|
|
42780
42795
|
if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
|
|
42781
|
-
result_5.push(ts.factory.createTypeReferenceNode("... "
|
|
42796
|
+
result_5.push(ts.factory.createTypeReferenceNode("... " + (types.length - i) + " more ...", undefined));
|
|
42782
42797
|
var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
|
|
42783
42798
|
if (typeNode_1) {
|
|
42784
42799
|
result_5.push(typeNode_1);
|
|
@@ -43254,7 +43269,7 @@ var ts;
|
|
|
43254
43269
|
var text = rawtext;
|
|
43255
43270
|
while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
|
|
43256
43271
|
i++;
|
|
43257
|
-
text =
|
|
43272
|
+
text = rawtext + "_" + i;
|
|
43258
43273
|
}
|
|
43259
43274
|
if (text !== rawtext) {
|
|
43260
43275
|
result = ts.factory.createIdentifier(text, result.typeArguments);
|
|
@@ -43536,7 +43551,7 @@ var ts;
|
|
|
43536
43551
|
function getNameForJSDocFunctionParameter(p, index) {
|
|
43537
43552
|
return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
|
|
43538
43553
|
: getEffectiveDotDotDotForParameter(p) ? "args"
|
|
43539
|
-
: "arg"
|
|
43554
|
+
: "arg" + index;
|
|
43540
43555
|
}
|
|
43541
43556
|
function rewriteModuleSpecifier(parent, lit) {
|
|
43542
43557
|
if (bundled) {
|
|
@@ -44345,7 +44360,7 @@ var ts;
|
|
|
44345
44360
|
}
|
|
44346
44361
|
return results_1;
|
|
44347
44362
|
}
|
|
44348
|
-
return ts.Debug.fail("Unhandled class member kind! "
|
|
44363
|
+
return ts.Debug.fail("Unhandled class member kind! " + (p.__debugFlags || p.flags));
|
|
44349
44364
|
};
|
|
44350
44365
|
}
|
|
44351
44366
|
function serializePropertySymbolForInterface(p, baseType) {
|
|
@@ -44415,7 +44430,7 @@ var ts;
|
|
|
44415
44430
|
if (ref) {
|
|
44416
44431
|
return ref;
|
|
44417
44432
|
}
|
|
44418
|
-
var tempName = getUnusedName(
|
|
44433
|
+
var tempName = getUnusedName(rootName + "_base");
|
|
44419
44434
|
var statement = ts.factory.createVariableStatement(undefined, ts.factory.createVariableDeclarationList([
|
|
44420
44435
|
ts.factory.createVariableDeclaration(tempName, undefined, typeToTypeNodeHelper(staticType, context))
|
|
44421
44436
|
], 2));
|
|
@@ -44460,7 +44475,7 @@ var ts;
|
|
|
44460
44475
|
var original = input;
|
|
44461
44476
|
while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
|
|
44462
44477
|
i++;
|
|
44463
|
-
input =
|
|
44478
|
+
input = original + "_" + i;
|
|
44464
44479
|
}
|
|
44465
44480
|
(_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
|
|
44466
44481
|
if (id) {
|
|
@@ -44566,15 +44581,15 @@ var ts;
|
|
|
44566
44581
|
if (nameType.flags & 384) {
|
|
44567
44582
|
var name = "" + nameType.value;
|
|
44568
44583
|
if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !ts.isNumericLiteralName(name)) {
|
|
44569
|
-
return "\""
|
|
44584
|
+
return "\"" + ts.escapeString(name, 34) + "\"";
|
|
44570
44585
|
}
|
|
44571
44586
|
if (ts.isNumericLiteralName(name) && ts.startsWith(name, "-")) {
|
|
44572
|
-
return "["
|
|
44587
|
+
return "[" + name + "]";
|
|
44573
44588
|
}
|
|
44574
44589
|
return name;
|
|
44575
44590
|
}
|
|
44576
44591
|
if (nameType.flags & 8192) {
|
|
44577
|
-
return "["
|
|
44592
|
+
return "[" + getNameOfSymbolAsWritten(nameType.symbol, context) + "]";
|
|
44578
44593
|
}
|
|
44579
44594
|
}
|
|
44580
44595
|
}
|
|
@@ -47019,7 +47034,7 @@ var ts;
|
|
|
47019
47034
|
!leftName ? rightName :
|
|
47020
47035
|
!rightName ? leftName :
|
|
47021
47036
|
undefined;
|
|
47022
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
47037
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg" + i);
|
|
47023
47038
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
47024
47039
|
params[i] = paramSymbol;
|
|
47025
47040
|
}
|
|
@@ -48732,7 +48747,7 @@ var ts;
|
|
|
48732
48747
|
return result;
|
|
48733
48748
|
}
|
|
48734
48749
|
function getAliasId(aliasSymbol, aliasTypeArguments) {
|
|
48735
|
-
return aliasSymbol ? "@"
|
|
48750
|
+
return aliasSymbol ? "@" + getSymbolId(aliasSymbol) + (aliasTypeArguments ? ":" + getTypeListId(aliasTypeArguments) : "") : "";
|
|
48736
48751
|
}
|
|
48737
48752
|
function getPropagatingFlagsOfTypes(types, excludeKinds) {
|
|
48738
48753
|
var result = 0;
|
|
@@ -48895,7 +48910,7 @@ var ts;
|
|
|
48895
48910
|
return undefined;
|
|
48896
48911
|
}
|
|
48897
48912
|
function getSymbolPath(symbol) {
|
|
48898
|
-
return symbol.parent ?
|
|
48913
|
+
return symbol.parent ? getSymbolPath(symbol.parent) + "." + symbol.escapedName : symbol.escapedName;
|
|
48899
48914
|
}
|
|
48900
48915
|
function getUnresolvedSymbolForEntityName(name) {
|
|
48901
48916
|
var identifier = name.kind === 160 ? name.right :
|
|
@@ -48906,7 +48921,7 @@ var ts;
|
|
|
48906
48921
|
var parentSymbol = name.kind === 160 ? getUnresolvedSymbolForEntityName(name.left) :
|
|
48907
48922
|
name.kind === 205 ? getUnresolvedSymbolForEntityName(name.expression) :
|
|
48908
48923
|
undefined;
|
|
48909
|
-
var path = parentSymbol ?
|
|
48924
|
+
var path = parentSymbol ? getSymbolPath(parentSymbol) + "." + text : text;
|
|
48910
48925
|
var result = unresolvedSymbols.get(path);
|
|
48911
48926
|
if (!result) {
|
|
48912
48927
|
unresolvedSymbols.set(path, result = createSymbol(524288, text, 1048576));
|
|
@@ -48972,7 +48987,7 @@ var ts;
|
|
|
48972
48987
|
if (substitute.flags & 3 || substitute === baseType) {
|
|
48973
48988
|
return baseType;
|
|
48974
48989
|
}
|
|
48975
|
-
var id =
|
|
48990
|
+
var id = getTypeId(baseType) + ">" + getTypeId(substitute);
|
|
48976
48991
|
var cached = substitutionTypes.get(id);
|
|
48977
48992
|
if (cached) {
|
|
48978
48993
|
return cached;
|
|
@@ -49816,9 +49831,9 @@ var ts;
|
|
|
49816
49831
|
return types[0];
|
|
49817
49832
|
}
|
|
49818
49833
|
var typeKey = !origin ? getTypeListId(types) :
|
|
49819
|
-
origin.flags & 1048576 ? "|"
|
|
49820
|
-
origin.flags & 2097152 ? "&"
|
|
49821
|
-
"#"
|
|
49834
|
+
origin.flags & 1048576 ? "|" + getTypeListId(origin.types) :
|
|
49835
|
+
origin.flags & 2097152 ? "&" + getTypeListId(origin.types) :
|
|
49836
|
+
"#" + origin.type.id + "|" + getTypeListId(types);
|
|
49822
49837
|
var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
49823
49838
|
var type = unionTypes.get(id);
|
|
49824
49839
|
if (!type) {
|
|
@@ -50268,7 +50283,7 @@ var ts;
|
|
|
50268
50283
|
if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4); })) {
|
|
50269
50284
|
return stringType;
|
|
50270
50285
|
}
|
|
50271
|
-
var id =
|
|
50286
|
+
var id = getTypeListId(newTypes) + "|" + ts.map(newTexts, function (t) { return t.length; }).join(",") + "|" + newTexts.join("");
|
|
50272
50287
|
var type = templateLiteralTypes.get(id);
|
|
50273
50288
|
if (!type) {
|
|
50274
50289
|
templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
|
|
@@ -50328,7 +50343,7 @@ var ts;
|
|
|
50328
50343
|
return str;
|
|
50329
50344
|
}
|
|
50330
50345
|
function getStringMappingTypeForGenericType(symbol, type) {
|
|
50331
|
-
var id =
|
|
50346
|
+
var id = getSymbolId(symbol) + "," + getTypeId(type);
|
|
50332
50347
|
var result = stringMappingTypes.get(id);
|
|
50333
50348
|
if (!result) {
|
|
50334
50349
|
stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
|
|
@@ -51236,7 +51251,7 @@ var ts;
|
|
|
51236
51251
|
function createUniqueESSymbolType(symbol) {
|
|
51237
51252
|
var type = createType(8192);
|
|
51238
51253
|
type.symbol = symbol;
|
|
51239
|
-
type.escapedName = "__@"
|
|
51254
|
+
type.escapedName = "__@" + type.symbol.escapedName + "@" + getSymbolId(type.symbol);
|
|
51240
51255
|
return type;
|
|
51241
51256
|
}
|
|
51242
51257
|
function getESSymbolLikeTypeForNode(node) {
|
|
@@ -52592,9 +52607,9 @@ var ts;
|
|
|
52592
52607
|
isEnumTypeRelatedTo(getParentOfSymbol(source.symbol), getParentOfSymbol(target.symbol), errorReporter))
|
|
52593
52608
|
return true;
|
|
52594
52609
|
}
|
|
52595
|
-
if (s & 32768 && (!strictNullChecks || t & (32768 | 16384)))
|
|
52610
|
+
if (s & 32768 && (!strictNullChecks && !(t & 3145728) || t & (32768 | 16384)))
|
|
52596
52611
|
return true;
|
|
52597
|
-
if (s & 65536 && (!strictNullChecks || t & 65536))
|
|
52612
|
+
if (s & 65536 && (!strictNullChecks && !(t & 3145728) || t & 65536))
|
|
52598
52613
|
return true;
|
|
52599
52614
|
if (s & 524288 && t & 67108864)
|
|
52600
52615
|
return true;
|
|
@@ -52757,20 +52772,20 @@ var ts;
|
|
|
52757
52772
|
switch (msg.code) {
|
|
52758
52773
|
case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
|
|
52759
52774
|
if (path.indexOf("new ") === 0) {
|
|
52760
|
-
path = "("
|
|
52775
|
+
path = "(" + path + ")";
|
|
52761
52776
|
}
|
|
52762
52777
|
var str = "" + args[0];
|
|
52763
52778
|
if (path.length === 0) {
|
|
52764
|
-
path = ""
|
|
52779
|
+
path = "" + str;
|
|
52765
52780
|
}
|
|
52766
52781
|
else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
|
|
52767
|
-
path =
|
|
52782
|
+
path = path + "." + str;
|
|
52768
52783
|
}
|
|
52769
52784
|
else if (str[0] === "[" && str[str.length - 1] === "]") {
|
|
52770
|
-
path = ""
|
|
52785
|
+
path = "" + path + str;
|
|
52771
52786
|
}
|
|
52772
52787
|
else {
|
|
52773
|
-
path =
|
|
52788
|
+
path = path + "[" + str + "]";
|
|
52774
52789
|
}
|
|
52775
52790
|
break;
|
|
52776
52791
|
}
|
|
@@ -52797,7 +52812,7 @@ var ts;
|
|
|
52797
52812
|
msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
|
|
52798
52813
|
? ""
|
|
52799
52814
|
: "...";
|
|
52800
|
-
path = ""
|
|
52815
|
+
path = "" + prefix + path + "(" + params + ")";
|
|
52801
52816
|
}
|
|
52802
52817
|
break;
|
|
52803
52818
|
}
|
|
@@ -52810,7 +52825,7 @@ var ts;
|
|
|
52810
52825
|
break;
|
|
52811
52826
|
}
|
|
52812
52827
|
default:
|
|
52813
|
-
return ts.Debug.fail("Unhandled Diagnostic: "
|
|
52828
|
+
return ts.Debug.fail("Unhandled Diagnostic: " + msg.code);
|
|
52814
52829
|
}
|
|
52815
52830
|
}
|
|
52816
52831
|
if (path) {
|
|
@@ -53805,6 +53820,9 @@ var ts;
|
|
|
53805
53820
|
}
|
|
53806
53821
|
if (ts.getObjectFlags(source) & 4 && ts.getObjectFlags(target) & 4 && source.target === target.target &&
|
|
53807
53822
|
!isTupleType(source) && !(ts.getObjectFlags(source) & 4096 || ts.getObjectFlags(target) & 4096)) {
|
|
53823
|
+
if (isEmptyArrayLiteralType(source)) {
|
|
53824
|
+
return -1;
|
|
53825
|
+
}
|
|
53808
53826
|
var variances = getVariances(source.target);
|
|
53809
53827
|
if (variances === ts.emptyArray) {
|
|
53810
53828
|
return 1;
|
|
@@ -54040,6 +54058,10 @@ var ts;
|
|
|
54040
54058
|
}
|
|
54041
54059
|
return 0;
|
|
54042
54060
|
}
|
|
54061
|
+
if ((relation === subtypeRelation || relation === strictSubtypeRelation) &&
|
|
54062
|
+
!!(sourcePropFlags & 64) && !(targetPropFlags & 64)) {
|
|
54063
|
+
return 0;
|
|
54064
|
+
}
|
|
54043
54065
|
var related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState);
|
|
54044
54066
|
if (!related) {
|
|
54045
54067
|
if (reportErrors) {
|
|
@@ -54658,7 +54680,7 @@ var ts;
|
|
|
54658
54680
|
var constraintMarker = "";
|
|
54659
54681
|
var sourceId = getTypeReferenceId(source, 0);
|
|
54660
54682
|
var targetId = getTypeReferenceId(target, 0);
|
|
54661
|
-
return ""
|
|
54683
|
+
return "" + constraintMarker + sourceId + "," + targetId + postFix;
|
|
54662
54684
|
function getTypeReferenceId(type, depth) {
|
|
54663
54685
|
if (depth === void 0) { depth = 0; }
|
|
54664
54686
|
var result = "" + type.target.id;
|
|
@@ -54694,7 +54716,7 @@ var ts;
|
|
|
54694
54716
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
54695
54717
|
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
54696
54718
|
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
54697
|
-
|
|
54719
|
+
source.id + "," + target.id + postFix;
|
|
54698
54720
|
}
|
|
54699
54721
|
function forEachProperty(prop, callback) {
|
|
54700
54722
|
if (ts.getCheckFlags(prop) & 6) {
|
|
@@ -56517,10 +56539,10 @@ var ts;
|
|
|
56517
56539
|
case 79:
|
|
56518
56540
|
if (!ts.isThisInTypeQuery(node)) {
|
|
56519
56541
|
var symbol = getResolvedSymbol(node);
|
|
56520
|
-
return symbol !== unknownSymbol ?
|
|
56542
|
+
return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType) + "|" + getSymbolId(symbol) : undefined;
|
|
56521
56543
|
}
|
|
56522
56544
|
case 108:
|
|
56523
|
-
return "0|"
|
|
56545
|
+
return "0|" + (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType);
|
|
56524
56546
|
case 229:
|
|
56525
56547
|
case 211:
|
|
56526
56548
|
return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
@@ -59837,7 +59859,7 @@ var ts;
|
|
|
59837
59859
|
!leftName ? rightName :
|
|
59838
59860
|
!rightName ? leftName :
|
|
59839
59861
|
undefined;
|
|
59840
|
-
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg"
|
|
59862
|
+
var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg" + i);
|
|
59841
59863
|
paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
|
|
59842
59864
|
params[i] = paramSymbol;
|
|
59843
59865
|
}
|
|
@@ -68256,7 +68278,7 @@ var ts;
|
|
|
68256
68278
|
function getPropertyNameForKnownSymbolName(symbolName) {
|
|
68257
68279
|
var ctorType = getGlobalESSymbolConstructorSymbol(false);
|
|
68258
68280
|
var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
|
|
68259
|
-
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@"
|
|
68281
|
+
return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@" + symbolName;
|
|
68260
68282
|
}
|
|
68261
68283
|
function getIterationTypesOfIterableSlow(type, resolver, errorNode) {
|
|
68262
68284
|
var _a;
|
|
@@ -74582,7 +74604,7 @@ var ts;
|
|
|
74582
74604
|
value >= 52 && value < 62 ? 48 + value - 52 :
|
|
74583
74605
|
value === 62 ? 43 :
|
|
74584
74606
|
value === 63 ? 47 :
|
|
74585
|
-
ts.Debug.fail(
|
|
74607
|
+
ts.Debug.fail(value + ": not a base64 value");
|
|
74586
74608
|
}
|
|
74587
74609
|
function base64FormatDecode(ch) {
|
|
74588
74610
|
return ch >= 65 && ch <= 90 ? ch - 65 :
|
|
@@ -74655,7 +74677,7 @@ var ts;
|
|
|
74655
74677
|
var mappings = ts.arrayFrom(decoder, processMapping);
|
|
74656
74678
|
if (decoder.error !== undefined) {
|
|
74657
74679
|
if (host.log) {
|
|
74658
|
-
host.log("Encountered error while decoding sourcemap: "
|
|
74680
|
+
host.log("Encountered error while decoding sourcemap: " + decoder.error);
|
|
74659
74681
|
}
|
|
74660
74682
|
decodedMappings = ts.emptyArray;
|
|
74661
74683
|
}
|
|
@@ -77098,7 +77120,7 @@ var ts;
|
|
|
77098
77120
|
var propertyName = ts.isPropertyAccessExpression(originalNode)
|
|
77099
77121
|
? ts.declarationNameToString(originalNode.name)
|
|
77100
77122
|
: ts.getTextOfNode(originalNode.argumentExpression);
|
|
77101
|
-
ts.addSyntheticTrailingComment(substitute, 3, " "
|
|
77123
|
+
ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
|
|
77102
77124
|
}
|
|
77103
77125
|
return substitute;
|
|
77104
77126
|
}
|
|
@@ -78348,8 +78370,8 @@ var ts;
|
|
|
78348
78370
|
}
|
|
78349
78371
|
function createHoistedVariableForClass(name, node) {
|
|
78350
78372
|
var className = getPrivateIdentifierEnvironment().className;
|
|
78351
|
-
var prefix = className ? "_"
|
|
78352
|
-
var identifier = factory.createUniqueName(
|
|
78373
|
+
var prefix = className ? "_" + className : "";
|
|
78374
|
+
var identifier = factory.createUniqueName(prefix + "_" + name, 16);
|
|
78353
78375
|
if (resolver.getNodeCheckFlags(node) & 524288) {
|
|
78354
78376
|
addBlockScopedVariable(identifier);
|
|
78355
78377
|
}
|
|
@@ -80007,7 +80029,7 @@ var ts;
|
|
|
80007
80029
|
specifierSourceImports = new ts.Map();
|
|
80008
80030
|
currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
|
|
80009
80031
|
}
|
|
80010
|
-
var generatedName = factory.createUniqueName("_"
|
|
80032
|
+
var generatedName = factory.createUniqueName("_" + name, 16 | 32 | 64);
|
|
80011
80033
|
var specifier = factory.createImportSpecifier(false, factory.createIdentifier(name), generatedName);
|
|
80012
80034
|
generatedName.generatedImportReference = specifier;
|
|
80013
80035
|
specifierSourceImports.set(name, specifier);
|
|
@@ -80948,11 +80970,11 @@ var ts;
|
|
|
80948
80970
|
}
|
|
80949
80971
|
else {
|
|
80950
80972
|
if (node.kind === 245) {
|
|
80951
|
-
labelMarker = "break-"
|
|
80973
|
+
labelMarker = "break-" + label.escapedText;
|
|
80952
80974
|
setLabeledJump(convertedLoopState, true, ts.idText(label), labelMarker);
|
|
80953
80975
|
}
|
|
80954
80976
|
else {
|
|
80955
|
-
labelMarker = "continue-"
|
|
80977
|
+
labelMarker = "continue-" + label.escapedText;
|
|
80956
80978
|
setLabeledJump(convertedLoopState, false, ts.idText(label), labelMarker);
|
|
80957
80979
|
}
|
|
80958
80980
|
}
|
|
@@ -86607,7 +86629,7 @@ var ts;
|
|
|
86607
86629
|
return getTypeAliasDeclarationVisibilityError;
|
|
86608
86630
|
}
|
|
86609
86631
|
else {
|
|
86610
|
-
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: "
|
|
86632
|
+
return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.SyntaxKind[node.kind]);
|
|
86611
86633
|
}
|
|
86612
86634
|
function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
|
|
86613
86635
|
if (node.kind === 253 || node.kind === 202) {
|
|
@@ -86804,7 +86826,7 @@ var ts;
|
|
|
86804
86826
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
|
|
86805
86827
|
ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
|
|
86806
86828
|
default:
|
|
86807
|
-
return ts.Debug.fail("Unknown parent for parameter: "
|
|
86829
|
+
return ts.Debug.fail("Unknown parent for parameter: " + ts.SyntaxKind[node.parent.kind]);
|
|
86808
86830
|
}
|
|
86809
86831
|
}
|
|
86810
86832
|
function getTypeParameterConstraintVisibilityError() {
|
|
@@ -87491,7 +87513,7 @@ var ts;
|
|
|
87491
87513
|
while (ts.length(lateMarkedStatements)) {
|
|
87492
87514
|
var i = lateMarkedStatements.shift();
|
|
87493
87515
|
if (!ts.isLateVisibilityPaintedStatement(i)) {
|
|
87494
|
-
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: "
|
|
87516
|
+
return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " + (ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
|
|
87495
87517
|
}
|
|
87496
87518
|
var priorNeedsDeclare = needsDeclare;
|
|
87497
87519
|
needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
|
|
@@ -87656,7 +87678,7 @@ var ts;
|
|
|
87656
87678
|
return cleanup(input);
|
|
87657
87679
|
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));
|
|
87658
87680
|
}
|
|
87659
|
-
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: "
|
|
87681
|
+
default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
|
|
87660
87682
|
}
|
|
87661
87683
|
}
|
|
87662
87684
|
if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
|
|
@@ -87900,7 +87922,7 @@ var ts;
|
|
|
87900
87922
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
87901
87923
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
87902
87924
|
var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
|
|
87903
|
-
var newId_1 = factory.createUniqueName(
|
|
87925
|
+
var newId_1 = factory.createUniqueName(oldId + "_base", 16);
|
|
87904
87926
|
getSymbolAccessibilityDiagnostic = function () { return ({
|
|
87905
87927
|
diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
|
|
87906
87928
|
errorNode: extendsClause_1,
|
|
@@ -87937,7 +87959,7 @@ var ts;
|
|
|
87937
87959
|
}))));
|
|
87938
87960
|
}
|
|
87939
87961
|
}
|
|
87940
|
-
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: "
|
|
87962
|
+
return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.SyntaxKind[input.kind]);
|
|
87941
87963
|
function cleanup(node) {
|
|
87942
87964
|
if (isEnclosingDeclaration(input)) {
|
|
87943
87965
|
enclosingDeclaration = previousEnclosingDeclaration;
|
|
@@ -88706,13 +88728,13 @@ var ts;
|
|
|
88706
88728
|
if (ts.fileExtensionIs(inputFileName, ".json"))
|
|
88707
88729
|
return;
|
|
88708
88730
|
if (js && configFile.options.sourceMap) {
|
|
88709
|
-
addOutput(
|
|
88731
|
+
addOutput(js + ".map");
|
|
88710
88732
|
}
|
|
88711
88733
|
if (ts.getEmitDeclarations(configFile.options)) {
|
|
88712
88734
|
var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
88713
88735
|
addOutput(dts);
|
|
88714
88736
|
if (configFile.options.declarationMap) {
|
|
88715
|
-
addOutput(
|
|
88737
|
+
addOutput(dts + ".map");
|
|
88716
88738
|
}
|
|
88717
88739
|
}
|
|
88718
88740
|
}
|
|
@@ -88772,7 +88794,7 @@ var ts;
|
|
|
88772
88794
|
function getFirstProjectOutput(configFile, ignoreCase) {
|
|
88773
88795
|
if (ts.outFile(configFile.options)) {
|
|
88774
88796
|
var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath;
|
|
88775
|
-
return ts.Debug.checkDefined(jsFilePath, "project "
|
|
88797
|
+
return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output");
|
|
88776
88798
|
}
|
|
88777
88799
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
88778
88800
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
@@ -88791,7 +88813,7 @@ var ts;
|
|
|
88791
88813
|
var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
|
|
88792
88814
|
if (buildInfoPath)
|
|
88793
88815
|
return buildInfoPath;
|
|
88794
|
-
return ts.Debug.fail("project "
|
|
88816
|
+
return ts.Debug.fail("project " + configFile.options.configFilePath + " expected to have at least one output");
|
|
88795
88817
|
}
|
|
88796
88818
|
ts.getFirstProjectOutput = getFirstProjectOutput;
|
|
88797
88819
|
function emitFiles(resolver, host, targetSourceFile, _a, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
|
|
@@ -89001,7 +89023,7 @@ var ts;
|
|
|
89001
89023
|
if (sourceMappingURL) {
|
|
89002
89024
|
if (!writer.isAtStartOfLine())
|
|
89003
89025
|
writer.rawWrite(newLine);
|
|
89004
|
-
writer.writeComment("//# "
|
|
89026
|
+
writer.writeComment("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
|
|
89005
89027
|
}
|
|
89006
89028
|
if (sourceMapFilePath) {
|
|
89007
89029
|
var sourceMap = sourceMapGenerator.toString();
|
|
@@ -89041,7 +89063,7 @@ var ts;
|
|
|
89041
89063
|
if (mapOptions.inlineSourceMap) {
|
|
89042
89064
|
var sourceMapText = sourceMapGenerator.toString();
|
|
89043
89065
|
var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
|
|
89044
|
-
return "data:application/json;base64,"
|
|
89066
|
+
return "data:application/json;base64," + base64SourceMapText;
|
|
89045
89067
|
}
|
|
89046
89068
|
var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
|
|
89047
89069
|
if (mapOptions.mapRoot) {
|
|
@@ -89205,7 +89227,7 @@ var ts;
|
|
|
89205
89227
|
return;
|
|
89206
89228
|
break;
|
|
89207
89229
|
default:
|
|
89208
|
-
ts.Debug.fail("Unexpected path: "
|
|
89230
|
+
ts.Debug.fail("Unexpected path: " + name);
|
|
89209
89231
|
}
|
|
89210
89232
|
outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
|
|
89211
89233
|
},
|
|
@@ -90013,7 +90035,7 @@ var ts;
|
|
|
90013
90035
|
return writeTokenNode(node, writeKeyword);
|
|
90014
90036
|
if (ts.isTokenKind(node.kind))
|
|
90015
90037
|
return writeTokenNode(node, writePunctuation);
|
|
90016
|
-
ts.Debug.fail("Unhandled SyntaxKind: "
|
|
90038
|
+
ts.Debug.fail("Unhandled SyntaxKind: " + ts.Debug.formatSyntaxKind(node.kind) + ".");
|
|
90017
90039
|
}
|
|
90018
90040
|
function emitMappedTypeParameter(node) {
|
|
90019
90041
|
emit(node.name);
|
|
@@ -90153,14 +90175,14 @@ var ts;
|
|
|
90153
90175
|
}
|
|
90154
90176
|
}
|
|
90155
90177
|
function emitPlaceholder(hint, node, snippet) {
|
|
90156
|
-
nonEscapingWrite("${"
|
|
90178
|
+
nonEscapingWrite("${" + snippet.order + ":");
|
|
90157
90179
|
pipelineEmitWithHintWorker(hint, node, false);
|
|
90158
90180
|
nonEscapingWrite("}");
|
|
90159
90181
|
}
|
|
90160
90182
|
function emitTabStop(hint, node, snippet) {
|
|
90161
|
-
ts.Debug.assert(node.kind === 235, "A tab stop cannot be attached to a node of kind "
|
|
90183
|
+
ts.Debug.assert(node.kind === 235, "A tab stop cannot be attached to a node of kind " + ts.Debug.formatSyntaxKind(node.kind) + ".");
|
|
90162
90184
|
ts.Debug.assert(hint !== 5, "A tab stop cannot be attached to an embedded statement.");
|
|
90163
|
-
nonEscapingWrite("$"
|
|
90185
|
+
nonEscapingWrite("$" + snippet.order);
|
|
90164
90186
|
}
|
|
90165
90187
|
function emitIdentifier(node) {
|
|
90166
90188
|
var writeText = node.symbol ? writeSymbol : write;
|
|
@@ -91823,17 +91845,17 @@ var ts;
|
|
|
91823
91845
|
writeLine();
|
|
91824
91846
|
}
|
|
91825
91847
|
if (currentSourceFile && currentSourceFile.moduleName) {
|
|
91826
|
-
writeComment("/// <amd-module name=\""
|
|
91848
|
+
writeComment("/// <amd-module name=\"" + currentSourceFile.moduleName + "\" />");
|
|
91827
91849
|
writeLine();
|
|
91828
91850
|
}
|
|
91829
91851
|
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
|
91830
91852
|
for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
|
|
91831
91853
|
var dep = _b[_a];
|
|
91832
91854
|
if (dep.name) {
|
|
91833
|
-
writeComment("/// <amd-dependency name=\""
|
|
91855
|
+
writeComment("/// <amd-dependency name=\"" + dep.name + "\" path=\"" + dep.path + "\" />");
|
|
91834
91856
|
}
|
|
91835
91857
|
else {
|
|
91836
|
-
writeComment("/// <amd-dependency path=\""
|
|
91858
|
+
writeComment("/// <amd-dependency path=\"" + dep.path + "\" />");
|
|
91837
91859
|
}
|
|
91838
91860
|
writeLine();
|
|
91839
91861
|
}
|
|
@@ -91841,7 +91863,7 @@ var ts;
|
|
|
91841
91863
|
for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
|
|
91842
91864
|
var directive = files_2[_c];
|
|
91843
91865
|
var pos = writer.getTextPos();
|
|
91844
|
-
writeComment("/// <reference path=\""
|
|
91866
|
+
writeComment("/// <reference path=\"" + directive.fileName + "\" />");
|
|
91845
91867
|
if (bundleFileInfo)
|
|
91846
91868
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
|
|
91847
91869
|
writeLine();
|
|
@@ -91849,7 +91871,7 @@ var ts;
|
|
|
91849
91871
|
for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
|
|
91850
91872
|
var directive = types_24[_d];
|
|
91851
91873
|
var pos = writer.getTextPos();
|
|
91852
|
-
writeComment("/// <reference types=\""
|
|
91874
|
+
writeComment("/// <reference types=\"" + directive.fileName + "\" />");
|
|
91853
91875
|
if (bundleFileInfo)
|
|
91854
91876
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type", data: directive.fileName });
|
|
91855
91877
|
writeLine();
|
|
@@ -91857,7 +91879,7 @@ var ts;
|
|
|
91857
91879
|
for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
|
|
91858
91880
|
var directive = libs_1[_e];
|
|
91859
91881
|
var pos = writer.getTextPos();
|
|
91860
|
-
writeComment("/// <reference lib=\""
|
|
91882
|
+
writeComment("/// <reference lib=\"" + directive.fileName + "\" />");
|
|
91861
91883
|
if (bundleFileInfo)
|
|
91862
91884
|
bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib", data: directive.fileName });
|
|
91863
91885
|
writeLine();
|
|
@@ -92556,9 +92578,9 @@ var ts;
|
|
|
92556
92578
|
var textSourceNode = node.textSourceNode;
|
|
92557
92579
|
if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
|
|
92558
92580
|
var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
|
|
92559
|
-
return jsxAttributeEscape ? "\""
|
|
92560
|
-
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\""
|
|
92561
|
-
"\""
|
|
92581
|
+
return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(text) + "\"" :
|
|
92582
|
+
neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"" + ts.escapeString(text) + "\"" :
|
|
92583
|
+
"\"" + ts.escapeNonAsciiString(text) + "\"";
|
|
92562
92584
|
}
|
|
92563
92585
|
else {
|
|
92564
92586
|
return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
|
|
@@ -92957,8 +92979,8 @@ var ts;
|
|
|
92957
92979
|
}
|
|
92958
92980
|
function formatSynthesizedComment(comment) {
|
|
92959
92981
|
return comment.kind === 3
|
|
92960
|
-
? "/*"
|
|
92961
|
-
: "//"
|
|
92982
|
+
? "/*" + comment.text + "*/"
|
|
92983
|
+
: "//" + comment.text;
|
|
92962
92984
|
}
|
|
92963
92985
|
function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
|
|
92964
92986
|
enterComment();
|
|
@@ -93572,18 +93594,18 @@ var ts;
|
|
|
93572
93594
|
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;
|
|
93573
93595
|
var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
|
|
93574
93596
|
if (!newPath) {
|
|
93575
|
-
writeLog("Project: "
|
|
93597
|
+
writeLog("Project: " + configFileName + " Detected ignored path: " + fileOrDirectory);
|
|
93576
93598
|
return true;
|
|
93577
93599
|
}
|
|
93578
93600
|
fileOrDirectoryPath = newPath;
|
|
93579
93601
|
if (fileOrDirectoryPath === watchedDirPath)
|
|
93580
93602
|
return false;
|
|
93581
93603
|
if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
|
|
93582
|
-
writeLog("Project: "
|
|
93604
|
+
writeLog("Project: " + configFileName + " Detected file add/remove of non supported extension: " + fileOrDirectory);
|
|
93583
93605
|
return true;
|
|
93584
93606
|
}
|
|
93585
93607
|
if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
|
|
93586
|
-
writeLog("Project: "
|
|
93608
|
+
writeLog("Project: " + configFileName + " Detected excluded file: " + fileOrDirectory);
|
|
93587
93609
|
return true;
|
|
93588
93610
|
}
|
|
93589
93611
|
if (!program)
|
|
@@ -93602,7 +93624,7 @@ var ts;
|
|
|
93602
93624
|
var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
|
|
93603
93625
|
if (hasSourceFile((filePathWithoutExtension + ".ts")) ||
|
|
93604
93626
|
hasSourceFile((filePathWithoutExtension + ".tsx"))) {
|
|
93605
|
-
writeLog("Project: "
|
|
93627
|
+
writeLog("Project: " + configFileName + " Detected output file: " + fileOrDirectory);
|
|
93606
93628
|
return true;
|
|
93607
93629
|
}
|
|
93608
93630
|
return false;
|
|
@@ -93670,36 +93692,36 @@ var ts;
|
|
|
93670
93692
|
host.useCaseSensitiveFileNames();
|
|
93671
93693
|
}
|
|
93672
93694
|
function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
|
|
93673
|
-
log("ExcludeWatcher:: Added:: "
|
|
93695
|
+
log("ExcludeWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
93674
93696
|
return {
|
|
93675
|
-
close: function () { return log("ExcludeWatcher:: Close:: "
|
|
93697
|
+
close: function () { return log("ExcludeWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)); }
|
|
93676
93698
|
};
|
|
93677
93699
|
}
|
|
93678
93700
|
function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
93679
|
-
log("FileWatcher:: Added:: "
|
|
93701
|
+
log("FileWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
93680
93702
|
var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
93681
93703
|
return {
|
|
93682
93704
|
close: function () {
|
|
93683
|
-
log("FileWatcher:: Close:: "
|
|
93705
|
+
log("FileWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
|
|
93684
93706
|
watcher.close();
|
|
93685
93707
|
}
|
|
93686
93708
|
};
|
|
93687
93709
|
}
|
|
93688
93710
|
function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
|
|
93689
|
-
var watchInfo = "DirectoryWatcher:: Added:: "
|
|
93711
|
+
var watchInfo = "DirectoryWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
|
|
93690
93712
|
log(watchInfo);
|
|
93691
93713
|
var start = ts.timestamp();
|
|
93692
93714
|
var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
|
|
93693
93715
|
var elapsed = ts.timestamp() - start;
|
|
93694
|
-
log("Elapsed:: "
|
|
93716
|
+
log("Elapsed:: " + elapsed + "ms " + watchInfo);
|
|
93695
93717
|
return {
|
|
93696
93718
|
close: function () {
|
|
93697
|
-
var watchInfo = "DirectoryWatcher:: Close:: "
|
|
93719
|
+
var watchInfo = "DirectoryWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
|
|
93698
93720
|
log(watchInfo);
|
|
93699
93721
|
var start = ts.timestamp();
|
|
93700
93722
|
watcher.close();
|
|
93701
93723
|
var elapsed = ts.timestamp() - start;
|
|
93702
|
-
log("Elapsed:: "
|
|
93724
|
+
log("Elapsed:: " + elapsed + "ms " + watchInfo);
|
|
93703
93725
|
}
|
|
93704
93726
|
};
|
|
93705
93727
|
}
|
|
@@ -93709,16 +93731,16 @@ var ts;
|
|
|
93709
93731
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
93710
93732
|
args[_i] = arguments[_i];
|
|
93711
93733
|
}
|
|
93712
|
-
var triggerredInfo =
|
|
93734
|
+
var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher") + ":: Triggered with " + args[0] + " " + (args[1] !== undefined ? args[1] : "") + ":: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
|
|
93713
93735
|
log(triggerredInfo);
|
|
93714
93736
|
var start = ts.timestamp();
|
|
93715
93737
|
cb.call.apply(cb, __spreadArray([undefined], args, false));
|
|
93716
93738
|
var elapsed = ts.timestamp() - start;
|
|
93717
|
-
log("Elapsed:: "
|
|
93739
|
+
log("Elapsed:: " + elapsed + "ms " + triggerredInfo);
|
|
93718
93740
|
}, flags, options, detailInfo1, detailInfo2); };
|
|
93719
93741
|
}
|
|
93720
93742
|
function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
|
|
93721
|
-
return "WatchInfo: "
|
|
93743
|
+
return "WatchInfo: " + file + " " + flags + " " + JSON.stringify(options) + " " + (getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : detailInfo1 + " " + detailInfo2);
|
|
93722
93744
|
}
|
|
93723
93745
|
}
|
|
93724
93746
|
ts.getWatchFactory = getWatchFactory;
|
|
@@ -94008,12 +94030,12 @@ var ts;
|
|
|
94008
94030
|
}
|
|
94009
94031
|
ts.formatDiagnostics = formatDiagnostics;
|
|
94010
94032
|
function formatDiagnostic(diagnostic, host) {
|
|
94011
|
-
var errorMessage =
|
|
94033
|
+
var errorMessage = ts.diagnosticCategoryName(diagnostic) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine();
|
|
94012
94034
|
if (diagnostic.file) {
|
|
94013
94035
|
var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
|
|
94014
94036
|
var fileName = diagnostic.file.fileName;
|
|
94015
94037
|
var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
|
|
94016
|
-
return
|
|
94038
|
+
return relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): " + errorMessage;
|
|
94017
94039
|
}
|
|
94018
94040
|
return errorMessage;
|
|
94019
94041
|
}
|
|
@@ -94091,9 +94113,9 @@ var ts;
|
|
|
94091
94113
|
var output = "";
|
|
94092
94114
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
94093
94115
|
output += ":";
|
|
94094
|
-
output += color(""
|
|
94116
|
+
output += color("" + (firstLine + 1), ForegroundColorEscapeSequences.Yellow);
|
|
94095
94117
|
output += ":";
|
|
94096
|
-
output += color(""
|
|
94118
|
+
output += color("" + (firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
|
|
94097
94119
|
return output;
|
|
94098
94120
|
}
|
|
94099
94121
|
ts.formatLocation = formatLocation;
|
|
@@ -94107,7 +94129,7 @@ var ts;
|
|
|
94107
94129
|
output += " - ";
|
|
94108
94130
|
}
|
|
94109
94131
|
output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
|
|
94110
|
-
output += formatColorAndReset(" TS"
|
|
94132
|
+
output += formatColorAndReset(" TS" + diagnostic.code + ": ", ForegroundColorEscapeSequences.Grey);
|
|
94111
94133
|
output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
|
|
94112
94134
|
if (diagnostic.file) {
|
|
94113
94135
|
output += host.getNewLine();
|
|
@@ -94207,7 +94229,7 @@ var ts;
|
|
|
94207
94229
|
var result = void 0;
|
|
94208
94230
|
var mode = getModeForResolutionAtIndex(containingFile, i);
|
|
94209
94231
|
i++;
|
|
94210
|
-
var cacheKey = mode !== undefined ?
|
|
94232
|
+
var cacheKey = mode !== undefined ? mode + "|" + name : name;
|
|
94211
94233
|
if (cache.has(cacheKey)) {
|
|
94212
94234
|
result = cache.get(cacheKey);
|
|
94213
94235
|
}
|
|
@@ -96078,7 +96100,7 @@ var ts;
|
|
|
96078
96100
|
path += (i === 2 ? "/" : "-") + components[i];
|
|
96079
96101
|
i++;
|
|
96080
96102
|
}
|
|
96081
|
-
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_"
|
|
96103
|
+
var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_" + libFileName + "__.ts");
|
|
96082
96104
|
var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
|
|
96083
96105
|
if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
|
|
96084
96106
|
return localOverrideModuleResult.resolvedModule.resolvedFileName;
|
|
@@ -96847,10 +96869,10 @@ var ts;
|
|
|
96847
96869
|
}
|
|
96848
96870
|
function directoryExistsIfProjectReferenceDeclDir(dir) {
|
|
96849
96871
|
var dirPath = host.toPath(dir);
|
|
96850
|
-
var dirPathWithTrailingDirectorySeparator = ""
|
|
96872
|
+
var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator;
|
|
96851
96873
|
return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
|
|
96852
96874
|
ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
|
|
96853
|
-
ts.startsWith(dirPath,
|
|
96875
|
+
ts.startsWith(dirPath, declDirPath + "/"); });
|
|
96854
96876
|
}
|
|
96855
96877
|
function handleDirectoryCouldBeSymlink(directory) {
|
|
96856
96878
|
var _a;
|
|
@@ -96898,7 +96920,7 @@ var ts;
|
|
|
96898
96920
|
var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));
|
|
96899
96921
|
if (isFile && result) {
|
|
96900
96922
|
var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
|
|
96901
|
-
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, ""
|
|
96923
|
+
symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), ""));
|
|
96902
96924
|
}
|
|
96903
96925
|
return result;
|
|
96904
96926
|
}) || false;
|
|
@@ -97282,7 +97304,7 @@ var ts;
|
|
|
97282
97304
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
97283
97305
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
97284
97306
|
if (firstDts_1) {
|
|
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: "
|
|
97307
|
+
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: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
97286
97308
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
97287
97309
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
97288
97310
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -97678,7 +97700,7 @@ var ts;
|
|
|
97678
97700
|
return;
|
|
97679
97701
|
}
|
|
97680
97702
|
else {
|
|
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: "
|
|
97703
|
+
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: " + affectedFile.fileName);
|
|
97682
97704
|
}
|
|
97683
97705
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
97684
97706
|
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
@@ -98650,7 +98672,7 @@ var ts;
|
|
|
98650
98672
|
failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
98651
98673
|
var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
|
|
98652
98674
|
var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
|
|
98653
|
-
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: "
|
|
98675
|
+
ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath);
|
|
98654
98676
|
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
98655
98677
|
return {
|
|
98656
98678
|
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator),
|
|
@@ -99572,7 +99594,7 @@ var ts;
|
|
|
99572
99594
|
}
|
|
99573
99595
|
function getJSExtensionForFile(fileName, options) {
|
|
99574
99596
|
var _a;
|
|
99575
|
-
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension "
|
|
99597
|
+
return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension " + ts.extensionFromPath(fileName) + " is unsupported:: FileName:: " + fileName);
|
|
99576
99598
|
}
|
|
99577
99599
|
function tryGetJSExtensionForFile(fileName, options) {
|
|
99578
99600
|
var ext = ts.tryGetExtensionFromPath(fileName);
|
|
@@ -99662,8 +99684,8 @@ var ts;
|
|
|
99662
99684
|
return pretty ?
|
|
99663
99685
|
function (diagnostic, newLine, options) {
|
|
99664
99686
|
clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
|
|
99665
|
-
var output = "["
|
|
99666
|
-
output += ""
|
|
99687
|
+
var output = "[" + ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] ";
|
|
99688
|
+
output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (newLine + newLine);
|
|
99667
99689
|
system.write(output);
|
|
99668
99690
|
} :
|
|
99669
99691
|
function (diagnostic, newLine, options) {
|
|
@@ -99671,8 +99693,8 @@ var ts;
|
|
|
99671
99693
|
if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
|
|
99672
99694
|
output += newLine;
|
|
99673
99695
|
}
|
|
99674
|
-
output +=
|
|
99675
|
-
output += ""
|
|
99696
|
+
output += getLocaleTimeString(system) + " - ";
|
|
99697
|
+
output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + getPlainDiagnosticFollowingNewLines(diagnostic, newLine);
|
|
99676
99698
|
system.write(output);
|
|
99677
99699
|
};
|
|
99678
99700
|
}
|
|
@@ -99694,7 +99716,7 @@ var ts;
|
|
|
99694
99716
|
.map(function (errorDiagnostic) {
|
|
99695
99717
|
if (errorDiagnostic.file === undefined)
|
|
99696
99718
|
return;
|
|
99697
|
-
return ""
|
|
99719
|
+
return "" + errorDiagnostic.file.fileName;
|
|
99698
99720
|
});
|
|
99699
99721
|
return filesInError.map(function (fileName) {
|
|
99700
99722
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
@@ -99727,7 +99749,7 @@ var ts;
|
|
|
99727
99749
|
if (errorCount === 0)
|
|
99728
99750
|
return "";
|
|
99729
99751
|
var nonNilFiles = filesInError.filter(function (fileInError) { return fileInError !== undefined; });
|
|
99730
|
-
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return
|
|
99752
|
+
var distinctFileNamesWithLines = nonNilFiles.map(function (fileInError) { return fileInError.fileName + ":" + fileInError.line; })
|
|
99731
99753
|
.filter(function (value, index, self) { return self.indexOf(value) === index; });
|
|
99732
99754
|
var firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory());
|
|
99733
99755
|
var d = errorCount === 1 ?
|
|
@@ -99740,7 +99762,7 @@ var ts;
|
|
|
99740
99762
|
ts.Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1 :
|
|
99741
99763
|
ts.Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length === 1 ? firstFileReference : distinctFileNamesWithLines.length);
|
|
99742
99764
|
var suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : "";
|
|
99743
|
-
return ""
|
|
99765
|
+
return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine + suffix;
|
|
99744
99766
|
}
|
|
99745
99767
|
ts.getErrorSummaryText = getErrorSummaryText;
|
|
99746
99768
|
function createTabularErrorsDisplay(filesInError, host) {
|
|
@@ -99763,7 +99785,7 @@ var ts;
|
|
|
99763
99785
|
" ".repeat(leftPaddingGoal - errorCountDigitsLength)
|
|
99764
99786
|
: "";
|
|
99765
99787
|
var fileRef = prettyPathForFileError(file, host.getCurrentDirectory());
|
|
99766
|
-
tabularData += ""
|
|
99788
|
+
tabularData += "" + leftPadding + errorCount + " " + fileRef + "\n";
|
|
99767
99789
|
});
|
|
99768
99790
|
return tabularData;
|
|
99769
99791
|
}
|
|
@@ -99790,9 +99812,9 @@ var ts;
|
|
|
99790
99812
|
var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
|
|
99791
99813
|
for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
|
|
99792
99814
|
var file = _c[_i];
|
|
99793
|
-
write(""
|
|
99794
|
-
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" "
|
|
99795
|
-
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" "
|
|
99815
|
+
write("" + toFileName(file, relativeFileName));
|
|
99816
|
+
(_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write(" " + fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText); });
|
|
99817
|
+
(_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write(" " + d.messageText); });
|
|
99796
99818
|
}
|
|
99797
99819
|
}
|
|
99798
99820
|
ts.explainFiles = explainFiles;
|
|
@@ -99830,7 +99852,7 @@ var ts;
|
|
|
99830
99852
|
if (isJsonFile && !ts.endsWith(includeSpec, ".json"))
|
|
99831
99853
|
return false;
|
|
99832
99854
|
var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
|
|
99833
|
-
return !!pattern && ts.getRegexFromPattern("("
|
|
99855
|
+
return !!pattern && ts.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(fileName);
|
|
99834
99856
|
});
|
|
99835
99857
|
}
|
|
99836
99858
|
ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -99839,7 +99861,7 @@ var ts;
|
|
|
99839
99861
|
var options = program.getCompilerOptions();
|
|
99840
99862
|
if (ts.isReferencedFile(reason)) {
|
|
99841
99863
|
var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
|
|
99842
|
-
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\""
|
|
99864
|
+
var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"" + referenceLocation.text + "\"";
|
|
99843
99865
|
var message = void 0;
|
|
99844
99866
|
ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
|
|
99845
99867
|
switch (reason.kind) {
|
|
@@ -99950,7 +99972,7 @@ var ts;
|
|
|
99950
99972
|
var currentDir_1 = program.getCurrentDirectory();
|
|
99951
99973
|
ts.forEach(emittedFiles, function (file) {
|
|
99952
99974
|
var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
|
|
99953
|
-
write("TSFILE: "
|
|
99975
|
+
write("TSFILE: " + filepath);
|
|
99954
99976
|
});
|
|
99955
99977
|
listFiles(program, write);
|
|
99956
99978
|
}
|
|
@@ -100257,7 +100279,7 @@ var ts;
|
|
|
100257
100279
|
}
|
|
100258
100280
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
100259
100281
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
100260
|
-
writeLog("Current directory: "
|
|
100282
|
+
writeLog("Current directory: " + currentDirectory + " CaseSensitiveFileNames: " + useCaseSensitiveFileNames);
|
|
100261
100283
|
var configFileWatcher;
|
|
100262
100284
|
if (configFileName) {
|
|
100263
100285
|
configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
|
|
@@ -100404,10 +100426,10 @@ var ts;
|
|
|
100404
100426
|
}
|
|
100405
100427
|
function createNewProgram(hasInvalidatedResolution) {
|
|
100406
100428
|
writeLog("CreatingProgramWith::");
|
|
100407
|
-
writeLog(" roots: "
|
|
100408
|
-
writeLog(" options: "
|
|
100429
|
+
writeLog(" roots: " + JSON.stringify(rootFileNames));
|
|
100430
|
+
writeLog(" options: " + JSON.stringify(compilerOptions));
|
|
100409
100431
|
if (projectReferences)
|
|
100410
|
-
writeLog(" projectReferences: "
|
|
100432
|
+
writeLog(" projectReferences: " + JSON.stringify(projectReferences));
|
|
100411
100433
|
var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
|
|
100412
100434
|
hasChangedCompilerOptions = false;
|
|
100413
100435
|
hasChangedConfigFileParsingErrors = false;
|
|
@@ -100549,7 +100571,7 @@ var ts;
|
|
|
100549
100571
|
return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
|
|
100550
100572
|
}
|
|
100551
100573
|
var pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
100552
|
-
writeLog("Scheduling invalidateFailedLookup"
|
|
100574
|
+
writeLog("Scheduling invalidateFailedLookup" + (pending ? ", Cancelled earlier one" : ""));
|
|
100553
100575
|
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
100554
100576
|
}
|
|
100555
100577
|
function invalidateResolutionsOfFailedLookup() {
|
|
@@ -100605,7 +100627,7 @@ var ts;
|
|
|
100605
100627
|
synchronizeProgram();
|
|
100606
100628
|
}
|
|
100607
100629
|
function reloadConfigFile() {
|
|
100608
|
-
writeLog("Reloading config file: "
|
|
100630
|
+
writeLog("Reloading config file: " + configFileName);
|
|
100609
100631
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
100610
100632
|
if (cachedDirectoryStructureHost) {
|
|
100611
100633
|
cachedDirectoryStructureHost.clearCache();
|
|
@@ -100643,7 +100665,7 @@ var ts;
|
|
|
100643
100665
|
return config.parsedCommandLine;
|
|
100644
100666
|
}
|
|
100645
100667
|
}
|
|
100646
|
-
writeLog("Loading config file: "
|
|
100668
|
+
writeLog("Loading config file: " + configFileName);
|
|
100647
100669
|
var parsedCommandLine = host.getParsedCommandLine ?
|
|
100648
100670
|
host.getParsedCommandLine(configFileName) :
|
|
100649
100671
|
getParsedCommandLineFromConfigFileHost(configFileName);
|
|
@@ -100896,8 +100918,8 @@ var ts;
|
|
|
100896
100918
|
ts.getBuildOrderFromAnyBuildOrder = getBuildOrderFromAnyBuildOrder;
|
|
100897
100919
|
function createBuilderStatusReporter(system, pretty) {
|
|
100898
100920
|
return function (diagnostic) {
|
|
100899
|
-
var output = pretty ? "["
|
|
100900
|
-
output += ""
|
|
100921
|
+
var output = pretty ? "[" + ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] " : ts.getLocaleTimeString(system) + " - ";
|
|
100922
|
+
output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (system.newLine + system.newLine);
|
|
100901
100923
|
system.write(output);
|
|
100902
100924
|
};
|
|
100903
100925
|
}
|
|
@@ -101640,7 +101662,7 @@ var ts;
|
|
|
101640
101662
|
function listEmittedFile(_a, proj, file) {
|
|
101641
101663
|
var write = _a.write;
|
|
101642
101664
|
if (write && proj.options.listEmittedFiles) {
|
|
101643
|
-
write("TSFILE: "
|
|
101665
|
+
write("TSFILE: " + file);
|
|
101644
101666
|
}
|
|
101645
101667
|
}
|
|
101646
101668
|
function getOldProgram(_a, proj, parsed) {
|
|
@@ -101669,7 +101691,7 @@ var ts;
|
|
|
101669
101691
|
function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
|
|
101670
101692
|
var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
|
|
101671
101693
|
reportAndStoreErrors(state, resolvedPath, diagnostics);
|
|
101672
|
-
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason:
|
|
101694
|
+
state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
|
|
101673
101695
|
if (canEmitBuildInfo)
|
|
101674
101696
|
return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
|
|
101675
101697
|
afterProgramDone(state, program, config);
|
|
@@ -101695,7 +101717,7 @@ var ts;
|
|
|
101695
101717
|
if (!host.fileExists(inputFile)) {
|
|
101696
101718
|
return {
|
|
101697
101719
|
type: ts.UpToDateStatusType.Unbuildable,
|
|
101698
|
-
reason:
|
|
101720
|
+
reason: inputFile + " does not exist"
|
|
101699
101721
|
};
|
|
101700
101722
|
}
|
|
101701
101723
|
if (!force) {
|
|
@@ -102020,7 +102042,7 @@ var ts;
|
|
|
102020
102042
|
}
|
|
102021
102043
|
}
|
|
102022
102044
|
if (filesToDelete) {
|
|
102023
|
-
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * "
|
|
102045
|
+
reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join(""));
|
|
102024
102046
|
}
|
|
102025
102047
|
return ts.ExitStatus.Success;
|
|
102026
102048
|
}
|
|
@@ -102370,7 +102392,7 @@ var ts;
|
|
|
102370
102392
|
};
|
|
102371
102393
|
}
|
|
102372
102394
|
function bold(str) {
|
|
102373
|
-
return "\u001B[1m"
|
|
102395
|
+
return "\u001B[1m" + str + "\u001B[22m";
|
|
102374
102396
|
}
|
|
102375
102397
|
var isWindows = sys.getEnvironmentVariable("OS") && ts.stringContains(sys.getEnvironmentVariable("OS").toLowerCase(), "windows");
|
|
102376
102398
|
var isWindowsTerminal = sys.getEnvironmentVariable("WT_SESSION");
|
|
@@ -102379,19 +102401,19 @@ var ts;
|
|
|
102379
102401
|
if (isWindows && !isWindowsTerminal && !isVSCode) {
|
|
102380
102402
|
return brightWhite(str);
|
|
102381
102403
|
}
|
|
102382
|
-
return "\u001B[94m"
|
|
102404
|
+
return "\u001B[94m" + str + "\u001B[39m";
|
|
102383
102405
|
}
|
|
102384
102406
|
var supportsRicherColors = sys.getEnvironmentVariable("COLORTERM") === "truecolor" || sys.getEnvironmentVariable("TERM") === "xterm-256color";
|
|
102385
102407
|
function blueBackground(str) {
|
|
102386
102408
|
if (supportsRicherColors) {
|
|
102387
|
-
return "\u001B[48;5;68m"
|
|
102409
|
+
return "\u001B[48;5;68m" + str + "\u001B[39;49m";
|
|
102388
102410
|
}
|
|
102389
102411
|
else {
|
|
102390
|
-
return "\u001B[44m"
|
|
102412
|
+
return "\u001B[44m" + str + "\u001B[39;49m";
|
|
102391
102413
|
}
|
|
102392
102414
|
}
|
|
102393
102415
|
function brightWhite(str) {
|
|
102394
|
-
return "\u001B[97m"
|
|
102416
|
+
return "\u001B[97m" + str + "\u001B[39m";
|
|
102395
102417
|
}
|
|
102396
102418
|
return {
|
|
102397
102419
|
bold: bold,
|
|
@@ -102401,7 +102423,7 @@ var ts;
|
|
|
102401
102423
|
};
|
|
102402
102424
|
}
|
|
102403
102425
|
function getDisplayNameTextOfOption(option) {
|
|
102404
|
-
return "--"
|
|
102426
|
+
return "--" + option.name + (option.shortName ? ", -" + option.shortName : "");
|
|
102405
102427
|
}
|
|
102406
102428
|
function generateOptionOutput(sys, option, rightAlignOfLeft, leftAlignOfRight) {
|
|
102407
102429
|
var _a, _b;
|
|
@@ -102438,13 +102460,13 @@ var ts;
|
|
|
102438
102460
|
text.push(sys.newLine);
|
|
102439
102461
|
if (showAdditionalInfoOutput(valueCandidates, option)) {
|
|
102440
102462
|
if (valueCandidates) {
|
|
102441
|
-
text.push(
|
|
102463
|
+
text.push(valueCandidates.valueType + " " + valueCandidates.possibleValues);
|
|
102442
102464
|
}
|
|
102443
102465
|
if (defaultValueDescription) {
|
|
102444
102466
|
if (valueCandidates)
|
|
102445
102467
|
text.push(sys.newLine);
|
|
102446
102468
|
var diagType = ts.getDiagnosticText(ts.Diagnostics.default_Colon);
|
|
102447
|
-
text.push(
|
|
102469
|
+
text.push(diagType + " " + defaultValueDescription);
|
|
102448
102470
|
}
|
|
102449
102471
|
text.push(sys.newLine);
|
|
102450
102472
|
}
|
|
@@ -102493,7 +102515,7 @@ var ts;
|
|
|
102493
102515
|
}
|
|
102494
102516
|
var curRight = remainRight.substr(0, rightCharacterNumber);
|
|
102495
102517
|
remainRight = remainRight.slice(rightCharacterNumber);
|
|
102496
|
-
res.push(""
|
|
102518
|
+
res.push("" + curLeft + curRight);
|
|
102497
102519
|
isFirstLine = false;
|
|
102498
102520
|
}
|
|
102499
102521
|
return res;
|
|
@@ -102594,7 +102616,7 @@ var ts;
|
|
|
102594
102616
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
102595
102617
|
}
|
|
102596
102618
|
categoryMap.forEach(function (value, key) {
|
|
102597
|
-
res.push("### "
|
|
102619
|
+
res.push("### " + key + sys.newLine + sys.newLine);
|
|
102598
102620
|
res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, value), true);
|
|
102599
102621
|
});
|
|
102600
102622
|
if (afterOptionsDescription) {
|
|
@@ -102604,7 +102626,7 @@ var ts;
|
|
|
102604
102626
|
}
|
|
102605
102627
|
function printEasyHelp(sys, simpleOptions) {
|
|
102606
102628
|
var colors = createColors(sys);
|
|
102607
|
-
var output = __spreadArray([], getHeader(sys,
|
|
102629
|
+
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler) + " - " + ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version)), true);
|
|
102608
102630
|
output.push(colors.bold(ts.getDiagnosticText(ts.Diagnostics.COMMON_COMMANDS)) + sys.newLine + sys.newLine);
|
|
102609
102631
|
example("tsc", ts.Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
|
|
102610
102632
|
example("tsc app.ts util.ts", ts.Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
|
|
@@ -102630,7 +102652,7 @@ var ts;
|
|
|
102630
102652
|
}
|
|
102631
102653
|
}
|
|
102632
102654
|
function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
|
|
102633
|
-
var output = __spreadArray([], getHeader(sys,
|
|
102655
|
+
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler) + " - " + ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version)), true);
|
|
102634
102656
|
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);
|
|
102635
102657
|
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);
|
|
102636
102658
|
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);
|
|
@@ -102640,7 +102662,7 @@ var ts;
|
|
|
102640
102662
|
}
|
|
102641
102663
|
}
|
|
102642
102664
|
function printBuildHelp(sys, buildOptions) {
|
|
102643
|
-
var output = __spreadArray([], getHeader(sys,
|
|
102665
|
+
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler) + " - " + ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version)), true);
|
|
102644
102666
|
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);
|
|
102645
102667
|
for (var _i = 0, output_3 = output; _i < output_3.length; _i++) {
|
|
102646
102668
|
var line = output_3[_i];
|
|
@@ -103021,7 +103043,7 @@ var ts;
|
|
|
103021
103043
|
reportCountStatistic("Subtype cache size", caches.subtype);
|
|
103022
103044
|
reportCountStatistic("Strict subtype cache size", caches.strictSubtype);
|
|
103023
103045
|
if (isPerformanceEnabled) {
|
|
103024
|
-
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(
|
|
103046
|
+
ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(name + " time", duration); });
|
|
103025
103047
|
}
|
|
103026
103048
|
}
|
|
103027
103049
|
else if (isPerformanceEnabled) {
|
|
@@ -103092,7 +103114,7 @@ var ts;
|
|
|
103092
103114
|
// This file actually uses arguments passed on commandline and executes it
|
|
103093
103115
|
ts.Debug.loggingHost = {
|
|
103094
103116
|
log: function (_level, s) {
|
|
103095
|
-
ts.sys.write(""
|
|
103117
|
+
ts.sys.write("" + (s || "") + ts.sys.newLine);
|
|
103096
103118
|
}
|
|
103097
103119
|
};
|
|
103098
103120
|
if (ts.Debug.isDebugging) {
|